Outlier Detection Calculator
An outlier is an observation that clearly departs from the general pattern of a data set. A single extreme observation can pull the mean, the standard deviation, the correlation, and the regression coefficients in a direction they would not otherwise take; that is why every analysis should begin with a scan for outliers.
This calculator applies three criteria at once: the quartile-based Tukey rule (outside Q1 − 1.5·IQR to Q3 + 1.5·IQR), the z-score based on the mean and the standard deviation (|z| > 3), and the resistant modified z-score built on the median absolute deviation (0.6745·(x − median)/MAD > 3.5). The decision follows the method you select, but the table shows the verdict of all three criteria side by side.
Outlier Criteria
Interquartile range: IQR = Q3 − Q1 Tukey bounds: [Q1 − 1.5·IQR , Q3 + 1.5·IQR] Extreme bounds: [Q1 − 3·IQR , Q3 + 3·IQR] z-score: z = (xᵢ − x̄) / s outlier: |z| > 3 Median absolute dev.: MAD = median(|xᵢ − median|) Modified z: Mᵢ = 0.6745·(xᵢ − median) / MAD outlier: |Mᵢ| > 3.5 z limit (small n): |z| ≤ (n − 1) / √n
The constant 0.6745 is the factor that scales MAD to the standard deviation under a normal distribution (Φ⁻¹(0.75) ≈ 0.6745). The modified z-score is the resistant criterion proposed by Iglewicz and Hoaglin (1993).
How to Calculate
- Paste your data values into the box; commas, spaces, and line breaks are all accepted.
- Choose a method: Tukey or MAD for a resistant result, or the z-score if you trust the normality of the data.
- Change the threshold coefficient if you wish; leave it empty and the standard threshold of the method (1.5 / 3 / 3.5) is applied.
- Check in the table which observations were flagged and whether the three criteria agree with one another.
- Look at the points beyond the whiskers in the box plot and at the extreme points in the order plot.
- See how much the mean changes once the outliers are removed to judge how sensitive your result is to these observations.
Worked Examples
Measurement series with a single extreme value (Tukey)
Across 19 measurements, Q1 = 16.50 and Q3 = 22.50, so IQR = 6 and the Tukey upper bound is 22.50 + 1.5·6 = 31.50. The value 48 lies above that bound and is flagged as the only outlier; its z-score is 3.57 and its modified z-score is 6.52, so all three methods reach the same verdict. Removing this observation drops the mean from 20.58 to 19.06 and the standard deviation from 7.68 to 3.98.
Number of outliers: 1 · Flagged values: 48.00 · Outlier rate: 5.3%
A mild extreme value the z-score misses
In this series the extreme observation is milder (the largest value is 34) and the z-score method flags nothing: for 34, z = 2.74, below the threshold of 3. The Tukey rule, however, treats 34 as an outlier because it exceeds the upper bound of 31.50, while the modified z of 3.37 stays just below the 3.5 threshold. This is a classic illustration of how the z-score can mask an extreme observation in small samples.
Number of outliers: 0 · Flagged values: None · Outlier rate: 0.0%
Extreme values at both ends (modified z)
In these 18 observations, with extreme values at both ends, the median is 55 and MAD is 3.50. The modified z-score is -10.21 for the value 2 and 8.29 for the value 98, and both exceed the 3.5 threshold, so both are flagged. The z-score method catches only the value 2 (z = -3.10), because the z-score of 98 stays at 2.55: the two extreme observations inflate the standard deviation together and mask each other.
Number of outliers: 2 · Flagged values: 2.00, 98.00 · Outlier rate: 11.1%