---
title: "Quartiles and the Interquartile Range"
description: "Find the median, the quartiles and the interquartile range of a data set, and use the interquartile range to compare how spread out two sets are."
canonical: https://lightmysky.com/learn/mathematics/quartiles-and-the-interquartile-range-mt_vN10d1I9dA
source: https://lightmysky.com/learn/mathematics/quartiles-and-the-interquartile-range-mt_vN10d1I9dA.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Quartiles and the Interquartile Range

Find the median, the quartiles and the interquartile range of a data set, and use the interquartile range to compare how spread out two sets are.

Subject: Mathematics · Area: Data & Statistics · Ages 15 to 16
Page: https://lightmysky.com/learn/mathematics/quartiles-and-the-interquartile-range-mt_vN10d1I9dA

## Ready when they can

- Find medians and quartiles or recover list size using a stated convention; count observations strictly below a supplied quartile, distinguishing rank locations from exact value counts with ties
- Calculate and interpret the interquartile range, and calculate and compare full ranges even when the quartiles match
- Explain when changing an extreme observation leaves the interquartile range unchanged, and why adding an observation requires checking again

## Lesson: Cutting a list into quarters

You used positions to locate a median in grouped data. Here the race times are exact: 21, 23, 24, 26, 27, 29, 30, 32, 35, 41 and 58 minutes. Order values from smallest to largest before finding a median or quartile. With eleven values, the median is at position (11 + 1) / 2 = 6: 29 minutes. For an even count, average the two middle values.

*(drawing: The marks show the quartiles and median, not every runner: lower quartile 24, median 29 and upper quartile 35 minutes.)*

Quartile conventions differ. Here, split an ordered list into lower and upper halves. Exclude the central observation when the count n is odd. Each half's median is its quartile. For odd n, their positions are (n + 1) / 4 and 3(n + 1) / 4. Average adjacent values for a halfway position. Eleven runners give positions 3 and 9: 24 and 35 minutes. Subtract lower from upper to find the interquartile range.

Quartiles mark roughly the 25% and 75% ranks. Finite lists and repeated values need not give equal counts in the intervals; count entries for an exact answer. The median need not be halfway between quartile values. IQR cannot exceed range because quartiles lie within the extremes. If the quartiles are equal, every ordered value between their positions equals that value.

*(drawing: Q1 means lower quartile and Q3 means upper quartile. Rank locations do not promise exact counts in value intervals.)*

**Example.** The interquartile range, or IQR, is upper quartile minus lower quartile: 35 - 24 = 11 minutes. The range uses the extremes: 58 - 21 = 37 minutes. To recover the upper quartile, add the IQR to the lower quartile. With equal medians, an IQR of 5 rather than 20 minutes describes a narrower middle spread.

Suppose only the last race time increases from 58 to 90 minutes. Positions 3 and 9 still hold 24 and 35, so the IQR stays 11. The range becomes 90 - 21 = 69. This shows resistance to an extreme value, not immunity to every change. Changing a value used for a quartile can change the IQR. Adding a new observation also changes the count, so find the quartiles again.

Adding the same amount to every observation shifts the median and both quartiles by that amount. Their difference stays unchanged, so equal IQRs need not mean equal medians. Sets can also share a median and quartiles while having different extremes. To compare their ranges, calculate each maximum minus minimum, then subtract the two ranges.

*(drawing: Appending a value differs from increasing an existing last value.)*

For an even list, keep every observation and split it into two equal halves. Find each half's median, averaging its middle pair when needed. You can recover a missing value: if a quartile is (a + b) / 2, then b = 2 × quartile - a. If the lower quartile is missing, use lower quartile = upper quartile - IQR first. Check that any recovered value preserves the list's order.

You can reverse a quartile-position calculation. For an odd-sized list, a lower-quartile position p satisfies p = (n + 1) / 4. Multiply by 4 and subtract 1 to get n = 4p - 1. Check that the resulting count is odd before using this rule.

To find quartiles for combined groups, collect every observation from both groups, keeping repeated values. Sort the combined list, then apply the stated quartile convention to its new count. Do not average the groups' IQRs to obtain the combined IQR. Each group's quartiles describe positions within that group; combining groups changes which observations occupy the quartile positions.

**Recap.** Order the data and use the stated quartile convention. IQR = upper quartile - lower quartile. It measures the middle spread and is usually less sensitive to extreme values than the range.

*The lesson, exercises and flashcards were written for this learning dataset.*

## Practice

30 questions on this page, each with its working shown.

## Needs first

- [Estimating the mean from grouped data](https://lightmysky.com/learn/mathematics/estimating-the-mean-from-grouped-data-mt_3PHP7NLZAw)

## Opens up

- [Standard deviation and variance](https://lightmysky.com/learn/mathematics/standard-deviation-and-variance-mt_eNpow5tIX2)
- [Box-plot features from five-number summaries](https://lightmysky.com/learn/mathematics/box-plot-features-from-five-number-summaries-mt_G_SnfEllzQ)
