Interquartile range (IQR)

By Jude Wallis · Published

The interquartile range (IQR) is the width of the middle half of the data, a single number equal to the third quartile minus the first quartile.

The IQR is one number: Q3Q1Q_3 - Q_1, the third quartile minus the first. It carries the units of the data and measures the span the middle 50 percent of the values occupy. Because the top and bottom quarters are discarded before anything is measured, no value out in either tail can touch it. The IQR is the spread you quote beside the median, as the standard deviation goes beside the mean.

For 3, 6, 7, 9, 12, 14, 15, 40 the median is (9+12)/2=10.5(9 + 12)/2 = 10.5. The lower half is 3, 6, 7, 9, giving Q1=6.5Q_1 = 6.5; the upper half is 12, 14, 15, 40, giving Q3=14.5Q_3 = 14.5; so the IQR is 14.56.5=814.5 - 6.5 = 8. Change the 40 to 400 and the IQR is still 8, while the range grows from 37 to 397 and the sample standard deviation goes from about 11.6 to 138. That is what resistance looks like in numbers.

The IQR is a width, not a location, and writing it as one is the standard error. "The IQR is from 6.5 to 14.5" reports the interval the middle half occupies; the IQR is the single number 8. The same slip appears as "the IQR is the middle 50 percent of the data," which names observations rather than a measurement of them.

The width says nothing about where the median sits inside it. In 1, 2, 3, 4, 5, 6, 20, 30, 40 the quartiles are 2.5 and 25, an IQR of 22.5, while the median is 5, pressed against the left edge of that wide middle half.

One edge case breaks the usual outlier rule. If more than half the values are identical, Q1Q_1 and Q3Q_3 can coincide. For 5, 5, 5, 5, 5, 5, 5, 5, 9, 20 both quartiles are 5, the IQR is 0, and both 1.5 IQR fences collapse onto 5, so the rule flags every value other than 5, including the 9. The arithmetic is right and the conclusion is useless, so say so rather than reporting outliers with a straight face.

Where this comes up

More describing data terms, or browse the full statistics glossary.