Calculates the interquartile range (IQR) — a measure of statistical spread that resists distortion from extreme values, unlike the simple min-to-max range.
How it works
The dataset is sorted and split into a lower and upper half; the median of each half gives the first and third quartiles, and their difference is the IQR.
What this does not include
This does not include flagging which specific values count as outliers — for that, use this site’s outlier calculator instead, which applies the IQR to individual data points.
How to use this calculator
- Enter your dataset as comma-separated numbers.
A worked example
Dataset 7, 15, 36, 39, 40, 41 (sorted, 6 values): lower half is 7, 15, 36 → Q1 = 15. Upper half is 39, 40, 41 → Q3 = 40. IQR = 40 − 15 = 25.
Dataset 2, 4, 4, 4, 5, 5, 7, 9 (8 values): Q1 = 4, Q3 = 6, IQR = 2.
What the variables mean
| Term | Meaning |
|---|---|
| Q1 | Median of the sorted data’s lower half |
| Q3 | Median of the sorted data’s upper half |
| IQR | Q3 − Q1 — the spread of the middle 50% |
Edge cases worth knowing
With an odd number of values, the overall median is excluded from both halves before finding Q1 and Q3 — the “exclusive” method this calculator uses, the most commonly taught convention.
An IQR of zero means the middle 50% of the data are identical values — a tightly clustered dataset regardless of what the outer values look like.
Frequently asked questions
Why use IQR instead of standard deviation?
IQR describes the middle 50% of the data without being pulled by extreme outliers the way standard deviation can be, making it a more robust measure of spread for skewed data.
What are Q1 and Q3?
Q1 (the first quartile) is the median of the lower half of the sorted data; Q3 (the third quartile) is the median of the upper half — together they bracket the middle 50% of values.
Which quartile method does this use?
The exclusive-median method, the most commonly taught convention, which excludes the overall median from both halves when the dataset has an odd number of values.