IQR Calculator
Paste your numbers to get Q1, the median, Q3, the interquartile range, any outliers by the 1.5 × IQR rule, and a box and whisker plot.
How to calculate the interquartile range
IQR = Q3 − Q1, the spread of the middle half of the data.
- Sort the data from smallest to largest.
- Find the median (Q2).
- Split the data into a lower half and an upper half. With an odd count, leave the median out of both halves.
- Q1 is the median of the lower half; Q3 is the median of the upper half.
- Subtract: IQR = Q3 − Q1.
Example: 3, 7, 8, 5, 12, 14, 21, 13, 18, 45
Sorted: 3, 5, 7, 8, 12, 13, 14, 18, 21, 45. The median is (12 + 13) ÷ 2 = 12.5. The lower half is 3, 5, 7, 8, 12, so Q1 = 7; the upper half is 13, 14, 18, 21, 45, so Q3 = 18. IQR = 18 − 7 = 11.
Five-number summary
The five-number summary is minimum, Q1, median, Q3, maximum. For the example: 3, 7, 12.5, 18, 45. It’s exactly what a box plot draws.
How to find outliers with the 1.5 × IQR rule
| Fence | Formula | Example |
|---|---|---|
| Lower fence | Q1 − 1.5 × IQR | 7 − 16.5 = −9.5 |
| Upper fence | Q3 + 1.5 × IQR | 18 + 16.5 = 34.5 |
Any value outside the fences is an outlier, so 45 is an outlier here. Some books also call values beyond 3 × IQR “extreme” outliers; the calculator flags those separately. An outlier isn’t automatically an error: check it, but don’t delete it just because it’s far out.
Box and whisker plot
The box runs from Q1 to Q3 with a line at the median. The whiskers reach the smallest and largest values that are still inside the fences, and outliers are drawn as separate dots. In the example the right whisker stops at 21 and 45 appears as a dot.
A long right whisker or a median near the left of the box means the data is skewed right; the reverse means skewed left.
Why calculators give different quartiles
There’s no single agreed formula for quartiles, so the same data can give slightly different answers:
| Method | Used by | Q1, Q3 for the example |
|---|---|---|
| Exclude the median from each half | TI-84, most US textbooks | 7, 18 |
| Position (n − 1)p + 1, interpolated | Excel QUARTILE.INC, Google Sheets QUARTILE | 7.25, 17 |
| Position (n + 1)p, interpolated | Excel QUARTILE.EXC, Minitab | 6.5, 18.75 |
Use whichever your class or software uses; the calculator shows all three. The differences shrink as the data set gets larger.
Frequently asked questions
Why use the IQR instead of the range?
The range uses only the two most extreme values, so a single outlier can blow it up. The IQR ignores the top and bottom quarters, which makes it resistant to outliers, like the median.
Is the IQR the same as the standard deviation?
No. Both measure spread, but the standard deviation uses every value and is pulled by outliers. For roughly normal data, the IQR is about 1.35 standard deviations. To get the SD, use the standard deviation calculator; for the mean and mode, the mean, median and mode calculator.
How do I calculate quartiles with an odd number of values?
Leave the median out of both halves (the TI-84 method). For 1 through 9, the median is 5, the lower half is 1 to 4 (Q1 = 2.5) and the upper half is 6 to 9 (Q3 = 7.5).