Math & Statistics
Interquartile Range and Fence Calculator
Calculate IQR, lower and upper Tukey fences, observation-to-fence distances, median position inside the IQR, and the complete central-width reconciliation. The page explains why fences are review rules rather than automatic outlier verdicts.
Decision view
Box plot with Tukey fences and observations
| Fence multiplier | Interquartile range | Lower Tukey fence | Upper Tukey fence | Low observation minus lower fence | Upper observation minus upper fence | Median position within IQR | Q3 minus Q1 |
|---|
How to use Interquartile Range and Fence Calculator
- Enter Q1, median, and Q3 from one stated quartile algorithm.
- Confirm Q1 is no greater than the median and the median is no greater than Q3.
- Choose the fence multiplier required by the analysis.
- Compare observations with fences as review signals, not automatic deletion rules.
Calculator guide
Understanding Interquartile Range and Fence Calculator
The interquartile range measures the width of the middle half of an ordered dataset. This calculator extends that width into Tukey-style fences and places entered low and high observations against the box, median, and fence positions.
Calculation method
How the calculation works
Detailed calculation process
Build the central box and Tukey fences
The default quartiles define a 15-unit central box, while the 1.5 multiplier extends the review limits beyond both quartiles.
What each symbol means
Worked substitution with the default inputs
The defaults give IQR = 15, fences at 1.5 and 61.5, and both entered observations inside the fence interval.
Distribution audit
Read the box, whiskers, and observations separately
Each part of the diagram answers a different distribution question.
Worked situations
Practical examples
- Q1 = 24 and Q3 = 39 produce an IQR of 15.
- At k = 1.5, the upper fence is 61.5, so an entered value of 61 is still inside.
- Increasing k widens both fences while leaving the IQR unchanged.
Better inputs
Useful tips
- Record the quartile algorithm because small samples can produce different Q1 and Q3 values.
- Inspect flagged observations for context, unit errors, and genuine rare cases.
- Report quartiles and fences with the original measurement units.
Before relying on the result
Limitations and common mistakes
- Quartile definitions differ across software and sample sizes.
- A Tukey fence is not a probabilistic test and does not prove an observation is erroneous.
- Entered quartiles without ordering validation can produce a negative or incoherent IQR.
Reference
Key terms
- Interquartile range
- Q3 minus Q1, representing the middle-half width.
- Tukey fence
- Quartile plus or minus a selected multiple of IQR.
- Median position
- Median's relative location from Q1 to Q3.
- Flagged observation
- Observation beyond a selected fence and therefore marked for review.
Important note
Calculated directly from the entered values using the displayed formula and rounding settings.
Frequently asked questions
Is every value outside a fence an outlier?
It is a Tukey-fence flag for review, not proof of error or an instruction to remove the value.
Why can quartile software disagree?
Several valid interpolation and rank conventions exist, especially for small datasets.
What happens when Q1 equals Q3?
IQR becomes zero and both fences collapse to the quartile value, so the distribution and data quality need careful review.
Does the median have to be halfway between Q1 and Q3?
No. Its relative position can reveal asymmetry within the central half.