Calculators
Home › Calculators › Fence Calculator

Lower and Upper Fence Calculator

The boundaries of ordinary: where box-plot whiskers end and outliers begin.

Calculate the fences

Both fences, the quartiles behind them, and any flagged values.

Quick answer: Lower fence = Q1 − 1.5×IQR; upper fence = Q3 + 1.5×IQR. Values outside the fences are flagged as outliers.

How to use this fence calculator

Paste your dataset above and press Calculate. Both fences appear with Q1, Q3 and the IQR they were built from, plus every value your data has outside them.

What are the lower and upper fences?

The fences are the boundaries of "ordinary" in exploratory data analysis. Tukey's rule stretches the interquartile range by 1.5 in both directions: the lower fence is Q1 − 1.5×IQR and the upper fence is Q3 + 1.5×IQR. Values inside the fences are unremarkable; values outside get flagged as outliers. Box plots draw their whiskers to the furthest values still inside the fences. Now you know where those whiskers come from.

Lower fence = Q1 − 1.5 × IQR  ·  Upper fence = Q3 + 1.5 × IQR
Worked example

Delivery times: 32, 35, 30, 33, 31, 34, 33, 32, 95. With Q1 = 32, Q3 = 34 and IQR = 2, the fences are 32 − 3 = 29 and 34 + 3 = 37. The 95-minute delivery sits far beyond the upper fence, flagged, investigated (a flooded road), and reported rather than deleted.

Inner fences, outer fences

The 1.5×IQR fences are the inner fences. Stretching by 3×IQR instead gives the outer fences: values beyond those are sometimes labelled "far outliers" or extremes, and deserve even more scrutiny. Most software flags inner-fence violations by default; know which pair you are looking at before quoting a count of outliers.

Frequently asked questions

What is the difference between inner and outer fences?

Inner fences use 1.5×IQR beyond the quartiles; outer fences use 3×IQR. Values beyond the outer fences are extreme outliers.

Do fences work for skewed data?

They work mechanically, but strong skew flags many legitimate values on the long-tail side. For very skewed data, interpret flags cautiously or transform the data first.

Are fences the same as the box plot whiskers?

Nearly: whiskers extend to the most extreme values still inside the fences, and points beyond are drawn individually. The fences themselves are the invisible limits behind the whiskers.