The interquartile range (IQR) is the 75th percentile minus the 25th percentile, or Q3 minus Q1. It describes the spread of the middle half of the data. Khan Academy’s method finds it by taking the median of the lower half for Q1 and the median of the upper half for Q3, then subtracting.
Use the practice table
The table below is synthetic. It is about a fictional seedling nursery, and it was not produced by any AI tool. It is the only source for the exercise.
Practice table — seedling heights in cm, eight fictional plants:
- Values as given: 18, 4, 12, 8, 16, 6, 14, 10.
Practice AI answer: “The interquartile range is 10 cm.”
Check the answer
Expected result. We checked Khan Academy’s IQR method. We did not run an AI tool on the practice table. The checked list below is what to expect if the IQR is correct; run the same check yourself on the table above.
| What was checked | AI answer says | Correct value | Verdict |
|---|---|---|---|
| Values sorted | not shown | 4, 6, 8, 10, 12, 14, 16, 18 | Correct — sorted smallest to largest |
| Lower half | not shown | 4, 6, 8, 10 | Correct — the four values below the median |
| Q1 (median of lower half) | not shown | 7 | Correct — (6 + 8) / 2 = 7 |
| Upper half | not shown | 12, 14, 16, 18 | Correct — the four values above the median |
| Q3 (median of upper half) | not shown | 15 | Correct — (14 + 16) / 2 = 15 |
| IQR | 10 | 8 | Wrong — 15 – 7 = 8 |
The range is not the interquartile range
The AI answer of 10 is close to the full spread but is not the IQR: the full range here is 18 – 4 = 14, and the IQR is 8. The IQR ignores the outer quarters, which is exactly why it is used when outliers are present. Split the sorted data into halves and take each half’s median.
See also: check-ai-median-mean-outlier.
What to do with each verdict
- Correct: keep the IQR, and keep Q1 and Q3 with it so the next reader can re-subtract.
- Wrong: replace it with Q3 minus Q1 from the two half-medians.
- Quartiles disagree by method: say which quartile method was used; different textbooks split the halves differently.
Limits
- Quartile methods differ between textbooks, so small data sets can give slightly different IQRs. State the method.
- The IQR describes the middle half only. It says nothing about the lowest and highest quarters.
- No AI tool was run for this guide. The practice table and answer are synthetic.
Sources
- How to calculate interquartile range IQR — Khan Academy — The IQR is the difference between the middle of the first half and the middle of the second half of sorted data. Checked 2026-11-28.
- Statistics Module 1 — percentiles and IQR — The interquartile range is the 75th percentile minus the 25th percentile, or Q3 – Q1. Checked 2026-11-28.
