Overview

Tukey's fences mark the boundaries outside which a value is a possible outlier. This gives both fences at once, using the same rule box plots use.

Enter your values in any order.

Worked examples

InputsResult
Your numbers12, 16, 14, 21, 19Lower fence: 6.5Upper fence: 26.5IQR: 5
Show 2 more examples
Your numbers5, 7, 8, 12, 30Lower fence: -0.5Upper fence: 19.5IQR: 5
Your numbers100, 110, 120, 125, 140Lower fence: 87.5Upper fence: 147.5IQR: 15

How it works

Sort the data and find the first and third quartiles. The interquartile range, IQR, is their difference. The lower fence is 1.5 IQRs below Q1 and the upper fence is 1.5 IQRs above Q3. Quartiles use linear interpolation, as in Excel's QUARTILE.INC, so other methods may give slightly different fences.

The formula

Lower = Q1 − 1.5 × IQR, upper = Q3 + 1.5 × IQR
Q1, Q3The 25th and 75th percentiles
IQRQ3 − Q1

Practical tips

  • For 12, 14, 16, 19 and 21, the fences are 6.5 and 26.5, so none of the values is an outlier.
  • Check a value outside the fences before removing it. It may be a typo or a real extreme.
  • Tukey also used 3 × IQR for 'far out' values.

Frequently asked questions

Why 1.5?

It's Tukey's practical choice. For normal data, about 0.7% of values fall outside these fences.

Can the lower fence be negative?

Yes, even if your data can't be. That simply means no low outliers are possible.

Is this the same as a box plot's whiskers?

The whiskers stop at the furthest values inside the fences.