Outlier Calculator
Free outlier calculator: flag outliers in your dataset using the 1.5×IQR fence rule or a z-score threshold, and see exactly which values were flagged.
Outlier Calculator
Background.
The Quanta outlier calculator flags exactly which values in your dataset count as outliers, using either of the two most common detection methods: the 1.5×IQR fence rule popularised by John Tukey, or a z-score threshold based on the mean and standard deviation. Rather than just telling you how spread out your data is, this calculator applies that spread measurement directly to your data and reports how many individual points fall outside the resulting fences.
The 1.5×IQR method builds two fences around the middle 50% of your data: a lower fence at Q1 − 1.5×IQR and an upper fence at Q3 + 1.5×IQR, where IQR = Q3 − Q1 is the interquartile range. Any value beyond either fence is flagged. Because this method is built entirely from quartiles, it inherits the same robustness the IQR has against extreme values — a handful of genuinely extreme outliers cannot distort where the fences sit, because Q1 and Q3 depend only on the ranks of the middle-lying data. This is the method behind the whiskers of a standard box-and-whisker plot, and it works reasonably well regardless of whether your underlying data is symmetric or skewed.
The z-score method instead builds fences around the mean: any value more than a chosen number of standard deviations away (3, by default) is flagged. This method assumes your data is roughly normally distributed, and — critically — it has a well-documented weakness that the NIST/SEMATECH e-Handbook of Statistical Methods states plainly: the z-score approach 'can be misleading, particularly for small sample sizes,' because a genuinely extreme value inflates the very standard deviation used to judge it, sometimes masking itself from detection. This calculator deliberately surfaces both methods side by side rather than picking a winner, because they can and do disagree — especially on small datasets, exactly where the choice of method matters most.
A concrete illustration, built into this page's own worked example: an eleven-value dataset with one clear low outlier (12, sitting well below a cluster of scores in the 60s to 90s) gets correctly flagged by the 1.5×IQR method. But run the same dataset through the z-score method with the common threshold of 3, and it is not flagged at all — because that single value of 12 is extreme enough to substantially inflate the sample's own standard deviation, which raises the fence far enough to swallow the very point that should have tripped it. This isn't a bug in either method; it's the textbook example of exactly the small-sample masking effect NIST warns about, and it's the single best reason to check a dataset with more than one detection method before drawing conclusions.
Use the 1.5×IQR method as your default, especially for smaller or possibly skewed datasets. Use the z-score method as a secondary check once you have a reasonably large sample (several dozen points or more) and have some confidence the underlying data is close to normally distributed — and always sanity-check its result against the IQR method, or against a more robust alternative such as the modified z-score (based on the median and median absolute deviation) or Grubbs' test, both of which NIST recommends specifically because they resist the masking effect that plain z-scores are vulnerable to.
What is outlier calculator?
An outlier is a data point that differs markedly from the rest of the dataset — far enough from the bulk of the observations that it plausibly reflects a measurement error, a data-entry mistake, or a genuinely rare event rather than typical variation. There is no single universal definition of 'far enough,' which is why several detection methods coexist. The 1.5×IQR fence rule (originated by John Tukey) flags any value below Q1 − 1.5×IQR or above Q3 + 1.5×IQR, where Q1 and Q3 are the first and third quartiles and IQR = Q3 − Q1. Because it is built entirely from quartiles, this method is robust: it is not distorted by the very outliers it is trying to detect. The z-score method instead flags any value whose distance from the mean, measured in standard deviations, exceeds a chosen threshold (commonly 3). This method is simpler and matches the intuition of the 68-95-99.7 empirical rule for normally distributed data, but it has a documented weakness for small samples: an extreme value inflates the standard deviation used to judge it, which can raise the detection threshold enough to mask the very point that should have been flagged — a phenomenon the NIST/SEMATECH e-Handbook explicitly warns about, recommending more robust alternatives (the median/MAD-based modified z-score, or Grubbs' test) for rigorous work.
How to use this calculator.
- Paste your dataset as comma-separated numbers, in any order — the calculator sorts them internally. At least 4 values are required.
- Choose a detection method: 1.5×IQR fences (robust, the recommended default, especially for smaller or skewed datasets) or a z-score threshold (assumes roughly normal data, works best with larger samples).
- If using the z-score method, optionally adjust the threshold (default 3 — a common convention, though NIST's own recommended modified z-score uses 3.5 with a different, more robust formula).
- Read the outlier count, and the lower/upper fence values that define the boundary between 'typical' and 'flagged.'
- If the two methods disagree on the same dataset — which can and does happen, especially with small samples — treat that disagreement as informative rather than a bug. Consider checking a few individual data points by hand before deciding whether to exclude them.
The formula.
IQR method: compute Q1 and Q3 using Type 7 linear interpolation (Hyndman & Fan 1996), then IQR = Q3 − Q1. The lower fence is Q1 − 1.5×IQR and the upper fence is Q3 + 1.5×IQR — any value strictly beyond either fence is flagged as an outlier. This is Tukey's original 1977 convention, the same one that defines the whiskers of a box-and-whisker plot. Z-score method: compute the sample mean and sample standard deviation (Bessel-corrected, dividing by n−1), then the lower fence is mean − threshold×s and the upper fence is mean + threshold×s, where threshold defaults to 3. Any value beyond either fence is flagged. Because the mean and standard deviation both use every data point, an extreme value participates in setting its own fence — the source of the masking effect NIST documents for small samples. Both methods report a 'center' (the median for IQR, the mean for z-score) and a 'spread' (the IQR for IQR, the sample standard deviation for z-score) so the two methods' fence-building logic can be compared side by side.
A worked example.
Eleven values, one of them a clear low outlier: 12, 62, 68, 74, 78, 81, 85, 88, 91, 95, 99. Using the 1.5×IQR method, Q1 = 71 and Q3 = 89.5, so IQR = 18.5. The lower fence is 71 − 1.5×18.5 = 43.25 and the upper fence is 89.5 + 1.5×18.5 = 117.25. Only the value 12 falls below the lower fence, so the calculator reports outlierCount = 1. Now switch to the z-score method with the default threshold of 3, on the exact same data: the mean is 833/11 ≈ 75.727 and the sample standard deviation is ≈ 23.934, giving fences of roughly 3.93 and 147.53. The value 12 has a z-score of only about −2.66 — inside the ±3 threshold — so the z-score method reports outlierCount = 0 for the very same dataset that the IQR method correctly flagged. This is not a mistake: the single outlier at 12 inflated the sample's own standard deviation enough to widen its detection fence past itself, exactly the small-sample masking effect the NIST/SEMATECH e-Handbook warns readers about. It's a clean, hand-checkable demonstration of why the two methods can disagree, and why a robust method (IQR, or NIST's own recommended modified z-score) is the safer default for small or suspect datasets.
Frequently asked questions.
What is an outlier?
What is the 1.5×IQR rule?
Why did the IQR method and the z-score method disagree in the worked example?
Which method should I use — IQR or z-score?
What is the difference between a 'mild' and an 'extreme' outlier?
What should I do with a value that gets flagged as an outlier?
References& sources.
- [1]Tukey, J.W. (1977). Exploratory Data Analysis. Addison-Wesley — origin of the box-and-whisker plot and the 1.5×IQR ('mild outlier') fence convention implemented here.
- [2]NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.17 — Detection of Outliers. Documents the z-score method's formula and its explicit small-sample masking weakness, recommending the modified z-score and Grubbs' test as more robust alternatives.
- [3]NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.2 — Measures of Scale. Defines the interquartile range used to build the IQR-method fences.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 313 calculators remain free
- No billing is enabled