Omni Calculator logo

Upper Fence Calculator

Created by Luis Hoyos
Reviewed by Komal Rafay
Last updated: Jan 18, 2024


If you're searching for how to calculate the upper fence, the lower fence, and the outliers of your data set, this is the perfect tool.

Input your numbers, and the calculator will provide the following:

  • The lower and the upper fence;
  • The outliers; and
  • The calculation procedure

In the rest of this article, we explain how to find the upper and lower fences using their formulas.

In our lower and upper fence calculator, we get into a more comprehensive explanation.

How to calculate the upper fence and lower fence?

To calculate the upper and lower fences, you need three parameters:

  • The first quartile (Q);
  • The third quartile (Q); and
  • The interquartile range (IQR)

🙋 The interquartile range is the difference between the third and the first quartile: IQR = Q₃ - Q

🙋 In our quartile calculator, we explain how to find Q and Q

Once you know those parameters, the problem of how to find the upper fence and lower fence boils down to using two formulas:

Upper fence = Q₃ + 1.5 × IQR

The lower fence calculation is similar:

Lower fence = Q₁ ​− 1.5 × IQR

🙋 Using the 1.5 coefficient before IQR is the most common practice, but we can use other values (e.g., 2 or 3), depending on how dispersed we expect data to be. You can modify it in the calculator's advanced mode.

Now that we know how to find the upper fence and the lower fence let's look at the tricky part: obtaining Q and Q.

How to calculate the first and third quartiles

The tricky part about calculating the upper fence is finding the quartiles (Q₁ and Q₃). The procedure is as follows:

  1. Order your numbers in ascending order (our order from least to greatest calculator explains some algorithms for large data sets).
  2. Divide the ordered data set into two halves;
  3. The first quartile is the median of the first half, and the third quartile is that of the second (our median calculator explains how to obtain it).

If the number of elements is odd, the middle number marks the end of the first and the beginning of the second half (although there are various ways to deal with uneven amounts. Wikipedia lists four methods).

Example

Let's use the following ordered set:

0, 7, 11, 12, 13, 14, 15, 16, 22, 30, 39, 49, 51, 56, 62, 74, 92, 97 98, 99

First, divide the data set into two halves:

  • First half: 0, 7, 11, 12, 13, 14, 15, 16, 22, 30.
  • Second half: 39, 49, 51, 56, 62, 74, 92, 97, 98, 99.

The medians of the first and second halves are 13.5 and 68, respectively. Therefore:

  • Q₁ = 13.5; and
  • Q₃ = 68.

FAQ

How to find the upper fence and lower fence?

To find the lower and upper fence of a dataset:

  1. Obtain the first and third quartiles (Q1 and Q3, respectively).

  2. Find the interquartile range (IQR):

    IQR = Q3Q1

  3. Finally, calculate the upper and lower fences with the following formulas:

    Upper fence = Q3 + 1.5 × IQR
    Lower fence = Q1 ​− 1.5 × IQR

What is the relationship between quartiles and percentiles?

The relationship between the quartiles and percentiles is described by the following:

  • The first quartile (Q1) is the 25th percentile;
  • The third quartile (Q3) is the 75th percentile; and
  • The second quartile (Q2) is the 50th percentile (the median).
Luis Hoyos
Enter up to 50 numbers
#1
#2
Results
Too few values — try adding some!
Check out 44 similar descriptive statistics calculators 📊
5 number summary5★ rating averageCoefficient of variation… 41 more
People also viewed…

Mode

The mode calculator finds the modal value for your dataset.

Sampling distribution of the sample proportion

Use our sampling distribution of the sample proportion calculator to find the probability that your sample proportion falls within a range.

Secretary problem (Valentine's day)

Use the dating theory calculator to enhance your chances of picking the best lifetime partner.

Snowman

The perfect snowman calculator uses math & science rules to help you design the snowman of your dreams!
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service