Math calculator

Outlier Calculator

Four rules at once, and the arithmetic reason each one fails.

Four rules, run together, because they disagree

Watch the 3σ rule flag nothing at all.

Points flagged, by rule, over 17 values

IQR 2 · 3σ 0 · modified z 2 · Grubbs 1

IQR fences run from 9.50000 to 13.50000; flagged: 60.00000, 62.00000.

Masking detected. The 3σ rule flags 0 points here. Remove the single most extreme value (62.00000) and it flags 1. The outliers were inflating the standard deviation enough to hide each other — each one made the others look normal. This is the failure mode that makes the z-score rule dangerous rather than merely weak, because it fails silently and in the direction of missing things. The modified z-score, built on the median and the MAD, does not have this problem.

Mean

17.11765

Standard deviation

16.54872

Median

11.00000

MAD

1.00000

median absolute deviation

Q1 / Q3

11.00000 / 12.00000

IQR

1.00000

Max possible |z|

3.88057

(n − 1)/√n

Grubbs G

2.71213 vs 2.61996

significant at 5%

All eleven quartile conventions agree on this data. That is reassuring but not guaranteed: the conventions genuinely differ, and on exactly one of them flags the 15 — type 7, which happens to be the default in R, NumPy and Excel.

What this tool shows

The 3σ rule cannot flag anything in a sample of ten or fewer. The largest possible z-score in a sample of n is (n − 1)/√n — 2.846 at n = 10. Not “usually misses”: mathematically incapable of returning a positive. This runs four rules and says when each is failing.

  • Tukey’s 1.5 × IQR fences, and the 3 × IQR far-out fences
  • The 3σ z-score rule, with its structural ceiling shown
  • The modified z-score, built on the median and MAD
  • Grubbs’ test, with an exact critical value at any n
  • Masking detection — when one outlier hides another
  • All eleven quartile conventions, and when they disagree
Four rules Masking detected Exact Grubbs critical value 11 quartile conventions

On [1…9, 15] exactly one of eleven quartile conventions flags the 15.

Updated 8 September 2026 · Works in any browser, no installation

An outlier is a value far enough from the rest to be worth a second look — and “far enough” has no single definition. The four rules here encode four different answers, they disagree on real data, and the disagreement is more informative than any one of them.

At a glance

Formula shown
IQR fences: below Q1 − 1.5·IQR or above Q3 + 1.5·IQR. Z-score: |x − x̄|/s > 3. Modified z: 0.6745·|x − median|/MAD > 3.5. Grubbs: G = max|x − x̄|/s against a critical value derived from the t distribution at n − 2 degrees of freedom. The z rule has a hard ceiling — max |z| = (n − 1)/√n — that the other three do not.
Scenario support
Cleaning a dataset before analysis; spotting data-entry errors; quality control; deciding whether an unusual measurement is a mistake or a finding; checking whether a result depends on one observation.
Educational estimate
Planning support from the values you enter — not professional advice.

The 3σ rule has a ceiling, and small samples sit under it

The most widely taught outlier rule cannot work on the sample sizes where outliers matter most, and the reason is arithmetic rather than statistical.

In a sample of n, the largest possible z-score is (n − 1)/√n. That is a hard ceiling, and it is easy to see why: the suspect value is inside the mean and the standard deviation it is being compared against. Push it further out and it drags both after it. The z-score converges rather than diverging.

At n = 10 that ceiling is 2.846. Take nine values of 1 and one value of a million: the most extreme point scores z = 2.846, under the threshold. At n = 11 the ceiling is 3.015, so a positive becomes possible — barely, and only for a point so extreme it dominates the entire sample.

So below n = 11 the 3σ rule returns “no outliers” for every possible dataset. It is not a weak test there; it is a constant function. The tool prints the ceiling next to your n so you can see when you are underneath it.

Grubbs’ test is the rule that fixes this properly, because it compares the same statistic against a critical value that depends on n. At n = 10 the 5% critical value is about 2.29, which sits below the 2.846 ceiling — so the test can actually reject. It is the right choice for small samples, and it is what the tool falls back to.

One limitation worth carrying: Grubbs tests for exactly one outlier. Applied repeatedly it suffers from the same masking problem described below, so for multiple suspected outliers the generalised ESD procedure or a robust rule is the better route.

Two outliers can hide each other

This is the failure that makes the z-score rule dangerous rather than merely weak, because it fails silently and in the direction of missing things.

Load the tool’s default dataset. Fifteen values clustered around 11, plus 60 and 62. Obvious to any human. The 3σ rule flags nothing.

Remove 62 and the rule immediately flags 60. The second outlier was inflating the standard deviation from 12.2 to 16.5, and at that width neither point reaches three standard deviations from a mean both of them had already pulled upward. Each outlier made the other look normal. This is called masking, and it gets worse as the number of outliers grows.

The mechanism is that the mean and standard deviation are not robust. A single arbitrary value can move a mean anywhere and inflate a standard deviation without limit. Building a detector out of them means the thing being detected corrupts the detector.

The modified z-score is immune, and cheaply so. It replaces the mean with the median and the standard deviation with the median absolute deviation. Both have a breakdown point of 50% — you can replace up to half the data with arbitrary values before either budges. On the same dataset it flags both points, and it does so whether there are one, two or five of them.

Its own blind spot is worth knowing. When more than half the values are identical the MAD is zero, and dividing by it is meaningless. The tool reports that rather than substituting a small number and carrying on — a case that arises constantly with rounded or count data.

The 0.6745 constant in the modified z-score is 1/Φ⁻¹(0.75): it scales the MAD so that under normality it estimates the same quantity as a standard deviation. That is why the threshold is 3.5 rather than 3 — it was chosen to give a comparable false-positive rate, not to be stricter.

The quartile convention decides the answer

Tukey’s fences look like the objective choice, and they hide a decision that is not.

There is no single definition of a quartile. Nine numbered conventions are in common software use, plus two hinge rules from the box-plot literature — eleven in total, and they give different answers on the same data whenever n is not a multiple of four. The quartile calculator covers the differences in full.

Since the fence is Q3 + 1.5 × IQR, a different quartile is a different fence. Take 1 2 3 4 5 6 7 8 9 15. The upper fences under the eleven conventions run from 14.5 to 17.0, and exactly one of them flags the 15 — type 7, which happens to be the default in R, NumPy and Excel’s PERCENTILE. Ten conventions say the value is fine and the most widely used one says it is an outlier.

Neither is wrong. They are answering slightly different questions about where a quartile sits between order statistics. But it means “this point is an outlier by the IQR rule” is incomplete without naming the convention, and two analysts with the same data and the same method can reach opposite conclusions.

The practical habit: state which you used, and when a point sits near the fence, treat that as the finding rather than the flag. A value that one convention catches and ten do not is not a clear outlier under any of them — it is borderline, and reporting it as flagged overstates the evidence.

The 1.5 multiplier is itself a convention. Tukey chose it because on normal data it flags about 0.7% of points — frequent enough to be useful, rare enough not to be noise. The 3.0 multiplier marks “far out” values at about 1 in 500,000. Neither number is derived from anything; they are calibrated judgements that have held up.

What to do with one once you have found it

Detection is the easy half. The decision that follows is where the analysis is actually won or lost, and the default should not be deletion.

First, check whether it is an error. A weight of 700 kg, a date in 1900, a decimal point in the wrong place, a missing value coded as −999. These are the only outliers with an uncontroversial fix, and they are more common than genuine extremes. Look at the raw record, not the statistic.

If it is real, it is data. Deleting a real observation because it is inconvenient is fabrication, however routine it has become. The extreme values in a dataset are frequently the most informative ones — the fraud, the failure, the breakthrough patient, the outage.

The honest move is to report both analyses. Run it with and without, and say what changed. If the conclusion holds either way, the outlier does not matter and you have shown it. If it does not hold, that is the single most important sentence in the write-up — your result depends on one observation, and readers need to know.

Prefer methods that do not need the decision. The median instead of the mean, a Spearman correlation instead of Pearson, a rank-based test instead of a t-test. Robust methods let outliers stay in the dataset without letting them drive the answer, which sidesteps the judgement call entirely.

Never delete on the strength of a rule alone. Every threshold on this page flags some fraction of perfectly ordinary data by construction — the 1.5 × IQR rule flags about 0.7% of any normal sample. In a dataset of 10,000 that is 70 points that are outliers by definition and unremarkable in fact.

A point can be ordinary on every variable and extreme jointly

Every rule on this page examines one variable at a time. That misses a whole class of outlier, and it is the class most likely to matter.

Take height and weight. A person 150 cm tall is unremarkable. A person weighing 110 kg is unremarkable. Someone who is both is extremely unusual — and no single-variable rule can see it, because neither number is out of range on its own.

The failure gets worse as variables multiply. With twenty variables there are 190 pairs and a vast interior in which a point can sit far from the data cloud while landing mid-range on every axis. Screening column by column will pass it every time.

Mahalanobis distance is the standard answer. It measures distance from the centre in units that account for how the variables covary, so it stretches the notion of “far” along the directions the data actually varies in. Under multivariate normality its square follows a chi-square distribution with degrees of freedom equal to the number of variables, which gives a threshold rather than a judgement.

It inherits the masking problem, and worse. Mahalanobis distance uses the mean vector and the covariance matrix, both of which outliers corrupt — and the corruption compounds across dimensions. Robust versions replacing them with a minimum covariance determinant estimate exist for exactly that reason, and they are the multivariate analogue of preferring the median to the mean.

The cheap first step is a scatter plot. For two or three variables, looking at the data finds joint outliers immediately and needs no threshold at all — the same argument the correlation page makes about Anscombe’s quartet.

Sources and methodology

References for the four rules and the ceiling.

Method. All four rules run on every dataset rather than one being chosen for you, because their disagreement carries information a single verdict discards. Grubbs’ critical value is derived from the t distribution at n − 2 degrees of freedom rather than read from a table, so it is available at any n and any significance level. Masking is detected by re-running the z rule with the single most extreme point removed and reporting when the count goes up. The suite asserts the (n − 1)/√n ceiling against a brute-force search over extreme datasets, that the default dataset flags one point with one outlier and zero with two while the modified z-score flags both, and that on [1…9, 15] exactly one of the eleven quartile conventions flags the 15. That engine is verified on every change against 50 assertions. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

QuartileQ1, Q2 and Q3 by all eleven conventions in common use — Excel, R, Tukey hinges and the TI-84 rule — with a warning when they disagree.
Standard DeviationSample and population standard deviation, plus variance, mean, median, quartiles, z-scores, outliers, and confidence intervals.
Five Number SummaryMinimum, Q1, median, Q3 and maximum, drawn as a box plot with every one of your observations plotted underneath it — so you can see what the summary threw away.
Z-ScoreA z-score from your data or from a known mean and SD — with the normal-table percentile checked against the share of your data that actually falls below it, and a warning when they disagree.
Mean, Median and ModeAll three centres marked on your own data, every mode rather than just the first, and the mean-median gap read as a direct measure of skew.
VarianceSample and population variance from your data, with a live simulation that shows exactly how much the wrong divisor costs — 20% low at n = 5, closing as the sample grows.

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. Every threshold here flags some fraction of ordinary data by construction — the 1.5 × IQR rule flags about 0.7% of any normal sample — so a flag is a prompt to investigate, never grounds on its own to delete an observation.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (4 updates)

Published 8 September 2026

  1. Published an outlier calculator that runs four rules together and says when each one is failing, because they disagree on real data and the disagreement is the information.
  2. Reports that the three-sigma rule is arithmetically incapable below n = 11: the largest possible z-score in a sample of n is (n - 1) over the square root of n, which is 2.846 at n = 10. Verified by brute force over 400 random small samples, none of which can ever be flagged however extreme the value.
  3. Detects masking by re-running the z rule with the most extreme point removed and reporting when the count goes up. On the default dataset one outlier is flagged and two are not, because the second inflates the standard deviation from 12.22 to 16.55.
  4. Shows all eleven quartile conventions, because the IQR fence depends on which one you use. On the values 1 to 9 plus 15, exactly one of the eleven flags the 15 — type 7, the default in R, NumPy and Excel.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.