How to calculate the IQR
The interquartile range (IQR) is the spread of the middle 50% of a data set: IQR = Q3 − Q1. Sort the values, split them at the median (excluding the median itself when the count is odd), then take the median of the lower half (Q1) and the upper half (Q3). For 1, 2, 3, 4, 5, 6, 7, 8 the lower half gives Q1 = 2.5 and the upper half gives Q3 = 6.5, so the IQR is 4. You need the first and third quartiles before you can subtract them, and the quartile calculator supplies both.
How to use this calculator
Enter at least two numbers and leave unused fields blank. The calculator sorts them, computes the quartiles, and shows the IQR with Q1 and Q3 in the badge. For the full spread instead, use the range calculator.
Why the IQR is useful
Because the IQR ignores the lowest and highest 25% of values, it resists outliers far better than the full range. It is also the basis for the 1.5 × IQR rule used to flag outliers in box plots. For the middle value alone, see the median calculator.
Frequently asked questions
- How do I find the interquartile range?
- Sort the data, find Q1 (median of the lower half) and Q3 (median of the upper half), then subtract: IQR = Q3 − Q1. For 1–8 the IQR is 4.
- What does the IQR tell me?
- It is the spread of the middle 50% of the data, which is robust to outliers.
- How are Q1 and Q3 found here?
- By the median-split method: split the sorted data at the median, then take the median of each half. The median value itself is excluded when the count is odd.
- How does IQR find outliers?
- A common rule flags values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR as outliers.
- Why does my software report a different Q1 than this tool?
- Because there are several accepted quartile definitions and they disagree on small samples. This tool uses the median-split (Tukey) method; Excel's QUARTILE and some statistics packages interpolate instead. The gap shrinks as the sample grows.