Outlier Calculator
Paste your numbers and see which values five standard outlier rules flag — Tukey's IQR fences, the z-score, the modified z-score (median and MAD), Grubbs' test and Dixon's Q — in one table, with a dot plot and every critical value shown. Free, no sign-up, and nothing leaves your browser.
0 values detected
Enter at least four numbers to check for outliers.
How to Use the Outlier Calculator
- 1. Paste your data. Separate the numbers with commas, spaces or new lines. You need at least four values; Dixon's Q applies to 3–10 values, and the NIST handbook advises against Grubbs' test on six values or fewer.
- 2. Set the rules. The defaults are the standard ones: 1.5 × IQR fences with the median-of-halves quartiles, |z| > 3, and a 5% significance level for Grubbs and Dixon. Change any of them to match your course or software.
- 3. Compare the methods. The table shows what each rule flags. A value that several methods agree on deserves a close look; a value flagged by only one rule is usually borderline.
- 4. Check the working. The fences, the z and modified z scales, Grubbs' G against its critical value and Dixon's Q against Rorabacher's table are all spelled out so you can reproduce them by hand.
Five Ways to Call a Value an Outlier
There is no single definition of an outlier, so the calculator runs the five rules that textbooks and journals actually use. They differ in what they assume and in what they miss.
| Method | Rule | Assumes | Weak spot |
|---|---|---|---|
| Tukey's fences | Outside Q1 − 1.5 × IQR or Q3 + 1.5 × IQR | Nothing about the shape | The quartile method changes the fences in small samples |
| z-score | |z| > 3 (or 2 or 2.5), z = (x − x̄) ÷ s | Roughly normal data | The outlier inflates x̄ and s, and in small samples |z| cannot reach 3 |
| Modified z-score | |M| > 3.5, M = 0.6745 × (x − median) ÷ MAD | Nothing about the shape | Needs a fallback when more than half the values are identical |
| Grubbs' test | G = max|x − x̄| ÷ s against a t-based critical value | Normal data, one outlier | Two outliers on the same side can hide each other |
| Dixon's Q | Q = gap ÷ range against a table | Normal data, one outlier | Only tabulated for 3–10 values |
MAD is the median absolute deviation, median(|x − median|). The 0.6745 factor makes it comparable to a standard deviation for normal data.
The first three are rules of thumb: they label values but do not test a hypothesis. Grubbs' test and Dixon's Q are significance tests of the null hypothesis that every value comes from one normal population. That is why they report a critical value and a significance level, and why they should be used only when a normal model is reasonable for the rest of the data.
A Worked Example: Two High Values
Use "Try an example" to load 12 measurements: 14.2, 15.1, 15.8, 16, 16.4, 16.9, 17.3, 17.5, 18.2, 19, 27.5 and 31. The last two sit well above the rest, and the methods disagree about them in an instructive way.
- Tukey's fences (median of halves): Q1 = 15.9, Q3 = 18.6, IQR = 2.7, so the fences are 15.9 − 1.5 × 2.7 = 11.85 and 18.6 + 1.5 × 2.7 = 22.65. Both 27.5 and 31 are flagged — and both lie beyond the 3 × IQR fence at 26.7, so they count as extreme.
- Modified z-score: the median is 17.1 and MAD = 1.2, giving M = 5.8457 for 27.5 and M = 7.813 for 31. Both exceed 3.5.
- z-score: the mean is 18.7417 and s = 5.1336, so 31 has z = 2.3879 and 27.5 has z = 1.7061. Neither passes 3 — and with n = 12 no value ever could, because |z| cannot exceed (n − 1) ÷ √n = 3.1754 and the outliers themselves have inflated s.
- Grubbs' test: G = 2.3879 against a critical value of 2.4116 at α = 0.05 (p = 0.0575), so it narrowly fails to flag 31. At α = 0.10 the critical value drops to 2.285 and it does flag it.
- Dixon's Q: not available, because the table stops at n = 10.
This is masking: when two outliers sit near each other, each one props up the standard deviation that is supposed to expose the other. The z-score and Grubbs' test, which both lean on the mean and s, are fooled; the fences and the modified z-score, which lean on quartiles and the median, are not. Load the small-sample example to see the opposite case — nine values where Dixon's Q (0.6429 against 0.493) and Grubbs' test both flag 6.9, while the z-score rule cannot because |z| tops out at 2.667.
Where the Critical Values Come From
Grubbs' two-sided critical value for n observations at significance level α is ((n − 1) ÷ √n) × √(t² ÷ (n − 2 + t²)), where t is the t quantile at 1 − α ÷ (2n) with n − 2 degrees of freedom (Grubbs, 1969; the NIST/SEMATECH e-Handbook gives the same formula). The calculator computes it exactly rather than reading a table, and the p-value uses the same formula inverted, matching R's outliers::grubbs.test.
Dixon's Q is the gap between the suspect value and its nearest neighbour divided by the range. Its critical values are tabulated, not computed; the calculator uses Rorabacher (1991, Analytical Chemistry 63, 139–146) for n = 3–10 at 90%, 95% and 99% confidence. These are two-sided: the test asks whether the more extreme end is an outlier. The modified z-score and its 3.5 cut-off are from Iglewicz and Hoaglin (1993); the optional 2.2 fence multiplier is Hoaglin and Iglewicz (1987); the bound on z-scores is Shiffler (1988).
What to Do With a Flagged Value
A flag is a reason to look, not to delete. Check the source first: a misplaced decimal, a unit mix-up or a data-entry slip is a legitimate correction. If the value is real, keep it, report it, and consider a method that tolerates it — the median instead of the mean, a rank-based test, or a transformation. If you do exclude it, say which rule you used, at what threshold, and how the results change with and without it. The repeated-Grubbs option removes and retests, but each round is less trustworthy than the first, so treat it as exploration.
Frequently Asked Questions
- How do you find outliers in a data set?
- The most common way is Tukey's 1.5 × IQR rule: compute Q1 and Q3, then flag anything below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. If your data are roughly normal you can also use z-scores (|z| > 3) or a formal test such as Grubbs' test. Running several rules side by side, as this calculator does, shows how robust a flag is.
- What is the 1.5 × IQR rule and why 1.5?
- It is the fence rule John Tukey proposed for box plots. With normal data, the fences sit about 2.7 standard deviations from the mean, so roughly 0.7% of normal values fall outside — a reasonable balance between flagging too much and too little. Hoaglin and Iglewicz (1987) suggested 2.2 when you want fewer false flags (they used their own "ideal fourths" quartiles); choose it in the fence-multiplier menu.
- What z-score counts as an outlier?
- A cut-off of 3 is the usual convention, with 2 or 2.5 used for a stricter screen. Remember that in a sample of n values no z-score can exceed (n − 1) ÷ √n, which is 2.67 for n = 9 and 3.18 for n = 12, so a cut-off of 3 cannot flag anything in a small sample. The outlier also inflates the standard deviation, which is why the modified z-score is often preferred.
- What is the modified z-score and why is the cut-off 3.5?
- It replaces the mean with the median and the standard deviation with the median absolute deviation: M = 0.6745 × (x − median) ÷ MAD. Iglewicz and Hoaglin (1993) recommended flagging |M| > 3.5 after simulations showed it labels few values in clean normal data while still catching real outliers. Because the median and MAD barely move when an outlier is added, it resists masking.
- Should I use Grubbs' test or Dixon's Q?
- Both test for a single outlier in normal data. Use Dixon's Q for very small samples of 3–10 values, such as replicate lab measurements; its table does not extend further. Grubbs' test works for any n of 3 or more and is the one most journals and standards expect. Neither should be used to test several outliers at once without care, because masking makes them unreliable.
- Can I just delete outliers?
- Only with a reason you can state. Correct values that are errors, and report any value you exclude along with the rule and threshold. Deleting a point merely because it is extreme biases estimates and understates variability. Where it is a genuine observation, report results with and without it, or use a robust method.
- Why do the methods disagree?
- They answer different questions. Fences and the modified z-score describe how far a value is from the middle of the data; the z-score and Grubbs' test measure distance in standard deviations that the outlier itself inflates; Dixon's Q compares one gap to the range. Disagreement usually means a borderline value or several outliers masking each other.