Written by Dackohn; last reviewed November 2026.

The most reliable simple rule is the 1.5 × IQR fence: flag values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. The common |z| > 3 rule can miss outliers in small samples, because the outlier inflates the standard deviation. A flag is a prompt to check a value, not to delete it.

A worked example

Consider ten values: 12, 14, 15, 15, 16, 17, 18, 19, 21, 48. The 48 is obviously unusual. Here is what each method says.

MethodCalculation for 48Flagged?
IQR fencesQ1 = 15, Q3 = 18.75, IQR = 3.75; upper fence = 24.375Yes
z-score (|z| > 3)(48 − 19.5) / 10.34 = 2.76No
Modified z (|M| > 3.5)0.6745 × (48 − 16.5) / 2 = 10.62Yes
Grubbs’ test (α = .05)G = 2.76, critical value 2.29Yes

Why the z-score fails here

The z-score measures distance using the mean and SD, and the outlier distorts both. Without 48, the mean is 16.33 and the SD 2.74. With it, they jump to 19.5 and 10.34. The outlier has hidden itself by inflating its own yardstick, an effect called masking. With only 10 values, the largest possible z-score is (n − 1) / √n = 2.85, so the |z| > 3 rule cannot flag anything at this sample size.

The four methods

Skewed data

In a strongly right-skewed distribution, such as incomes, many genuine values look like outliers to these rules. Consider a log transformation first, or treat flags with extra caution.

What to do once you find one

  1. Check for an error. Was it mistyped, or is the unit wrong? Correct it if you can confirm the true value.
  2. Ask whether it belongs. Is it from the population you are studying? Exclude it only for a reason you could defend without looking at the results.
  3. If it is genuine, keep it. Use robust methods such as medians or rank-based tests.
  4. Report what you did. Show the results with and without the value if it changes the conclusion.

Removing data points only when it improves the result is a form of p-hacking.

Try it yourself

Outlier Calculator →Check your data with all four methods at once. Quartile Calculator →Find Q1, Q3 and the IQR by every common method.

Frequently asked questions

What is the best method to detect outliers?

For most purposes, the 1.5 x IQR rule. It is simple and does not depend on the mean or SD, which outliers distort. Add a modified z-score or Grubbs test where appropriate.

Is a z-score above 3 always an outlier?

No, and a value can be an outlier with a z-score below 3. In small samples the rule cannot flag anything: with n = 10, the largest possible z-score is 2.85.

Can I remove outliers from my data?

Only with a justification unrelated to the result, such as a confirmed error. Report any exclusions and show how they affect the results.

Related reading: Skewness and kurtosis · Mean, median and mode · How to find quartiles and the IQR


Sources & further reading: NIST/SEMATECH e-Handbook of Statistical Methods · OpenStax Introductory Statistics. How we compute & validate: methodology. Written & reviewed by Dackohn; last reviewed August 2026.