Outliers can be data errors or the most important observations in a data set. Compare three detection methods side by side to see which values stand out and how robust each method is to the outliers themselves.
How it works
Identify unusual values in a data series using three methods side by side: the standard Z-score, Tukey’s interquartile range fences and the robust modified Z-score based on the median absolute deviation.
Z = (x − x̄) ÷ s
IQR fences = Q1 − k × IQR and Q3 + k × IQR, IQR = Q3 − Q1
Modified Z = 0.6745 × (x − median) ÷ MAD, MAD = median |x − median|
Common uses
- Data cleaning before forecasting and modeling
- Fraud, error and anomaly screening in transactions
- Statistics coursework and research
Worked example
The calculator above opens with this example. Change any input to see the results update instantly, or select Reset to return to these figures.
| Data | 412 398 436 445 468 452 441 459 487 503 498 541 455 437 1,120 492 515 501 487 506 535 18 549 597 |
| Z-score threshold | 3 |
| IQR multiplier | 1.5 |
| Modified Z threshold | 3.5 |
| Values flagged by any method | 2 |
| Z-score outliers | 1 |
| IQR outliers | 2 |
| Modified Z outliers | 2 |
| Mean / median | 489.67 / 487.00 |
| Standard deviation / MAD | 170.59 / 38.50 |
The Z-score flags fewer points because the outliers themselves inflate the mean and standard deviation (masking); the robust methods are more reliable here. Investigate flagged values before excluding them: they may be errors, or the most important observations in the data.
Interpreting the results
- The Z-score assumes roughly normal data and is distorted by the outliers it looks for; prefer IQR or modified Z for skewed data.
- A modified Z-score above 3.5 is the threshold recommended by Iglewicz and Hoaglin.
- Document every exclusion and its reason, especially in audit, regulatory or research work.
Frequently asked questions
What is the IQR method for outliers?
The interquartile range method flags values below the first quartile minus 1.5 times the IQR, or above the third quartile plus 1.5 times the IQR. Using 3 times the IQR flags only extreme outliers.
Why can the Z-score miss outliers?
Extreme values inflate the mean and standard deviation used to calculate Z-scores, which can make other outliers look normal. This effect, called masking, is why median-based methods are more robust.
What is a modified Z-score?
The modified Z-score uses the median and the median absolute deviation instead of the mean and standard deviation. Values with an absolute modified Z-score above 3.5 are commonly treated as potential outliers.
Related calculators
- Descriptive Statistics Calculator: Mean, median, standard deviation, quartiles, skewness and kurtosis.
- Statistical Process Control (SPC) Chart Calculator: X̄-R and individuals (I-MR) control limits with out-of-control signals.
- Correlation Matrix Calculator: Pearson or Spearman correlation matrix with p-values for every pair.
- Forecast Accuracy Calculator: MAPE, WMAPE, MAD, RMSE, bias and tracking signal from actuals and forecasts.
- Linear Regression & Trend Forecast: Slope, intercept, R², p-values and forecasts with confidence and prediction intervals.