How to use the outlier detector
- Paste or type your numbers, separated by commas, spaces or new lines. You need at least four.
- Choose a quartile method. The default is inclusive, the method used by Excel QUARTILE.INC. Other courses and calculators use different methods, and they can change which values are flagged in a small data set.
- Read the fences. Anything below the lower fence or above the upper fence is flagged, and values far beyond them are marked extreme.
- Compare the mean with and without the flagged values, and decide whether each one is a mistake, a different kind of observation or a real result.
Formula
IQR = Q3 - Q1
Lower fence = Q1 - 1.5 x IQR
Upper fence = Q3 + 1.5 x IQR
Extreme: below Q1 - 3 x IQR or above Q3 + 3 x IQR
A value exactly on a fence is not flagged. Only values strictly outside the fences are.
Ten test scores with one very high value
The scores are 22, 25, 26, 27, 28, 29, 30, 31, 33 and 71. With the inclusive method Q1 = 26.25 and Q3 = 30.75, so IQR = 4.5. The lower fence is 26.25 - 6.75 = 19.5 and the upper fence is 30.75 + 6.75 = 37.5. Only 71 lies outside, and it is also beyond 30.75 + 13.5 = 44.25, so it is marked extreme.
The mean of all ten scores is 32.2. Without 71 the mean of the other nine is 27.89. For the five numbers 1, 2, 3, 4, 100 the inclusive method gives fences of -1 and 7 and flags 100.
Why the quartile method matters
There is more than one accepted way to place Q1 and Q3. The inclusive method interpolates between data points using positions (n - 1) x p. The exclusive method uses (n + 1) x p. The two halves methods take the median of the lower and upper halves, either leaving the middle value out of both halves when n is odd or keeping it in both.
On 1, 2, 3, 4, 100 the inclusive method flags 100, while the median-of-halves method that leaves the middle out puts Q3 at 52 and flags nothing. That is why the tool names the method it used and lets you change it.
What to do with a flagged value
A flagged value is unusual compared with the middle half of your data. It is not automatically wrong. Check the source first: a misplaced decimal point or a unit mix-up is a common cause. If the value is real, removing it quietly will change your results, so say what you did.
To see more summary measures for the same data, try the five number summary calculator or the descriptive statistics calculator. A z score gives another view of how far a value is from the mean, in the z-score calculator.
Assumptions and limits
- The 1.5 x IQR rule is a convention for flagging unusual values. It is not a statistical test and it does not prove a value is an error.
- The quartile method is stated with every result, and the default is inclusive.
- Values exactly on a fence are not flagged.
- The rule works best for data that are roughly symmetric. Skewed data can have many flagged values on the long side without anything being wrong.
Frequently asked questions
How do you find outliers using the IQR?
Find the first and third quartiles, subtract to get the interquartile range, then set fences at Q1 minus 1.5 times the IQR and Q3 plus 1.5 times the IQR. Values outside the fences are flagged as outliers.
Why does another calculator give different outliers?
Quartiles can be computed several ways, and the fences depend on them. Excel, R, textbooks and graphing calculators do not all agree, especially for small lists. Match the method before comparing.
What makes an outlier extreme?
Here a value is called extreme when it is more than 3 times the IQR beyond the nearest quartile, a wider fence than the 1.5 times rule. It marks values that are far from the bulk of the data.
Should I delete outliers before analysis?
Not automatically. Remove a value only if you know it is an error or does not belong to the group you are studying, and say so in your report. Otherwise keep it, or run the analysis both ways.