What the IQR measures
The interquartile range is the spread of the middle 50% of the data: IQR = Q3 − Q1. Because it ignores the lowest and highest quarter, a single extreme value cannot inflate it. That makes it the standard measure of spread for skewed data and the basis of the box plot.
How to find quartiles by hand
- Sort the data.
- Find the median (Q2).
- Q1 is the median of the lower half, Q3 the median of the upper half. If n is odd, leave the overall median out of both halves.
- IQR = Q3 − Q1.
For 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49: the median is 40, the lower half 6, 7, 15, 36, 39 gives Q1 = 15, the upper half 41, 42, 43, 47, 49 gives Q3 = 43, so IQR = 28.
Finding outliers with the IQR
Upper fence = Q3 + 1.5 × IQR
Any value outside the fences is a possible outlier. In the example the fences are -27 and 85, so no value is flagged. An outlier is a value to check, not automatically an error to delete.
The five number summary
Minimum, Q1, median, Q3 and maximum together describe the center, spread and range of a data set in five numbers. They are exactly the five points a box plot draws.
Textbook method or Excel method?
The two options can give different quartiles for the same data. Here, Excel's QUARTILE.INC gives Q1 = 25.5 and Q3 = 42.5. TI-84 calculators and most US statistics textbooks use the median of halves method, which is the default here.
Formulas follow the NIST/SEMATECH e-Handbook of Statistical Methods: box plots, outliers.
Frequently asked questions
What is a good IQR?
It depends entirely on the data. Compare the IQR with the median: an IQR that is small relative to the median means the middle half of the data is tightly grouped.
Why does my answer differ from Excel?
Excel uses an interpolation method (QUARTILE.INC). Switch the method above to "Excel QUARTILE.INC" to match it exactly.
Do I include the median when finding Q1 and Q3?
In the textbook method, no: when n is odd the median is left out of both halves. With an even n the data splits evenly and the question does not arise.