What is outlier detection?
An outlier is a value that sits unusually far from the rest: a $25,000 order among $60 orders, an age of 999, a temperature spike from a faulty sensor. Outliers distort averages, standard deviations, charts, regression lines and machine-learning models. Outlier detection finds them so you can decide whether they are errors to fix, noise to cap or real events worth investigating, like fraud or a viral day.
The methods compared
| Method | Rule | Best for |
|---|---|---|
| IQR (Tukey fences) | Outside Q1 − k·IQR to Q3 + k·IQR (k = 1.5; 3 = extreme) | Most data, including skewed data. The box-plot standard. |
| Modified z-score | |0.6745 × (x − median) / MAD| > 3.5 | Robust choice when there may be many outliers. |
| Z-score | |(x − mean) / SD| > 3 | Roughly normal data with few outliers. Large outliers inflate the SD and can hide each other. |
| Percentile limits | Below the 1st or above the 99th percentile | Trimming or capping a fixed share. Always flags about 2%, even in clean data. |
| Grubbs' test | Repeatedly tests the most extreme value against a t-based critical value | Normally distributed measurements; a formal statistical test. |
| Mahalanobis distance | Distance from the centre accounting for correlation, compared with χ². Estimated robustly (re-fitted without extreme rows) so big outliers can't hide smaller ones. | Unusual combinations across columns, e.g. high income with a tiny basket. |
By default, a value is flagged only when at least two methods agree, which cuts false alarms from any single rule.
What to do with outliers
- Fix obvious errors (typos, unit mix-ups, placeholder values like 999) at the source.
- Cap (winsorize) extreme but genuine values at the bounds when they would dominate averages or models.
- Remove rows only when they are errors or outside the population you are studying, and report how many you removed.
- Detect within groups when categories differ: a 40 °C reading is normal in one location and an outlier in another.
- Log-transform right-skewed data such as income, prices or order values first, so large but legitimate values aren't over-flagged.
For a broader check of missing values, formats and duplicates, use the Data Quality Profiler.
Frequently asked questions
What is an outlier?
An outlier is a value that is unusually far from the rest of the data, such as a $25,000 order among $50 orders or a temperature reading of 999. Outliers can be data-entry errors, measurement faults, fraud, or genuine but rare events, so they should be investigated before being removed.
Which outlier detection method should I use?
For most business data, start with the IQR method (Tukey fences) or the modified z-score, because both are robust to skewed data and to the outliers themselves. Use the z-score or Grubbs' test only when the data is roughly normal. Use Mahalanobis distance to find unusual combinations across several columns.
How does the IQR method find outliers?
The interquartile range (IQR) is Q3 minus Q1. Values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR are outliers; values beyond 3 × IQR are extreme outliers. These limits are the whiskers on a box plot.
What is the modified z-score?
The modified z-score uses the median and the median absolute deviation (MAD) instead of the mean and standard deviation: Mz = 0.6745 × (x − median) / MAD. Values with |Mz| above 3.5 are outliers. Because the median and MAD are not pulled by extreme values, it works well even when there are many outliers.
Should I remove outliers?
Only if they are errors or outside the population you want to study. Otherwise consider capping them at a limit (winsorizing), using robust statistics like the median, or analysing them separately. The tool lets you download data with outliers removed, capped at the bounds, replaced with the median, or simply flagged.
Is my data uploaded?
No. Files and pasted numbers are processed entirely in your browser. Nothing is sent to a server.