Interquartile Range
GeneralInterquartile Range (IQR)
The range between the first quartile (Q1) and third quartile (Q3) of a dataset, representing the middle 50% of values and commonly used to detect outliers.
Definition
The interquartile range (IQR) is the range between the first quartile (Q1) and the third quartile (Q3) of a sorted dataset, representing the spread of the middle 50% of values. Because Q1 is simply the 25th Percentile and Q3 is the 75th percentile, the IQR captures the central bulk of a distribution while deliberately excluding the most extreme quarter on either end. It's calculated directly using the Interquartile Range Calculator.
Unlike the full range (maximum minus minimum), which can be distorted by a single unusually high or low data point, the IQR is a robust measure of spread that stays stable even when a dataset contains outliers. This robustness is exactly why the IQR is the basis for one of the most common outlier-detection methods in statistics — any value that falls more than 1.5 times the IQR below Q1 or above Q3 is typically flagged as a potential outlier, a rule visualized directly in box-and-whisker plots.
Formula
IQR = Q3 − Q1
The 1.5×IQR outlier detection rule:
Lower bound = Q1 − 1.5 × IQR Upper bound = Q3 + 1.5 × IQR
Any value outside these bounds is flagged as a potential outlier.
Worked Example
Consider the sorted dataset: 12, 15, 18, 20, 22, 25, 28, 30, 95
The lower half (excluding the median 22) is 12, 15, 18, 20 → Q1 (median of lower half) = (15 + 18) ÷ 2 = 16.5
The upper half is 25, 28, 30, 95 → Q3 (median of upper half) = (28 + 30) ÷ 2 = 29
IQR = 29 − 16.5 = 12.5
Upper bound = 29 + 1.5 × 12.5 = 29 + 18.75 = 47.75
Since 95 exceeds the upper bound of 47.75, it is flagged as a statistical outlier — consistent with it being far removed from the rest of the dataset.
Key Things to Know
- Measures the middle 50%: the IQR spans from the first quartile to the third quartile, deliberately excluding the lowest and highest 25% of the data.
- Built from Percentile values: Q1 and Q3 are simply the 25th and 75th percentiles, making the IQR a percentile-based measure of spread.
- Robust against outliers: because extreme values fall outside the middle 50%, they have no effect on the IQR — unlike the full range or standard deviation.
- Basis for the 1.5×IQR outlier rule: this rule underlies the whiskers on standard box plots and is one of the most widely used outlier detection heuristics in exploratory data analysis.
- A small IQR signals tight clustering: it indicates the central half of the data is close together, while a large IQR signals more spread in the data's core.
Related Terms
Frequently Asked Questions