# Upper Fence Calculator

Created by Luis Hoyos
Reviewed by Komal Rafay
Last updated: Jun 05, 2023

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 ).

#### 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!
People also viewed…

### Coefficient of variation

The coefficient of variation calculator is a convenient way to describe the standard deviation as a percentage of the mean.

### Lognormal distribution

Our lognormal distribution calculator helps you solve problems regarding probabilities, quantiles, samples, etc. from the lognormal distribution.

### Millionaire

This millionaire calculator will help you determine how long it will take for you to reach a 7-figure saving or any financial goal you have. You can use this calculator even if you are just starting to save or even if you already have savings.

### Plastic footprint

Find out how much plastic you use throughout the year with this plastic footprint calculator. Rethink your habits, reduce your plastic waste, and make your life a little greener.