gizmobench

Outlier Calculator

Use the interquartile rule to identify values below the lower fence or above the upper fence. The tool shows Q1, Q3, IQR and both fences beside the flagged values.

8 valuesMedian of halvesOutlier fences1.5 x IQR fences
convention     median of halves, odd centre excluded
data sorted    1  2  3  4  |  5  6  7  100
method         Q1 is the median of the lower 4, Q3 the median of the upper 4.

Q1 2.5    Q3 6.5    IQR 4
lower fence    2.5 - 1.5 x 4  =  -3.5
upper fence    6.5 + 1.5 x 4  =  12.5

outside        100 (above)
               1 of 8 values, listed here and kept in every figure above

same data under R7 linear interpolation at (n - 1)p
Q1 2.75    Q3 6.25    IQR 3.5
1100
IQR
4
Lower fence
-3.5
Upper fence
12.5
Outside the fences
1 of 8

Box plot on an axis from 1 to 100. Whisker at 1, box from 2.5 to 6.5 with the median at 4.5, whisker at 7. 1 value is outside the fences and drawn as a point: 100.

Quartile convention
What to put first

The 1.5 x IQR fences and every observation outside them, listed and kept in the data.

Under median of halves, odd centre excluded, the fences are -3.5 and 12.5, and 1 of the 8 values sits outside them: 100 (above). It stays in the data.

Commas, spaces, tabs, semicolons and new lines all separate values, so a column copied from a spreadsheet pastes straight in, and up to 10,000 values are read at a time. Figures on screen are rounded to six decimal places; the arithmetic itself keeps full double precision. Nothing you type leaves this browser.

Worked examples

  • 1 to 8, median of halveseven count, halves are clean
    Q1 2.5, median 4.5, Q3 6.5, IQR 4
  • Same data under R7linear interpolation
    Q1 2.75, median 4.5, Q3 6.25, IQR 3.5
  • 1, 2, 3, 4, 5, 6, 7, 100the fences decide
    Fences -3.5 and 12.5: 100 listed outside, kept in the data

Where the conventions disagree

The same 8 values under all four conventions. They agree on the median, always. Where they differ, it is on Q1 and Q3.

Q1, median, Q3 and IQR under each quartile convention
ConventionQ1MedianQ3IQR
Median of halves (on screen)2.54.56.54
Tukey hinges2.54.56.54
R7 interpolation2.754.56.253.5
R6 interpolation2.254.56.754.5
The convention on screen. Split the sorted data at the median, then take the median of each half. When the count is odd the middle value goes in neither half. Moore and McCabe, the TI-83 and TI-84, and most school textbooks.
Why two calculators disagree. On 1, 2, 3, 4, 5, 6, 7, 8 the median of halves gives Q1 and Q3 of 2.5 and 6.5, an IQR of 4, while R7 interpolation gives 2.75 and 6.25 and an IQR of 3.5. Both are right under the convention that produced them, so the one to use is the one your course, your journal or your software uses. The table above shows all four on your own numbers.
Accuracy. Exact arithmetic under the quantile convention you pick, and the page names which convention produced the numbers on screen, because median of halves and R7 genuinely disagree on the same eight values. Observations outside the 1.5 x IQR fences are listed and never deleted, and the page does not call them mistakes.

Common questions

What rule identifies an outlier here?
The lower fence is Q1 - 1.5 times IQR and the upper fence is Q3 + 1.5 times IQR. Values outside those fences are listed as outliers.

Exact arithmetic under the quantile convention you pick, and the page names which convention produced the numbers on screen, because median of halves and R7 genuinely disagree on the same eight values. Observations outside the 1.5 x IQR fences are listed and never deleted, and the page does not call them mistakes.