Calculate Tukey's inner and outer fences for a dataset and sort any values beyond them into mild and extreme outliers.
Inner: Q1 − 1.5 × IQR, Q3 + 1.5 × IQR · Outer: Q1 − 3 × IQR, Q3 + 3 × IQR
At least 4 values. The chips above choose how the quartiles are worked out.
Fences are cut-off points built from the quartiles that mark where unusual values begin. Values beyond the inner fences (1.5 × IQR outside the box) are outliers; values beyond the outer fences (3 × IQR outside) are extreme outliers.
John Tukey introduced them alongside the box plot as a simple, robust way to flag odd values. Because they're built from quartiles, a single wild value can't drag them outwards and hide itself.
In a box plot, the whiskers stop at the last data point inside the inner fences. Anything beyond is drawn as a separate dot, often with a different symbol for extreme outliers.
Fences as defined by Tukey (1977) and given in the NIST/SEMATECH e-Handbook. See Sources.
For normal data about 0.7% of values land beyond these by chance.
For normal data only about 1 value in 400,000 lands beyond these, so an extreme outlier almost always deserves a closer look.
It lies beyond the upper outer fence of 36. That's worth checking against the source: it could easily be a typing error for 5.0.
The worked example under each quartile convention. With small datasets the choice can decide whether a value is flagged.
| Method | IQR | Upper inner | Upper outer |
|---|---|---|---|
| Median of halves | 8 | 24 | 36 |
| Inclusive (Excel QUARTILE.INC) | 5.5 | 18.25 | 26.5 |
| Exclusive (Excel QUARTILE.EXC) | 8 | 24 | 36 |
They’re Tukey’s conventions. 1.5 × IQR catches values that are unusual but not impossible for normal data; 3 × IQR catches values so far out that chance alone almost never explains them.
No, they work on any data. But the “0.7% by chance” figure is for normal data; skewed data will naturally have more values beyond one fence.
Then all four fences equal Q1 and Q3, and any different value is flagged. That happens when more than half the values are identical.
Conventionally no: only values strictly beyond the fence are flagged.
He called values between the inner and outer fences “outside” and values beyond the outer fences “far out”.
Probably a different quartile method. Pick the matching chip: the halves method is common in school courses, QUARTILE.INC in Excel.
With Q1 in A1 and Q3 in A2: =A1-1.5*(A2-A1) and =A2+1.5*(A2-A1). Use 3 instead of 1.5 for the outer fences.
Not automatically. Check whether they’re errors. Genuine extremes are part of the data and removing them hides real variation.
Related Tools