01
How to find outliers with the IQR
IQR = Q3 − Q1
lower fence = Q1 − 1.5 × IQR
upper fence = Q3 + 1.5 × IQR
Any value below the lower fence or above the upper fence is an outlier. Values beyond 3 × IQR are usually called extreme outliers. Quartiles here use linear interpolation, the same method as Excel QUARTILE.INC and the R default.
Sources: NIST/SEMATECH e-Handbook, §7.1.6 (inner fences at 1.5 × IQR, outer fences at 3 × IQR; beyond an outer fence is an extreme outlier); R quantile(), type 7 (the default interpolation).
02
Worked example
Data: 12, 14, 14, 15, 16, 17, 18, 19, 45.
Q1 = 14, Q3 = 18, IQR = 4
fences: 14 − 6 = 8 and 18 + 6 = 24
45 is above 24, so it is an outlier, and it is also beyond the 3 × IQR line at 30. The mean is 18.89 with it and 15.625 without it, while the median moves only from 16 to 15.5.
03
What to do with an outlier
- Check for an error first: a typo, a unit mix-up or a failed measurement. Correct or remove those and say so.
- A real but unusual value should normally stay. Report results with and without it, or use a method that resists outliers, such as the median or a rank test.
- Decide the rule before looking at the results. Dropping points because they spoil the p value is not a defensible reason.
04
Common mistakes when looking for outliers
- Using mean ± 3 SD. The outlier inflates the SD it is judged by: in the example the SD is 10.03, so mean + 3 SD is 48.98 and 45 is not flagged at all. The IQR fence, at 24, is not moved by it.
- Deleting the point without saying so. Removing 45 drops the mean from 18.89 to 15.625, 17.3% lower, while the median moves only from 16 to 15.5.
- Missing a cluster. Add 46 and 47 to the example and none of the three high values is flagged: together they pull Q3 up to 32 and the upper fence to 58.25.
Trust
How this page is checked
- The calculation runs on code with automated tests against worked reference values. Every number in the examples on this page was produced by that same code, not typed by hand.
- The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
- Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.
Cite this page
Sciloom. (2026). Outlier calculator. Zebra Nine Studio Inc. https://sciloom.si/outlier-calculator
Frequently asked questions
What is the 1.5 IQR rule?
A value is an outlier if it lies more than 1.5 times the interquartile range below the first quartile or above the third quartile. It is the rule box plots use for their whiskers.
Why does another calculator give different fences?
There are several ways to compute quartiles. This page interpolates between values (Excel QUARTILE.INC, R type 7); the median-of-halves method taught in some courses can give slightly different quartiles for small samples.
How many numbers do I need?
At least four, so that the quartiles are defined. With very small samples the rule is unreliable: one unusual value changes the quartiles themselves.
What is Grubbs’ test?
A significance test for one outlier in roughly normal data. It divides the distance of the most extreme value from the mean by the standard deviation and compares the result, G, with a critical value that depends on the sample size. The calculator reports it next to the IQR rule.
Is the z score method better?
Flagging values more than 3 standard deviations from the mean works for large, roughly normal samples. In small samples the outlier inflates the standard deviation and can hide itself, so the IQR rule is the safer default.