Home / Tools / Outlier Detection Calculator

Outlier Detection Calculator

An outlier is a value far enough from the rest of your sample that it probably does not belong to the same process. Paste a column of numbers, pick a rule, and see exactly which points get flagged, by what statistic, and at what threshold. Everything runs in your browser.

Your sample
Try:
n = 0
Significance α
-

-

-
-
-
-
-
-
-
-
-
-

How this is computed
1
2
3
The same test in R

  

No data leaves your browser Verified against R's grubbs.test(), rosnerTest() and boxplot.stats() Free, no sign-up

Which method should I use?

The four rules disagree on purpose: each one draws the line between "normal" and "too far" using a different yardstick.

Grubbs

Tests whether the single most extreme value is an outlier, assuming the rest are roughly normal. Clean and classic, but only ever flags one point.

one suspected outlier, normal data
Generalized ESD (Rosner)

Removes the most extreme point and re-tests, up to k times, so several outliers cannot hide behind each other (masking).

several possible outliers
Hampel (MAD)

Flags points more than k median-absolute-deviations from the median. The median and MAD barely move when outliers are present, so it stays reliable on skewed data.

skewed or heavy-tailed data
Tukey IQR

Flags anything beyond the whiskers of a boxplot: 1.5 interquartile ranges past the quartiles. Distribution-free and easy to explain.

quick, chart-friendly screen

How the four rules compare

MethodYardstickAssumesFlagsR function
GrubbsSDs from the meanApprox. normalOne pointoutliers::grubbs.test
Generalized ESDSDs, iteratedApprox. normalUp to k pointsEnvStats::rosnerTest
Hampel (MAD)MADs from the medianNothing strongAny numbermedian + mad
Tukey IQRIQRs past the quartilesNothing strongAny numberboxplot.stats

Mean-and-SD rules (Grubbs, ESD) are powerful on clean normal data, but the outliers themselves inflate the SD, which can hide them. Median-and-MAD rules (Hampel, Tukey) resist that, at the cost of some power when the data really are normal. When methods disagree, that disagreement is the finding: investigate the point rather than trusting one rule.

Frequently asked questions

Which outlier test should I use?

Use Grubbs for a single suspected outlier in roughly normal data, generalized ESD when several points might be outliers, the Hampel filter when the data are skewed or heavy-tailed, and the Tukey IQR rule for a quick distribution-free screen that matches a boxplot. If two methods disagree, treat the flagged point as worth a closer look rather than a settled verdict.

What exactly is an outlier?

An outlier is a value that sits far enough from the rest of the sample that it is unlikely to have come from the same process. Every method here sets that distance differently: standard deviations from the mean, MADs from the median, or multiples of the interquartile range. There is no single universal cutoff, which is why the threshold is yours to choose.

Should I delete the outliers it finds?

Not automatically. A flag is a prompt to investigate, not a licence to delete. Check first for a data-entry slip or a measurement error. If the value is genuine, prefer a robust analysis, or report your result both with and without the point, rather than quietly dropping it.

Why does Grubbs flag only one point when I can see two?

Grubbs tests a single most-extreme value. When two or more outliers are present they inflate the standard deviation together, so each looks less extreme and one can mask another. Generalized ESD solves this by removing the most extreme point and re-testing up to k times.

Does this calculator match R?

Yes. Grubbs reproduces outliers::grubbs.test() including its p-value, ESD reproduces EnvStats::rosnerTest() including the per-step R and lambda values, Hampel uses median() and mad() with R's 1.4826 scaling, and Tukey matches boxplot.stats() using Tukey hinges. All are checked against R to at least seven decimals.

What is an outlier?

An outlier is a value that sits far enough from the rest of the sample that it is unlikely to belong to the same process. Each method sets that threshold differently: standard deviations from the mean, MADs from the median, or multiples of the interquartile range.

Should I delete outliers?

Not automatically. Flagging is a prompt to investigate, not a licence to delete. Check for data-entry errors first. If the point is genuine, prefer a robust method or report results with and without it rather than silently dropping it.

Why does Grubbs only flag one point?

Grubbs tests a single most-extreme value. With several outliers, one can mask another and Grubbs may miss them. Generalized ESD fixes this by removing the most extreme point and re-testing up to k times.

Go deeper