Statistics
Outlier and IQR calculator
Enter your numbers to find outliers by three methods — Tukey's 1.5 × IQR fences, a z-score screen and Grubbs' test — alongside the quartiles and interquartile range, drawn on a box plot.
Separate numbers with commas, spaces or new lines, or paste a spreadsheet column.
Decimals and negatives are fine; write 10:3 for a value that occurs 3 times.
Your results will appear here: the result first, then the rest of the summary and a chart.
Interquartile range (IQR)
4.5
The box spans the middle 50% of the data, from Q1 to Q3, with the median inside it. Whiskers reach the furthest values still within 1.5 IQR of the box; the 1 point beyond that is an outlier.
Show the working, step by step
The formula
IQR = Q3 − Q1 lower fence = Q1 − 1.5 × IQR upper fence = Q3 + 1.5 × IQR
Q1 is the value a quarter of the way through the sorted data and Q3 three quarters of the way. The distance between them spans the middle 50% of the observations — so the IQR answers "how spread out is the bulk of my data?" while deliberately ignoring the tails.
Why it survives outliers
Take 12, 15, 17, 14, 19, 21, 16, 13, 18 and then replace the 21 with 2100.
The standard deviation leaps from about 2.9 to over 690. The IQR does not move at all,
because 2100 is still simply "the largest value" and the quartiles are positional.
That robustness is the whole point. It is why box plots are the standard way to compare distributions that may contain anomalies, and why median-and-IQR is the conventional summary for skewed data such as incomes or response times.
Reading the box plot
- The box runs from Q1 to Q3 — the middle half of the data.
- The line inside it is the median. If it sits off-centre, the data is skewed.
- The whiskers reach the furthest values still inside the fences.
- Separate points beyond the whiskers are outliers.
Where 1.5 comes from
John Tukey chose it as a practical compromise rather than deriving it. On perfectly normal data the 1.5 × IQR rule flags roughly 0.7% of observations — rare enough to be worth a look, common enough that the rule is not useless. The 3 × IQR threshold for "extreme" flags about one in half a million.
Because it is a convention rather than a law, expect a few flags on any large clean dataset. A thousand normal observations will produce about seven, none of them errors.
Which outlier test to use
The calculator runs all four and shows each verdict, because they answer slightly different questions:
- Tukey's fences (1.5 × IQR) make no assumption about the shape of the data, so they are the safe default for skewed data such as incomes, reaction times or waiting times.
- The z-score screen flags values more than 3 standard deviations from the mean. It assumes roughly normal data, and it is weak in small samples: an outlier inflates the standard deviation it is measured against, and with 10 or fewer values no point can reach |z| > 3 at all. See the z-score calculator for a single value.
- The modified z-score (Iglewicz and Hoaglin, 1993) replaces the mean with the median and the standard deviation with the median absolute deviation (MAD):
M = 0.6745 × (x − median) ÷ MAD, flagging |M| > 3.5. Because neither the median nor the MAD moves much when one value is extreme, an outlier cannot hide by inflating its own yardstick. In the example above, 44 has an ordinary z of about 2.7 — not flagged — but a modified z of 7.42. - Grubbs' test is a formal significance test (α = 0.05 here) for the single most extreme value, assuming the rest of the data is normal. It is the usual choice in laboratory and quality work where one suspect reading needs a defensible yes or no.
A flag is a reason to look at a value, not to delete it. Check whether it is a recording error or a real observation first: a genuine extreme value removed to tidy the data changes the answer to the question you were asking.
If you already have Q1 and Q3 from a textbook or a software printout, the upper and lower fence calculator gives the fences directly, with any multiplier, without re-entering the data.
Related calculators
-
Five-number summary
Min, Q1, median, Q3 and max with a box plot.
-
Percentile calculator
Any percentile, plus percentile rank for a value.
-
Standard deviation
The other main measure of spread, for symmetric data.
-
Mean absolute deviation
Spread without squaring — a middle ground.
Common questions
What is the interquartile range?
The IQR is the width of the middle half of your data: IQR = Q3 − Q1. It
ignores the top and bottom quarters entirely, which is what makes it resistant to
outliers.
How do I find outliers using the IQR?
Tukey's rule: anything below Q1 − 1.5 × IQR or above
Q3 + 1.5 × IQR is a mild outlier. Beyond 3 × IQR it is an extreme outlier.
This calculator reports both, and marks them in red on the box plot.
Why use the IQR instead of the standard deviation?
Because a single extreme value can move a standard deviation a long way and barely moves the IQR. Change the largest value in a dataset from 20 to 2,000 and the SD explodes while the quartiles do not shift at all.
Use the standard deviation for roughly symmetric data, and the IQR for skewed data or anywhere outliers are expected.
Why do other calculators give different quartiles?
Because there is no single agreed definition — at least nine are in use. This site uses
linear interpolation between order statistics, matching R's default and Excel's
QUARTILE.INC. Minitab and some textbooks use a different rule and will differ
slightly on small datasets. Details here.
Should I delete the outliers it finds?
Almost never automatically. An outlier is a flag, not a verdict: it may be a transcription error worth removing, or the single most informative point in your data. Investigate what produced it before deciding.