Paste your data to get the interquartile range (IQR), the spread of the middle half of the values, together with the quartiles, the 1.5 × IQR outlier fences and any values that fall outside them.
IQR = Q3 − Q1 · Fences = Q1 − 1.5 × IQR and Q3 + 1.5 × IQR
Separate with commas, spaces or new lines. They don't need to be sorted.
Most textbooks and TI-83/84 calculators: Q1 and Q3 are the medians of the lower and upper halves, leaving out the middle value when n is odd.
The interquartile range is the distance between the first quartile (Q1) and the third quartile (Q3). A quarter of the data lies below Q1 and a quarter above Q3, so the IQR is the width of the middle half.
Because it ignores the lowest and highest quarters, a few extreme values can't inflate it. That makes the IQR the usual partner for the median when describing skewed data such as incomes or response times, and it's the length of the box in a box plot.
It also gives the most widely used rule for flagging outliers, introduced by the statistician John Tukey: anything more than 1.5 × IQR below Q1 or above Q3 deserves a second look.
Fences as defined by Tukey; quartile methods as catalogued by Hyndman and Fan. See Sources.
Sort the data and find the median. With the textbook method, Q1 is the median of the lower half and Q3 the median of the upper half, leaving the middle value out of both halves when the count is odd.
Values outside the fences are possible outliers. For bell-shaped data, the IQR is about 1.35 standard deviations, so IQR ÷ 1.35 gives a rough standard deviation that outliers can't inflate.
Both are below the lower fence. The range (55 − 7 = 48) is more than four times the IQR because of them.
The exam marks with the top mark replaced by more and more extreme values. The range follows the outlier; the IQR stays put.
| Top mark | Range | IQR |
|---|---|---|
| 55 | 48 | 11 |
| 70 | 63 | 11 |
| 100 | 93 | 11 |
| 500 | 493 | 11 |
It’s Tukey’s convention. For bell-shaped data, the 1.5 × IQR fences sit about 2.7 standard deviations from the mean, so only around 0.7% of values fall outside by chance.
Excel’s QUARTILE.INC interpolates between values; most textbooks take the medians of the two halves. Choose “Inclusive” above to match Excel, or “Exclusive” for QUARTILE.EXC.
Half the IQR, also called the quartile deviation. It’s sometimes used as a robust counterpart to the standard deviation.
Yes, if half or more of the values are identical so Q1 equals Q3. The fences then collapse onto the quartiles and almost any different value is flagged, so treat that result with care.
Use the IQR (with the median) for skewed data or data with outliers, and the standard deviation (with the mean) for roughly symmetric data.
=QUARTILE.INC(range,3) − QUARTILE.INC(range,1). Use QUARTILE.EXC instead if your course follows the exclusive method.
At least four for the quartiles to mean anything; ideally a few dozen. With very small samples the quartiles depend heavily on the method chosen.
Values more than 3 × IQR beyond the quartiles (the outer fences). The upper and lower fence calculator separates mild from extreme outliers.
Related Tools