About the Outlier Calculator
One mistyped value or unusual reading can distort an average, a chart or a regression line. This outlier calculator flags suspicious values using Tukey's fences, 1.5 interquartile ranges beyond the quartiles, and the z-score method, and it shows the fences, a box plot and your data with outliers removed. With quartiles of 6 and 16, for example, the fences are −9 and 31, so a value of 40 is flagged. An outlier is not automatically an error, so check the source of each flagged value before deleting it; rare but genuine values often carry the most interesting information.
The IQR method uses quartiles, which are themselves resistant to outliers, so it works well for skewed or small data sets. The z-score method uses the mean and standard deviation, which an extreme value inflates, so with small samples a large outlier can partly hide itself; it suits large, roughly normal data. The calculator lists the outliers from each method and gives the data with the IQR outliers removed, ready to copy.
Example: in 10, 12, 12, 13, 12, 11, 14, 13, 15, 10, 10, 10 and 100, the quartiles by the median-of-halves method are Q1 = 10 and Q3 = 13.5, so the IQR is 3.5 and the fences are 4.75 and 18.75. The value 100 is far beyond the upper fence, and beyond the extreme fence of 24. Its z-score is about 3.32, so it is also an outlier by the |z| > 3 rule.
Never delete outliers automatically: check whether each is an error or a real observation. For full quartile details see the quartile calculator, for z-scores of individual values the z-score calculator, and for spread the standard deviation calculator.
How to use the Outlier Calculator
- Enter your dataType or paste the numbers.
- Pick the quartile methodMedian of halves is the textbook default; inclusive matches Excel.
- Set the z-score threshold3 is common; 2 or 2.5 flags more values.
- Review the outliersSee the fences, the values flagged by each method, the box plot and the cleaned data.
Outlier Calculator features
- Tukey's fences at 1.5 × IQR
- Extreme outliers at 3 × IQR
- z-score method with your threshold
- Box plot with outliers marked
- Data with outliers removed
- Three quartile methods
- Paste data from spreadsheets
Common uses
- Cleaning data before analysis
- Spotting data entry errors
- Fraud and anomaly checks
- Lab and sensor quality control
- Statistics homework
Outliers in practice: finding them, investigating them and deciding what to do
An outlier is a value that sits far from the rest of the data. It might be a typing error, a broken sensor, a rare but real event or the most important observation in the data set. Detecting outliers is easy with simple rules; deciding what to do with them takes judgement. This guide explains the common detection methods, works through an example, lists typical causes and gives sensible rules for handling them.
Two common detection rules
The interquartile range rule marks values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR as outliers, and values beyond 3 × IQR as extreme outliers. It works well for skewed data because quartiles are not affected by the extremes themselves. The z-score rule flags values more than about 3 standard deviations from the mean; it suits roughly normal data but can miss outliers in small samples, because the outliers inflate the standard deviation.
A worked example: commute times
Ten commute times of 18, 22, 25, 27, 30, 31, 34, 38, 45 and 60 minutes have quartiles of 25 and 38 minutes by the median-of-halves method, an interquartile range of 13 and an upper fence of 57.5 minutes. The 60-minute commute is therefore an outlier by the IQR rule. Its z-score is only about 2.2, because the long commute itself inflates the standard deviation, so the z-score rule with a threshold of 3 would not flag it at all. Asking the employee concerned reveals that they live in another town, a real and relevant fact rather than an error.
In this case, removing the value would hide something important for planning, such as offering that employee remote working on some days.
Common causes
- Data entry errors: an extra zero, a misplaced decimal point or a value typed in the wrong unit.
- Measurement problems: a faulty sensor, a scale not zeroed or a timer started late.
- Different populations: a few large business customers among many households.
- Genuine rare events: a record sales day, an extreme storm or an unusually fast race.
The cause decides the treatment, which is why investigating comes before any deletion.
What to do with outliers
Correct values that are clearly errors, if the right value can be found. Remove values only when they are definitely invalid, and record that you did so. If outliers are real, keep them, and consider reporting results with and without them, or using methods that resist extremes, such as the median instead of the mean.
Outliers as discoveries
Sometimes the outlier is the point. Fraud detection systems look for transactions that are unusual for a customer, and quality engineers look for parts that differ from the norm. In science, unexpected results have led to important discoveries. Treating every outlier as noise risks throwing away the most interesting information in the data.
Robust statistics
Robust methods reduce the influence of outliers without deleting them. The median and interquartile range describe centre and spread robustly, and trimmed means drop a small percentage of the highest and lowest values before averaging. Many sports competitions use a similar idea, discarding the highest and lowest judges' scores before averaging the rest.
Common mistakes
- Deleting outliers automatically without investigating.
- Using the z-score rule on small or skewed samples.
- Forgetting to document which values were removed and why.
- Assuming outliers are always errors.
Related tools
For quartiles and box plots, use Quartile Calculator. For z-scores, try Z-Score Calculator, and for robust spread, Mean Absolute Deviation Calculator.
Outliers in data over time
In data collected over time, such as daily sales or hourly temperatures, an outlier is best judged against nearby values rather than the whole series. A shop's sales on the day before Eid may be far above the yearly average but entirely normal for that time of year. Comparing each value with a moving average, or with the same period in earlier years, picks out genuinely unusual points rather than predictable peaks.
Outliers in two dimensions
A value can be unremarkable on each measure separately but unusual in combination. A man 190 cm tall is not an outlier, and neither is a weight of 55 kg, but the two together are rare. Scatter plots reveal such points, and in a regression they can pull the fitted line strongly towards themselves. Statisticians measure that influence with tools such as Cook's distance.
Keeping a record
Whenever you correct or remove values, keep the original data and write down what changed and why. A simple log entry, such as "row 214: weight entered as 720 kg, corrected to 72.0 kg after checking the paper form", makes the analysis reproducible and lets others check your decisions. It also protects you from any suggestion that inconvenient data was removed to obtain a preferred result.
Limits
Detection rules are conventions, not proof; deciding whether a value is a genuine outlier needs knowledge of how the data was collected.
Frequently asked questions
What is an outlier?
A data point that lies an unusual distance from the other values. It may be an error, such as a misplaced decimal point, or a real but rare observation worth investigating.
How do I find outliers with the IQR?
Compute Q1, Q3 and IQR = Q3 − Q1. Values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR are outliers. Beyond 3 × IQR they are extreme outliers.
How do I find outliers with z-scores?
Compute each value's z-score, (x − mean) ÷ SD, and flag values with |z| above a threshold, usually 3. This works best for large data sets that are roughly normal.
Which outlier method should I use?
The IQR method is robust and suits small or skewed data; it is what box plots use. The z-score method assumes normality and can miss outliers in small samples, because outliers inflate the standard deviation.
Should I remove outliers?
Only with a good reason, such as a confirmed recording error. Removing genuine values biases results. Report outliers, check them, and if in doubt analyze the data both with and without them.
Why is 1.5 used in the IQR rule?
John Tukey chose it as a practical cutoff. For normally distributed data, the 1.5 × IQR fences sit about 2.7 standard deviations from the mean, so only about 0.7% of values fall outside by chance.
Can a data set have no outliers?
Yes. Many data sets have every value inside the fences. Outliers are flagged only when values really are far from the bulk of the data.
What is the difference between an outlier and an extreme outlier?
A mild outlier lies between 1.5 and 3 IQRs beyond the quartiles; an extreme outlier lies more than 3 IQRs beyond them, a much stronger signal that something unusual happened.