Interquartile Range (IQR) Calculator
Enter your dataset to compute quartiles, IQR, and outlier fences.
Q1: 17.2500
Median (Q2): 22.5000
Q3: 27.7500
IQR: 10.5000
Lower fence: 1.5000
Upper fence: 43.5000
Count: 8
How to Use This Calculator
- Input numeric data separated by spaces or commas.
- Review Q1, median, Q3, and IQR.
- Use fences to flag potential outliers.
- Apply findings to box plots or spread comparisons.
Formula
IQR = Q3 − Q1
Lower fence = Q1 − 1.5 × IQR
Upper fence = Q3 + 1.5 × IQR
Quartiles computed via linear interpolation at positions (n − 1) × 0.25, 0.5, 0.75.
Tukey fences highlight potential outliers beyond 1.5 IQR units from the quartiles.
Full Description
The interquartile range captures the spread of the middle 50% of data, reducing sensitivity to outliers compared with total range. It is a cornerstone of exploratory data analysis and box plot construction.
Use IQR to compare dispersion across datasets or to define robust thresholds for detecting anomalies.
Frequently Asked Questions
Do fences guarantee outliers?
No. Fences are guidelines; investigate flagged points further using context and domain knowledge.
Can I use IQR for skewed data?
Yes. IQR is robust to skewness and provides meaningful spread information even when distributions are asymmetric.
How many observations do I need?
At least four values produce non-zero IQR; more data yield more reliable quartiles.
Why is IQR preferred over standard deviation?
IQR ignores extreme values, making it more robust when outliers or heavy tails are present.