IQR Calculator (Interquartile Range & Quartiles)
Find the first quartile, median, third quartile and the interquartile range (IQR = Q3 − Q1), with the halves of the data shown.
Step by step
- Sort the data: 1, 3, 4, 6, 7, 8, 9, 11, 13, 15, 18
- The median is the middle value (position 6): 8
- Lower half (median excluded): 1, 3, 4, 6, 7 → Q1 = its median = 4
- Upper half: 9, 11, 13, 15, 18 → Q3 = 13
- IQR = Q3 − Q1 = 13 − 4 = 9
| Count (n) | 11 |
|---|---|
| Sum | 95 |
| Mean | 8.6364 |
| Median | 8 |
| Mode | none |
| Minimum | 1 |
| Maximum | 18 |
| Range | 17 |
| Q1 (first quartile) | 4 |
| Q3 (third quartile) | 13 |
| Interquartile range (IQR) | 9 |
| Sample standard deviation (s) | 5.2397 |
| Population standard deviation (σ) | 4.9959 |
| Sample variance (s²) | 27.4545 |
| Population variance (σ²) | 24.9587 |
| Standard error of the mean | 1.5798 |
| Coefficient of variation | 60.67% |
| Mean absolute deviation | 4.1488 |
| Sum of squares (Σ(x − x̄)²) | 274.5455 |
| Outliers (1.5 × IQR rule) | none |
Sorted data
1, 3, 4, 6, 7, 8, 9, 11, 13, 15, 18
How to find the IQR
- Sort the data and find the median.
- Q1 = median of the lower half; Q3 = median of the upper half (leave the median out of both halves when the count is odd).
- IQR = Q3 − Q1.
For 1, 3, 4, 6, 7, 8, 9, 11, 13, 15, 18: median 8, Q1 = 4, Q3 = 13, so IQR = 9. Full guide.
Why the IQR?
The IQR measures the spread of the middle half of the data, so a single extreme value cannot inflate it the way it inflates the range or standard deviation. It also defines outlier fences: values below Q1 − 1.5·IQR or above Q3 + 1.5·IQR (outlier calculator).
Quartile methods
Textbooks and software differ slightly. This calculator uses the median-of-halves method (TI-83/84, most US classes). Excel’s QUARTILE.INC and some programs interpolate and can give slightly different Q1 and Q3.
Frequently asked questions
How do you find the interquartile range?
Subtract the first quartile from the third: IQR = Q3 − Q1.
What is Q2?
The second quartile is the median.
Why does my answer differ from Excel?
Excel's QUARTILE.INC uses interpolation; this calculator uses the median-of-halves method taught in most US classes. Both are valid conventions.
Last reviewed November 2026. Results are rounded to 4 decimal places; all math runs in your browser.