Calculate both inner and outer fences for outlier detection. Shows box plot with dual fence boundaries, five-number summary, data classification, and distribution shape analysis.
The Upper & Lower Fence Calculator provides complete dual-fence outlier analysis using the IQR method. Unlike a simple upper-fence calculator, this tool shows both inner fences (k × IQR, typically 1.5) and outer fences (3 × IQR), classifying every value into five zones: below outer, between outer and inner (low), normal, between inner and outer (high), and above outer.
The box plot visualization shows all four fence boundaries alongside the traditional box-and-whisker elements. Mild outliers (between inner and outer fences) deserve investigation — they might be unusual but legitimate. Extreme outliers (beyond outer fences) almost always indicate errors, contamination, or truly extraordinary observations.
The distribution shape analysis adds context: skewness reveals asymmetry that affects fence placement, while the fence symmetry ratio shows whether the upper and lower fences are equidistant from the median. Asymmetric fences are normal for skewed data and don't indicate a problem. Check the example with realistic values before reporting.
This calculator provides the complete IQR-based outlier analysis that researchers and analysts need. The dual-fence system distinguishes between "somewhat unusual" and "extremely unusual" values, supporting more nuanced decisions than a single boundary.
The box plot with both fence types, the five-number summary, and the distribution shape metrics give you everything needed for a thorough univariate data exploration. The ability to switch between viewing all data and only outliers makes it easy to focus on the values that matter.
Inner Fences: Q₃ + k×IQR (upper), Q₁ − k×IQR (lower). Outer Fences: Q₃ + 3×IQR (upper), Q₁ − 3×IQR (lower). IQR = Q₃ − Q₁. Default k = 1.5.
Result: Inner: [38.13, 121.13], Outer: [6.88, 152.38], IQR = 20.75, 0 outliers
Q₁ = 69.25, Q₃ = 90, IQR = 20.75. Inner fences: 69.25 − 31.125 = 38.13 and 90 + 31.125 = 121.13. Outer: 69.25 − 62.25 = 6.88 and 90 + 62.25 = 152.38. All values fall within the inner fences.
The two-tier fence system maps to practical categories in most fields. In manufacturing, inner-fence outliers might trigger an investigation, while outer-fence outliers trigger a production stop. In clinical research, inner-fence values might be flagged for data verification, while outer-fence values are checked against medical records for plausibility.
The complete fence system creates five zones: extreme low (below outer fence), mild low (between lower fences), normal (within inner fences), mild high (between upper fences), and extreme high (above outer fence). This five-zone classification provides more information than binary outlier/not-outlier systems.
For normally distributed data, the z-score method (|z| > 2 or 3) is equivalent. The MAD (median absolute deviation) method replaces both mean and standard deviation with robust alternatives. For multivariate data, the Mahalanobis distance generalizes outlier detection to multiple dimensions. Each method has strengths; the IQR approach remains popular for its simplicity and robustness.
Inner fences (Q ± 1.5×IQR) identify mild outliers worth investigating. Outer fences (Q ± 3×IQR) identify extreme outliers that almost certainly represent errors or extraordinary events. The two-tier system provides a nuanced classification.
Data can have outliers on both sides. A dataset of incomes might have extreme high values but no low outliers. Temperature data might have outliers on both sides. Showing both fences gives a complete picture of potential outliers.
When the ratio of upper-to-lower fence distances from the median is near 1.0, the distribution is approximately symmetric. A ratio far from 1.0 indicates skewness — the fences extend farther on one side because Q3 is farther from the median than Q1 (or vice versa).
The IQR method works with as few as 4 values, but results are more reliable with 20+. With very small n, quartile estimates are unstable and a single value can dramatically shift the fences. Consider this when interpreting results for n < 10.
For normally distributed data, the inner fences (k=1.5) fall at approximately ±2.7σ, and outer fences fall at ±4.7σ. The calculator shows the z-score equivalent of each fence relative to the mean, which helps compare IQR-based and z-score-based outlier methods.
It depends on your context. For data cleaning, outer fences (extreme outliers) are safer to flag for removal. For exploratory analysis, inner fences help identify interesting observations. Never automatically remove — always investigate first.