Home · Statistics · Descriptive Statistics · Upper and Lower Fence Calculator
Upper and Lower Fence Calculator
Both box-plot fences at once: the lower fence Q1 − 1.5·IQR and the upper fence Q3 + 1.5·IQR.
What this calculator does
Both box-plot fences at once: the lower fence Q1 − 1.5·IQR and the upper fence Q3 + 1.5·IQR. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.
The formula and method
The headline result is the upper fence; the lower fence is reported alongside it.
Any value outside the interval between the fences is flagged as a potential outlier.
Percentiles and quartiles use linear interpolation (the R-7 method), the numpy.percentile default.
Worked example
With the example inputs this page opens with, the result is 13.63. Change any figure and the result updates with the same formula.
Quick reference
| Figure | Value |
|---|---|
| Result | 13.63 |
| Count (n) | 10 |
| Mean | 6 |
| Median | 6.5 |
| Lower fence (Q1 - 1.5 IQR) | -1.375 |
| Upper fence (Q3 + 1.5 IQR) | 13.625 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
Which fence matters more?
Whichever side your data can stray on — right-skewed measurements usually breach the upper fence first.
Do the fences depend on the mean or standard deviation?
No. They are built purely from quartiles, which is why they stay stable when extreme values are present.
How does the Upper and Lower Fence Calculator work?
Both box-plot fences at once: the lower fence Q1 − 1.5·IQR and the upper fence Q3 + 1.5·IQR. Data values → Upper fence (primary) · Lower fence. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Upper and Lower Fence Calculator need?
Data values → Upper fence (primary) · Lower fence. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.