Outlier Calculator — Step-by-Step Solutions
The Outlier Calculator helps you identify unusual data points in your dataset using three methods: the IQR (Interquartile Range) method, Z-score method, and Modified Z-score method using MAD (Median Absolute Deviation).
Enter your data set and choose a detection method to instantly see which values are outliers. The tool includes a box plot visualisation and distinguishes between mild and extreme outliers.
Your calculations will appear here
How to Use the Outlier Calculator
- Pick a detection method: IQR Method (the box-plot rule), Z-Score Method (distance from the mean), Modified Z-Score (MAD) (distance from the median, resistant to the outliers themselves) or Box Plot (five-number summary and chart).
- Enter your data as comma-separated numbers. The IQR method needs at least 4 values; the z-score methods need at least 3.
- For the z-score modes you can change the threshold. The defaults are 2 for the z-score method and 3.5 for the modified z-score.
- The result lists the bounds or scores, the number of outliers and which values are flagged. For the IQR method it separates mild from extreme outliers.
Formula and Theory
An outlier is a value that sits unusually far from the rest of the data. It might be a data-entry error, a measurement fault, or a genuine rare event, and the right response depends on which. Detecting it is the first step; deciding what to do with it needs judgement about the source.
The IQR method flags anything below Q1 - 1.5 x IQR or above Q3 + 1.5 x IQR, where the IQR is Q3 - Q1. Values beyond 3 x IQR from the quartiles are called extreme. Here the quartiles are the medians of the lower and upper halves of the sorted data, so with an odd count the middle value is left out of both halves.
The z-score method computes z = (x - mean) / standard deviation and flags values with |z| above the threshold. It uses the population standard deviation. Its weakness is that the outliers inflate the mean and standard deviation themselves, so extreme values can hide each other (masking), especially in small samples.
The modified z-score replaces the mean with the median and the standard deviation with the median absolute deviation (MAD): M = 0.6745 x (x - median) / MAD. Because the median and MAD hardly move when outliers are present, this method is the most reliable of the three on small, contaminated data. A cut-off of 3.5 is the usual recommendation.
Worked Examples
Example 1: IQR method
Problem: Find the outliers in 2, 4, 5, 7, 8, 9, 10, 12, 15, 50.
Solution: Ten values, so the lower half is 2, 4, 5, 7, 8 (median 5 = Q1) and the upper half is 9, 10, 12, 15, 50 (median 12 = Q3). IQR = 12 - 5 = 7. Lower bound = 5 - 1.5 x 7 = -5.5. Upper bound = 12 + 1.5 x 7 = 22.5. The value 50 is above 22.5. It is also above Q3 + 3 x IQR = 33, so it is an extreme outlier.
Answer: Outlier: 50 (extreme)
Example 2: Z-score method
Problem: Apply the z-score method with threshold 2 to the same data.
Solution: Mean = 122 / 10 = 12.2. Population standard deviation = 13.113. For 50: z = (50 - 12.2) / 13.113 = 2.883, which is above 2. For the next largest value, 15: z = (15 - 12.2) / 13.113 = 0.214, well inside the threshold.
Answer: Outlier: 50 (z = 2.88)
Example 3: Modified z-score
Problem: Apply the modified z-score to the same data.
Solution: Median = (8 + 9) / 2 = 8.5. Absolute deviations from 8.5 are 6.5, 4.5, 3.5, 1.5, 0.5, 0.5, 1.5, 3.5, 6.5, 41.5. Sorted, the middle two are 3.5 and 3.5, so MAD = 3.5. For 50: M = 0.6745 x 41.5 / 3.5 = 7.998, far above 3.5.
Answer: Outlier: 50 (modified z = 8.00)
Example 4: When the z-score and IQR rules miss outliers
Problem: Data: 10, 11, 12, 12, 13, 14, 95, 100. Which methods find the two large values?
Solution: IQR: Q1 = 11.5, Q3 = 54.5, IQR = 43, upper bound = 54.5 + 64.5 = 119, so neither 95 nor 100 is flagged. Z-score: mean = 33.375, standard deviation = 37.06, so z for 100 is only 1.80, under 2. Modified z: median = 12.5, MAD = 1.5, so M(95) = 0.6745 x 82.5 / 1.5 = 37.1 and M(100) = 39.3.
Answer: Only the modified z-score flags 95 and 100
Frequently Asked Questions
How do I find outliers in a data set?
Which outlier method should I use?
Should I delete outliers?
Why does this calculator give different quartiles from another tool?
What is the difference between mild and extreme outliers?
Why use a threshold of 3.5 for the modified z-score?
Related Statistics Calculators
Probability Calculator
Calculate probability of events, complements, unions, and intersections. Free online probability calculator for statistics.
Standard Deviation Calculator
Calculate standard deviation, variance, mean, and more for any dataset. Supports population and sample statistics. Free online tool.
Z-Score Calculator
Calculate z-scores, find values from z-scores, and determine probabilities. Free online z-score calculator with bell curve visualisation.
Binomial Calculator
Calculate binomial probabilities, cumulative distributions, and expected values. Free online binomial distribution calculator with bar chart.
Normal Distribution Calculator
Calculate probabilities for normal distributions. Find areas under the bell curve, percentiles, and inverse values. Free online tool.
Correlation Calculator
Calculate Pearson correlation coefficient, R-squared, and regression line. Free online correlation calculator with scatter plot.