What is the Upper and Lower Fence Calculator and how does it work?

The Upper and Lower Fence Calculator is a tool used to determine the boundaries of a set of data. It is commonly used in statistics to determine the outliers in a data set. The Upper Fence is the highest value that is considered normal in a data set, while the Lower Fence is the lowest value that is considered normal. The calculator works by first finding the median of the data set, and then calculating the interquartile range (IQR) by subtracting the first quartile from the third quartile. The Upper Fence is then calculated by adding 1.5 times the IQR to the third quartile, while the Lower Fence is calculated by subtracting 1.5 times the IQR from the first quartile. Any data points that fall outside of these boundaries are considered outliers. This tool is useful in identifying extreme values that may skew the overall analysis of the data.

Upper and Lower Fence Calculator (With Explanation)

@import url(‘https://fonts.googleapis.com/css?family=Droid+Serif|Raleway’);

h1 {
text-align: center;
font-size: 50px;
margin-bottom: 0px;
font-family: ‘Raleway’, serif;
}

p {
color: black;
margin-bottom: 15px;
margin-top: 15px;
font-family: ‘Raleway’, sans-serif;
}

#words {
padding-left: 30px;
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
}

#words_summary {
padding-left: 70px;
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
}

#words_text {
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
}

#words_text_area {
display:inline-block;
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
padding-left: 100px;
}

#calcTitle {
text-align: center;
font-size: 20px;
margin-bottom: 0px;
font-family: ‘Raleway’, serif;
}

#hr_top {
width: 30%;
margin-bottom: 0px;
border: none;
height: 2px;
color: black;
background-color: black;
}

#hr_bottom {
width: 30%;
margin-top: 15px;
border: none;
height: 2px;
color: black;
background-color: black;
}

#words_table label, #words_table input {
display: inline-block;
vertical-align: baseline;
width: 350px;
}

#buttonCalc {
border: 1px solid;
border-radius: 10px;
margin-top: 20px;

cursor: pointer;
outline: none;
background-color: white;
color: black;
font-family: ‘Work Sans’, sans-serif;
border: 1px solid grey;
/* Green */
}

#buttonCalc:hover {
background-color: #f6f6f6;
border: 1px solid black;
}

#words_table {
color: black;
font-family: Raleway;
max-width: 350px;
margin: 25px auto;
line-height: 1.75;
}

#summary_table {
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
padding-left: 20px;
}

.label_radio {
text-align: center;
}

td, tr, th {
border: 1px solid black;
}
table {
border-collapse: collapse;
}
td, th {
min-width: 50px;
height: 21px;
}
.label_radio {
text-align: center;
}

#text_area_input {
padding-left: 35%;
float: left;
}

svg:not(:root) {
overflow: visible;
}

In statistics, the upper and lower fences represent the cut-off values for upper and lower outliers in a dataset. They are calculated as:

  • Upper fence = Q3 + (1.5*IQR)
  • Lower fence = Q1 – (1.5*IQR)

where IQR stands for “interquartile range” and represents the difference between the 75th percentile and 25th percentile in a dataset.

This calculator finds the upper and lower fences for a given dataset.

Simply enter a list of comma-separated values for the dataset in the box below, then click the “Calculate” button:

Values:

Q1 (First Quartile) = 14.00

Q3 (Third Quartile) = 36.00

IQR (Interquartile Range) = 22.00

Lower Fence = 14.00 – (1.5*22.00) = -19.00

Lower Fence = 36.00 + (1.5*22.00) = 69.00

function calc() {

//get input data
var x= document.getElementById(‘x’).value.split(‘,’).map(Number);

//calculate stuff
var _median = math.median(x)
var _firstHalf = x.filter(function(f){ return f _median })

var Q1 = math.median(_firstHalf);
var Q3 = math.median(_secondHalf);
var IQR = Q3 – Q1;

var lower = Q1 – (1.5*IQR);
var upper = Q3 -(-1*1.5*IQR);

//output stuff
document.getElementById(‘Q1’).innerHTML = Q1.toFixed(2);
document.getElementById(‘Q3’).innerHTML = Q3.toFixed(2);
document.getElementById(‘IQR’).innerHTML = IQR.toFixed(2);
document.getElementById(‘lower’).innerHTML = lower.toFixed(2);
document.getElementById(‘upper’).innerHTML = upper.toFixed(2);

document.getElementById(‘Q1_out’).innerHTML = Q1.toFixed(2);
document.getElementById(‘IQR_out1’).innerHTML = IQR.toFixed(2);
document.getElementById(‘Q3_out’).innerHTML = Q3.toFixed(2);
document.getElementById(‘IQR_out2’).innerHTML = IQR.toFixed(2);

} //end calc function

x