Skip to content
FiftyCalc Free calculators for all 50 states

Upper and Lower Fence Calculator

Test cases replayed : 3 of 3 match · Methodology · No outside source listed

Enter the first and third quartiles of your data to get the fences beyond which values count as outliers.

Result

Sample figures

Lower fence—

Upper fence —

  • Interquartile range (Q3 − Q1)—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Upper and Lower Fence Calculator

First quartile (Q1): enter a number. Prefilled example: 10.

Third quartile (Q3): enter a number. Prefilled example: 20.

Fence multiplier: choose 1.5 × IQR (inner fences, outliers) or 3 × IQR (outer fences, extreme outliers). Prefilled example: 1.5 × IQR (inner fences, outliers).

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. First quartile (Q1): enter a number.
  2. Third quartile (Q3): enter a number.
  3. Fence multiplier: choose 1.5 × IQR (inner fences, outliers) or 3 × IQR (outer fences, extreme outliers).
  4. Read the result: Lower fence; the panel also shows Interquartile range (Q3 − Q1) and Upper fence.

How this calculator works

IQR = Q3 − Q1. Lower fence = Q1 − 1.5 × IQR; upper fence = Q3 + 1.5 × IQR. Values outside the fences are outliers in Tukey's rule (Exploratory Data Analysis, 1977); with 3 × IQR, the outer fences flag extreme outliers.

Quartiles can be computed in several ways, so different software may give slightly different fences for the same data.

The formula

  1. Iqr=q3−q1
  2. L=q1−k×Iqr
Symbols used in the formula
SymbolMeaning
q1First quartile (Q1)
q3Third quartile (Q3)
kFence multiplier
IqrInterquartile range (Q3 − Q1)
LLower fence

Worked example

First quartile (Q1)10
Third quartile (Q3)20
Fence multiplier1.5 × IQR (inner fences, outliers)
Interquartile range (Q3 − Q1)10
Upper fence35
  1. Iqr=20−10=10
  2. L=10−1.5×10=−5

Lower fence -5

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What are the fences for Q1 = 10 and Q3 = 20?

IQR = 10, so the lower fence is −5 and the upper fence is 35.

Is a value exactly on a fence an outlier?

No. Only values strictly below the lower fence or above the upper fence are outliers.

Questions answered

Related calculators