Interquartile Range (IQR): How to Find It, With Examples
The interquartile range (IQR) measures how spread out the middle half of a data set is. Unlike the full range, it isn’t thrown off by one extreme value, which makes it a favourite for describing incomes, house prices and test scores.
Quick answer
- IQR = Q3 − Q1
- Q1 (first quartile) is the median of the lower half of the data; Q3 is the median of the upper half.
- The middle 50% of values lie between Q1 and Q3.
Step-by-step example
Data: 3, 7, 8, 5, 12, 14, 21, 13, 18, 9.
- First, sort the values: 3, 5, 7, 8, 9, 12, 13, 14, 18, 21.
- Then find the median (Q2): with 10 values, it’s the average of the 5th and 6th: (9 + 12) ÷ 2 = 10.5.
- Next, find Q1, the median of the lower half (3, 5, 7, 8, 9): 7.
- Then find Q3, the median of the upper half (12, 13, 14, 18, 21): 14.
- Finally, IQR = 14 − 7 = 7.
Odd number of values
With an odd count, the median is a single middle value. A common school method leaves it out of both halves. For 1, 3, 5, 7, 9, 11, 13, the median is 7, the lower half is 1, 3, 5 (Q1 = 3) and the upper half is 9, 11, 13 (Q3 = 11), so the IQR is 8. Other methods (including some spreadsheet functions) give slightly different quartiles, so state which you used.
Using the IQR to find outliers
A common rule flags values more than 1.5 × IQR below Q1 or above Q3. For the example: 1.5 × 7 = 10.5, so the fences are 7 − 10.5 = -3.5 and 14 + 10.5 = 24.5. No values fall outside, so there are no outliers.
IQR vs range vs standard deviation
| Measure | What it uses | Affected by outliers? |
|---|---|---|
| Range | Max − min | Very much |
| Interquartile range | Q3 − Q1 | Barely |
| Standard deviation | Every value | Yes |
See range in math and standard deviation.
In Excel or Google Sheets
=QUARTILE(A1:A10,3)-QUARTILE(A1:A10,1) gives the IQR. Excel also has QUARTILE.INC and QUARTILE.EXC, which use different methods and can give slightly different answers from the hand method.
Frequently asked questions
What is the interquartile range?
Q3 − Q1, the spread of the middle 50% of the data.
How do I find Q1 and Q3?
Sort the data, split it at the median, and find the median of each half.
Why use the IQR instead of the range?
It isn’t distorted by extreme values.
How do I use the IQR to find outliers?
Flag values more than 1.5 × IQR below Q1 or above Q3.
