Outlier Detector (Z-Score, IQR, Modified Z)

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.

Data412 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 threshold3
IQR multiplier1.5
Modified Z threshold3.5
Example inputs
Values flagged by any method2
Z-score outliers1
IQR outliers2
Modified Z outliers2
Mean / median489.67 / 487.00
Standard deviation / MAD170.59 / 38.50
Results

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.

Browse all 13 Statistics & Forecasting calculators