HomeGlossaryInterquartile Range

Interquartile Range

General

Interquartile 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.

Frequently Asked Questions

The range is the difference between the maximum and minimum values in a dataset, which makes it extremely sensitive to outliers. The interquartile range only considers the middle 50% of the data (between the first and third quartiles), so it stays stable even when a dataset contains extreme values.
The 1.5 × IQR rule flags any value below Q1 − 1.5×IQR or above Q3 + 1.5×IQR as a potential outlier. This rule is widely used in box plots, where such values are typically plotted as individual points outside the box's "whiskers."
Q1 (the first quartile) is the median of the lower half of a sorted dataset, and Q3 (the third quartile) is the median of the upper half. Equivalently, Q1 is the 25th percentile and Q3 is the 75th percentile of the full dataset.
The IQR is called "robust" because it isn't affected by extreme values or outliers the way the range or standard deviation can be — since it only looks at the middle 50% of sorted data, a handful of unusually large or small values at the extremes have no effect on it at all.
A small IQR indicates that the middle 50% of the data is tightly clustered around the median, suggesting low variability in the central portion of the dataset. A large IQR indicates the middle half of the data is more spread out.