Outlier Fence Calculator (IQR Method)
Tukey's fence method uses the interquartile range (IQR) to identify potential outliers without assuming the data follows any particular distribution. The inner fences are Q1 minus 1.5 times IQR and Q3 plus 1.5 times IQR; values outside these are mild outliers. The outer fences are Q1 minus 3 times IQR and Q3 plus 3 times IQR; values beyond these are extreme outliers. This method is used in box plots and exploratory data analysis. Enter a comma-separated list of numbers to compute the fences and identify which values fall outside them.
Tukey fence formula
IQR = Q3 - Q1
Inner lower = Q1 - 1.5 × IQR
Inner upper = Q3 + 1.5 × IQR
Outer lower = Q1 - 3.0 × IQR
Outer upper = Q3 + 3.0 × IQR
Values outside the inner fences are mild outliers. Values outside the outer fences are extreme outliers. These fences define the whiskers of Tukey's box plot.
Using outlier fences in practice
- For normally distributed data, the inner fences capture approximately 99.3% of observations, so about 0.7% of non-outlier data are falsely flagged.
- The IQR method is more robust to skewed distributions than z-score methods, which assume normality.
- Box plots visually show fences as whiskers; values beyond are plotted as individual points.
- Before discarding outliers, check for data entry errors, instrument malfunctions, or genuinely extreme but valid observations.
Frequently asked questions
What is the IQR method for outlier detection?
The interquartile range (IQR) method, introduced by John Tukey, defines outlier fences as Q1 minus 1.5 times IQR (inner lower fence) and Q3 plus 1.5 times IQR (inner upper fence). Values outside these fences are potential outliers. Values beyond Q1 minus 3 times IQR or Q3 plus 3 times IQR are extreme outliers.
What is the IQR?
The interquartile range (IQR) is the difference between the third quartile (Q3, the 75th percentile) and the first quartile (Q1, the 25th percentile). It measures the spread of the middle 50% of the data and is resistant to outliers, unlike the range or standard deviation.
What is the difference between mild and extreme outliers?
Mild outliers fall between the inner and outer fences (between 1.5 and 3 times IQR from the quartiles). Extreme outliers fall beyond the outer fences (more than 3 times IQR from the quartiles). Extreme outliers are more likely to be data errors or fundamentally different observations.
Should I always remove outliers?
No. Outliers should be investigated, not automatically removed. An outlier might be a genuine extreme value, a data entry error, or a member of a different population. Always examine the context before deciding whether to include, exclude, or transform outliers.
How are quartiles calculated here?
This calculator uses the inclusive quartile method (method 2 in some classifications): Q1 is the median of the lower half and Q3 is the median of the upper half, including the overall median in both halves when n is odd. Other methods may give slightly different quartile values.
Official sources
- NIST/SEMATECH e-Handbook of Statistical Methods: Box Plot.
- NIST/SEMATECH e-Handbook: Engineering Statistics Handbook.
Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.