How to Use the Outlier Calculator
This outlier calculator helps you identify potential outliers in a dataset using the interquartile range (IQR), Z-score, or modified Z-score method.
To use the calculator:
- Enter the data values in the data input field.
- Choose the detection method. The IQR method is the default, but you can change to the Z-score or modified Z-score method.
- Click Calculate.
The calculator will instantly identify and return the potential outliers in your data. It will also provide a clear, step-by-step solution, showing you how the outliers were determined using the selected method.
Tip. The data input field in this calculator allows you to enter data manually or copy-paste values directly from Excel, Google Sheets, or text documents. For manual data entry, you should separate the values using commas, spaces, tabs, or line breaks.
What Is an Outlier in Statistics?
An outlier is an observation that is unusually high or low compared with the other values in a dataset.
For example, suppose a researcher records the monthly incomes of 10 employees. Nine employees earn between $3,000 and $5,000, while one earns $25,000. The unusually high income may be considered a potential outlier because it is considerably different from the other observations.
Outliers can affect statistical measures such as the mean, standard deviation, and range. They may also influence the results of statistical analyses, particularly when the methods are sensitive to extreme values.
However, an outlier is not necessarily an error. It may be a genuine observation or an indication of a data entry or measurement problem. Therefore, it is important to investigate flagged values before deciding whether to remove them from a dataset.
How to Find Outliers Using the IQR Method
The IQR method of identifying outliers is also called the 1.5 × IQR rule or Tukey’s method.
To find outliers using this method:
- Calculate the lower quartile ( Q1) and upper quartile (Q3)
- Find the interquartile range (IQR)
- Compute the lower fence using the formula: Q1 − 1.5 × IQR
- Compute the upper fence using the formula: Q1 + 1.5 × IQR
- Identify the potential outlier(s) as any observation below the lower fence or above the upper fence.
Note. Values that fall exactly on either fence are not classified as outliers.
Example 1
Find the outliers in the following dataset using the 1.5 × IQR rule.
6, 8, 9, 10, 11, 12, 13, 30
Solution
Step 1: Calculate the first and third quartiles.
The dataset contains eight observations, already arranged in ascending order.
Since the number of observations is even, divide the observations into two equal halves.
Lower half: 6, 8, 9, 10
Upper half: 11, 12, 13, 30
Using the median-of-halves method, the first quartile (Q1) is the median of the lower half.
Therefore, Q1 = (8 + 9) / 2
= 8.5
Similarly, the third quartile (Q3) is the median of the upper half.
Hence, Q3 = (12 + 13) / 2
= 12.5
Therefore, Q1 = 8.5 and Q3 = 12.5.
Want more details about calculating quartiles either online or manually? Use the Quartile Calculator.
Step 2: Calculate the interquartile range.
By definition, the interquartile range formula is: IQR = Q3 – Q1
Therefore, IQR = 12.5 − 8.5
= 4
You can verify this value using the Interquartile Range Calculator.
Step 3: Calculate the lower and upper fences.
Lower Fence = Q1 − 1.5 × IQR
Substiting the values, Lower Fence = 8.5 − 1.5 × 4
= 8.5 − 6
= 2.5
On the other hand, Upper Fence = Q3 + 1.5 × IQR
Substituting the values, Upper Fence = 12.5 + 1.5 × 4
= 12.5 + 6
= 18.5
Therefore, the lower fence is 2.5, while the upper fence is 18.5.
You can also calculate these boundaries using the Lower and Upper Fence Calculator.
Step 4: Identify the outliers.
Recall. An outlier using the IQR method is any value that falls below the lower fence or above the upper fence.
In this case, we need to identify value(s) lying below 2.5 or above 18.5. From the dataset: 6, 8, 9, 10, 11, 12, 13, 30, there is no value below the lower fence (2.5), and only 30 is above the upper fence (18.5).
Therefore, 30 is a potential outlier in the given dataset.
You can also verify if the identified potential outlier is an extreme value using the formula: Q3 + 3 × IQR.
Therefore, upper extreme = 12.5 + 3 ×4
= 24.5
Since 30 also exceeds 24.5, we can classify it as an extreme outlier using the IQR method.
How to Find Outliers Using the Z-Score Method
The Z-score method identifies potential outliers based on how many standard deviations an observation lies from the mean.
Therefore, to find outliers using this method:
- Calculate the sample mean.
- Calculate the sample standard deviation.
- Calculate the z-score for each observation in the dataset.
- Identify observations with an absolute z-score value greater than 3 as potential outlier(s).
Note: The Z-score method is sensitive to extreme observations because they affect the mean and standard deviation. Consequently, an unusually large or small observation may not always exceed the selected cutoff, particularly in small datasets.
Example 2
A researcher records the following 12 observations:
8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 13, 70
Use the Z-score method to identify any potential outliers. (You may assume that the observations represent a sample).
Solution
Step 1. Find the sample mean
By definition, the sample mean formula is: , where Σx is the sum of all observations and n is the sample size.
From the dataset and using the sum calculator, Σx = 180. Also, n = 12 since there are 12 observations in the dataset.
Therefore, the sample mean, x̄ = 180 / 12
= 15
You can verify the above value using either the mean calculator or the average calculator.
ii) Calculate the standard deviation
By definition, the sample standard deviation formula is:
Where:
- Σxi2 is the sum of squared observations
- n is the sample size
- x̄ is the sample mean
Using the sum of squares calculator, Σxi2 = 6018. Also, from (i), x̄ = 15 and n = 12.
Substituting the values into the sample standard deviation formula, s = √[(6018 – 12(15)2)/(12-1)]
=√[(6018 – 2700)/11]
=√3318/11
Hence, s = √301.64
= 17.368
You can quickly verify the above result using the standard deviation calculator. Alternatively, you can use the variance calculator and find the square root of the resulting value.
Step 3: Calculate the z-scores
For a sample dataset, the z-score formula is:
z = (x − x̄) / s
Where:
- x is the individual observation
- x̄ is the sample mean
- s is the sample standard deviation
Since the sample mean x̄ = 15 and the sample standard deviation s = 17.368, we can calculate the z-scores for the given dataset as follows.
| x | z = (x − x̄) / s |
|---|---|
| 8 | (8 − 15) / 17.368 = −0.403 |
| 9 | (9 − 15) / 17.368 = −0.345 |
| 9 | (9 − 15) / 17.368 = −0.345 |
| 9 | (9 − 15) / 17.368 = −0.345 |
| 10 | (10 − 15) / 17.368 = −0.288 |
| 10 | (10 − 15) / 17.368 = −0.288 |
| 10 | (10 − 15) / 17.368 = −0.288 |
| 10 | (10 − 15) / 17.368 = −0.288 |
| 11 | (11 − 15) / 17.368 = −0.230 |
| 11 | (11 − 15) / 17.368 = −0.230 |
| 13 | (13 − 15) / 17.368 = −0.115 |
| 70 | (70 − 15) / 17.368 = 3.167 |
You can quickly compute the above z-scores using the z-score calculator.
Step 4: Identify the outliers
Using the Z-score method, any observation with an absolute Z-score greater than 3 is considered a potential outlier.
From the table, the observation 70 has a Z-score of 3.167, which exceeds the cutoff of 3. However, all the remaining observations have absolute Z-scores below 3.
Therefore, 70 is the only potential outlier in the dataset.
To verify this example using the Outlier Calculator, enter the dataset, select Z-Score, choose Sample Standard Deviation, and leave the cutoff at 3.
How to Find Outliers Using the Modified Z-Score Method
The modified z-score method follows the same approach as the z-score method except that it uses the median and median absolute deviation instead of the mean and standard deviation.
Therefore, to identify outliers using this method:
- Find the median
- Find the median absolute deviation
- Calculate the modified z score for each of the observations
- Identify the potential outlier(s). A commonly used cutoff is an absolute modified Z-score greater than 3.5.
Note. This method is less affected by extreme values because it uses the median and MAD, which are more resistant to unusually large or small observations.
Example 3
A business records the following delivery times, in days, for eight orders:
15, 16, 17, 18, 19, 20, 21, 50
Use the modified Z-score method to identify any potential outliers in the dataset.
Solution
Step 1. Find the median
Since the dataset contains eight observations already arranged in ascending order, the median is the average of the values in the 4th and 5th positions.
Therefore, Median = (18 + 19) / 2
= 18.5
You can verify the above result using the median calculator.
Step 2. Find the median absolute deviation
The median absolute deviation (MAD) is the median of the absolute differences between each observation and the dataset’s median.
Since the median is 18.5, we first calculate the absolute deviations from the median as follows.
| x | |x − Median| |
|---|---|
| 15 | |15 − 18.5| = 3.5 |
| 16 | |16 − 18.5| = 2.5 |
| 17 | |17 − 18.5| = 1.5 |
| 18 | |18 − 18.5| = 0.5 |
| 19 | |19 − 18.5| = 0.5 |
| 20 | |20 − 18.5| = 1.5 |
| 21 | |21 − 18.5| = 2.5 |
| 50 | |50 − 18.5| = 31.5 |
Next, arrange the absolute deviations in ascending order as follows:
0.5, 0.5, 1.5, 1.5, 2.5, 2.5, 3.5, 31.5
Since there are eight observations, the median absolute deviation is the average of the values in positions 4 and 5.
Therefore, MAD = (1.5 + 2.5) / 2
= 2
You can verify the above result using the median absolute deviation calculator.
Step 3. Calculate the modified Z-scores
By definition, the modified Z-score formula is:
Where:
- xᵢ is the individual observation.
- Median is the median of the dataset.
- MAD is the median absolute deviation.
Since the median is 18.5 and MAD = 2, we can calculate the modified Z-score for each observation as follows.
| x | Modified Z-score = 0.6745(x − Median) / MAD |
|---|---|
| 15 | 0.6745(15 − 18.5) / 2 = −1.180 |
| 16 | 0.6745(16 − 18.5) / 2 = −0.843 |
| 17 | 0.6745(17 − 18.5) / 2 = −0.506 |
| 18 | 0.6745(18 − 18.5) / 2 = −0.169 |
| 19 | 0.6745(19 − 18.5) / 2 = 0.169 |
| 20 | 0.6745(20 − 18.5) / 2 = 0.506 |
| 21 | 0.6745(21 − 18.5) / 2 = 0.843 |
| 50 | 0.6745(50 − 18.5) / 2 = 10.623 |
Step 4. Identify the potential outliers
Using the modified Z-score method, any observation with an absolute modified Z-score greater than 3.5 is considered a potential outlier.
From the table, the observation 50 has a modified Z-score of 10.623, which exceeds the cutoff of 3.5. However, all the remaining observations have absolute modified Z-scores below 3.5.
Therefore, 50 is the only potential outlier in the dataset.
To verify this example using the Outlier Calculator:
- Copy-paste the dataset in the input field
- Select Modified Z-Score (Median and MAD), and leave the cutoff at 3.5.
- Click calculate
Which Outlier Detection Method Should You Use?
The appropriate method depends on the distribution of your data and the purpose of the analysis. However, you can use the following guide if you’re unsure which method to use:
- Use the IQR method when the dataset is skewed or contains unusual observations
- Use the z-score method when the data are approximately normally distributed, and the mean and standard deviation provide meaningful measures of the distribution.
- Use the Modified Z-Score Method when you want a method that is less affected by extreme observations.
What Should You Do With Outliers?
After identifying potential outliers, you should examine them before deciding whether to exclude them from your analysis.
For example, suppose a researcher records a participant’s age as 250 years. This is likely a data entry error that should be investigated and corrected if the actual value can be confirmed.
However, an unusually high income or examination score may represent a genuine observation. Removing such a value simply because it is unusual could lead to misleading conclusions.
If the flagged observations are genuine, consider examining how they affect your results. You may compare the analysis with and without the flagged observations, provided that any exclusions are justified and documented.
You can also use the Box Plot Calculator to visualize the distribution of your data and see how potential outliers appear beyond the whiskers.
Frequently Asked Questions
An outlier calculator is an online statistical tool used to identify unusually high or low observations in a dataset. This calculator supports the IQR, Z-score, and modified Z-score methods and provides a step-by-step solution.
Yes. A dataset may have no observations outside the selected detection limits. However, this does not necessarily mean that every observation is correct or that the dataset contains no unusual patterns.
Different calculators may use different detection methods, cutoff values, or quartile calculation conventions. For example, the median-of-halves method may produce different quartiles from Excel’s QUARTILE.INC function, which uses inclusive interpolation. To match Excel’s QUARTILE.INC results, select Inclusive Interpolation from the Quartile Method options in this outlier calculator.
Yes. The Z-score method uses the mean and standard deviation, both of which can be affected by extreme observations. In small samples, an unusually large observation may increase the standard deviation enough to keep its absolute Z-score below the usual cutoff of 3.
No. This outlier calculator identifies potential outliers but does not automatically remove them from your dataset. You should first investigate the flagged observations and determine whether there is a valid reason to exclude them.
