Outlier calculator

This outlier calculator applies the interquartile range rule to a list of numbers. It reports the quartiles, the lower and upper fences, the values that fall outside them, and how much the mean changes when they are left out.

Your numbers are calculated in your browser and are not sent or stored.

Outliers

45

Lower fence
8
Upper fence
24
Q1, Q3
14, 18
Interquartile range
4
Median
16
Mean, all values
18.8889
Mean without outliers
15.625
Beyond 3 × IQR
45
Grubbs' test
45 is an outlier at 5% (G = 2.603, critical 2.215, p < 0.0001)

Grubbs' test checks the single most extreme value and assumes the rest of the data are roughly normal. The IQR rule makes no such assumption, so the two can disagree.

To report

1 outlier by the 1.5 × IQR rule (fences 8 and 24; Q1 = 14, Q3 = 18): 45

Check your result: every flagged value must lie outside the fences shown. In the example Q1 = 14 and Q3 = 18, so the fences are 8 and 24 and only 45 is flagged; count along the sorted list by hand to confirm Q1 and Q3.
fences in the worked example
8 and 24
fences in the worked example
drop in the mean when 45 is removed
17.3%
drop in the mean when 45 is removed
fence choices: 1.5, 2.2 and 3 × IQR
3
fence choices: 1.5, 2.2 and 3 × IQR
values needed at least
4
values needed at least
  • 1.5 × IQR rule, or 2.2 and 3
  • Lower and upper fences
  • Grubbs’ test for the extreme value
  • Mean with and without outliers
  • Runs in your browser, free

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).

8162445fencefenceoutlier
Quartiles, fences and an outlier. The box runs from the first quartile (14) to the third (18) with the median (16) marked inside. The fences sit 1.5 × IQR beyond the box, at 8 and 24; the whiskers stop at the last values inside them. The value 45 lies beyond the upper fence, so it is drawn on its own as an outlier.

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

Read the full methodology · Who makes Sciloom

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.

Want the full summary of the data? The mean, median, mode calculator gives it.
Free to start, no sign-up.
Back to the tool ↑

More research tools