Interquartile Range Calculator
Enter a data set to see its first quartile, third quartile and interquartile range. The page prints the sorted values and the chosen quartile convention so the result can be audited.
convention median of halves, odd centre excluded data sorted 1 2 3 4 | 5 6 7 8 method Q1 is the median of the lower 4, Q3 the median of the upper 4. Q1 2.5 Q3 6.5 IQR 6.5 - 2.5 = 4 middle 50% 2.5 to 6.5, holding 4 of the 8 values same data under R7 linear interpolation at (n - 1)p IQR 3.5
- Q1
- Q3
- IQR
- Middle 50%
Box plot on an axis from 1 to 8. Whisker at 1, box from 2.5 to 6.5 with the median at 4.5, whisker at 8. No value is outside the fences.
Q3 minus Q1, the middle 50% of the data, drawn as the box.
Under median of halves, odd centre excluded, 8 values give Q1 2.5 and Q3 6.5, an interquartile range of 4.
Commas, spaces, tabs, semicolons and new lines all separate values, so a column copied from a spreadsheet pastes straight in, and up to 10,000 values are read at a time. Figures on screen are rounded to six decimal places; the arithmetic itself keeps full double precision. Nothing you type leaves this browser.
Worked examples
Where the conventions disagree
The same 8 values under all four conventions. They agree on the median, always. Where they differ, it is on Q1 and Q3.
| Convention | Q1 | Median | Q3 | IQR |
|---|---|---|---|---|
| Median of halves (on screen) | 2.5 | 4.5 | 6.5 | 4 |
| Tukey hinges | 2.5 | 4.5 | 6.5 | 4 |
| R7 interpolation | 2.75 | 4.5 | 6.25 | 3.5 |
| R6 interpolation | 2.25 | 4.5 | 6.75 | 4.5 |
Common questions
- How is the interquartile range found?
- Subtract the first quartile from the third quartile: IQR = Q3 - Q1. The page shows both quartiles and the subtraction.
Exact arithmetic under the quantile convention you pick, and the page names which convention produced the numbers on screen, because median of halves and R7 genuinely disagree on the same eight values. Observations outside the 1.5 x IQR fences are listed and never deleted, and the page does not call them mistakes.