Skip to content
CoursesLog in
← Statistics glossary

interquartile range (IQR)

Q3 minus Q1: the spread of the middle 50% of the data; robust to outliers.

The interquartile range (IQR) is the width of the middle half of the data: the third quartile minus the first.

IQR=Q3−Q1\text{IQR} = Q_3 - Q_1

Q1Q_1 is the value with a quarter of the data below it (the 25th percentile) and Q3Q_3 the value with three quarters below it (the 75th). A simple way to find them by hand: sort the data and split it at the median; Q1Q_1 is then the median of the lower half and Q3Q_3 the median of the upper half. Spreadsheet functions such as QUARTILE.INC interpolate between neighbouring values instead, so on small datasets they can give slightly different numbers. Either is fine, as long as you use the same method whenever you compare groups.

Because it ignores the top and bottom quarters entirely, the IQR is robust: one lost parcel or one bulk order doesn't change it at all. That makes it the natural partner of the median for skewed product data, just as the standard deviation is the partner of the mean. "Median 7.5 minutes, middle half between 5.5 and 11" tells a stakeholder more than a mean and SD that one extreme value has inflated.

The IQR is also the backbone of the box plot. The box runs from Q1Q_1 to Q3Q_3, the line inside it marks the median, and the whiskers reach to the most extreme values still within 1.5⋅IQR1.5 \cdot \text{IQR} of the box. Anything beyond these fences is drawn as a separate dot, a potential outlier:

Q1−1.5⋅IQRandQ3+1.5⋅IQRQ_1 - 1.5 \cdot \text{IQR} \quad\text{and}\quad Q_3 + 1.5 \cdot \text{IQR}

This rule, proposed by the statistician John Tukey, is the most common everyday way to flag unusual values.

Example

First-response times in CatChow's support chat for 12 tickets, in minutes, sorted: 3, 4, 5, 6, 6, 7, 8, 9, 10, 12, 15, 42.

  1. Median: n=12n = 12 is even, so it is (7+8)/2=7.5(7 + 8) / 2 = 7.5 minutes.
  2. Lower half: 3, 4, 5, 6, 6, 7, so Q1=(5+6)/2=5.5Q_1 = (5 + 6) / 2 = 5.5.
  3. Upper half: 8, 9, 10, 12, 15, 42, so Q3=(10+12)/2=11Q_3 = (10 + 12) / 2 = 11.
  4. IQR=11−5.5=5.5\text{IQR} = 11 - 5.5 = 5.5 minutes: the middle half of customers waited between 5.5 and 11 minutes.

Fences: 5.5−1.5×5.5=−2.755.5 - 1.5 \times 5.5 = -2.75 (no ticket can be below) and 11+1.5×5.5=19.2511 + 1.5 \times 5.5 = 19.25. The 42-minute ticket is outside, so on a box plot it shows up as a separate dot, worth opening to see what happened: a message sent at night, a missed notification?

For comparison, the mean is 127/12≈10.58127 / 12 \approx 10.58 minutes and the SD about 10.47, both pulled up by that single ticket. The median and IQR describe the typical experience; the 42 deserves its own look. QUARTILE.INC in a spreadsheet gives Q1=5.75Q_1 = 5.75 and Q3=10.5Q_3 = 10.5, so an IQR of 4.75 and an upper fence of 17.625: slightly different numbers, same conclusion.

Common mistakes

  • Reading the IQR as "where most values are". It covers exactly the middle half; a quarter of the data lies above Q3Q_3 and a quarter below Q1Q_1.
  • Mixing quartile methods. Comparing an IQR from one tool with an IQR from another can show a "difference" that is only a formula difference. Use one method per comparison.
  • Treating every point beyond 1.5⋅IQR1.5 \cdot \text{IQR} as an error. On right-skewed data such as spend per customer, the fence routinely flags real, valuable customers. It marks values to inspect, not to delete.
  • Using the IQR alone when the tail is the problem. For delivery SLAs or page speed, the slow tail is what customers complain about; add p90 or p95.
  • Reading box-plot whiskers as the minimum and maximum. When there are outliers, the whiskers stop at the last data point inside the fences, and the extremes are the separate dots.

Learn it in the course

  • Spread: range, SD and quartiles · Two couriers with the same average delivery time, and why only one keeps the promise: range, variance, standard deviation, quartiles, IQR and the coefficient of variation.