Overview

The upper fence is the cutoff above which a value counts as a possible outlier in Tukey's method, the same rule box plots use. This finds it from your values.

Enter your numbers in any order. Anything above the fence deserves a closer look.

Worked examples

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

How it works

Sort the values and find the first and third quartiles, Q1 and Q3. The interquartile range, IQR, is the gap between them. The upper fence sits 1.5 IQRs above Q3. Quartiles here use linear interpolation, the method behind Excel's QUARTILE.INC, so other methods can give slightly different fences.

The formula

Upper fence = Q3 + 1.5 × IQR
Q3The 75th percentile
IQRQ3 − Q1, the spread of the middle half

Common mistakes

  • Using the range instead of IQR.
  • Treating every outlier as an error.
  • Mixing quartile methods without noting the method used.

Practical tips

  • For 12, 14, 16, 19 and 21, Q1 is 14, Q3 is 19 and the IQR is 5, so the upper fence is 26.5.
  • Don't delete a value just because it's over the fence. Check first whether it is an error or a real extreme.
  • A small sample gives a rough result, so treat it as a quick guide.

Frequently asked questions

What does upper fence mean in statistics?

It is a high-end outlier cutoff based on quartiles and the interquartile range.

What is the lower fence?

The lower fence is Q1 - 1.5 x IQR.

Are values above the upper fence always wrong?

No. They are unusual under the IQR rule, but they can be valid observations.

Why 1.5?

John Tukey chose it as a practical rule. For normally distributed data, only about 0.7% of values fall outside the fences.

What is a far-out value?

Tukey's stricter fence uses 3 × IQR. Values beyond it are extreme outliers.