On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Statistics · Grade 6-8

Interquartile Range (IQR)

The interquartile range (IQR) is the range of the middle 50% of data, calculated as Q3−Q1.

IQR=Q3−Q1

Quick Answer

The interquartile range (IQR) is the range of the middle 50% of data, calculated as Q3−Q1. Because it ignores the lowest and highest quarters, one extreme value barely changes it. Use the IQR to describe the spread of typical values when data have outliers or a long tail, to compare the spreads of two groups on box plots, and to set outlier fences: values more than 1.5×IQR below Q1 or above Q3 are flagged as unusual.

Why This Matters

The IQR gives a spread that one strange value cannot wreck. If a single runner walks the course, the range of finishing times can double while the IQR hardly changes. It is also the standard ruler for deciding what counts as an outlier, so you can flag unusual values by a fixed rule instead of by guessing.

Intuitive Explanation

Ten students record how many minutes they read last night, sorted: 0, 10, 15, 20, 20, 25, 30, 30, 35, 120. The range is 120−0=120 minutes, which makes the class look wildly spread out. But that comes from just two students, one who read nothing and one who read for two hours. The IQR asks a narrower question: how spread out is the middle of the class?

Split the sorted data into halves: 0, 10, 15, 20, 20 and 25, 30, 30, 35, 120. The middle of the lower half is Q1=15, and the middle of the upper half is Q3=30, so the IQR is 30−15=15 minutes. About half the students read between 15 and 30 minutes. Change the 120 to 300 and the IQR stays 15, while the range jumps to 300.

The IQR and the range are both a larger value minus a smaller one, which is why they get mixed up. The range uses the two most extreme values; the IQR uses the quartiles. If a problem gives you the minimum and maximum, subtracting them gives the range; if it gives Q1 and Q3, or a box plot, the IQR is the length of the box. By design, the IQR says nothing about the top and bottom quarters.

Think of it like this. The IQR is like measuring the width of the main crowd at an outdoor concert while ignoring the few people wandering at the back or pressed against the stage. Those stragglers can stand anywhere without changing the width of the crowd. The cost is that the IQR tells you nothing about how far the stragglers went.

Core idea. The IQR is the width of the middle half of the data, Q3−Q1; ignoring the top and bottom quarters makes it a spread that extreme values cannot stretch.


When to Use

Use the IQR when a question asks for the spread of the middle 50%, gives quartiles or a box plot, or involves data with outliers or a long tail, where the range would mislead. Compute Q3−Q1. To flag outliers, go 1.5×IQR below Q1 and above Q3. If the data are roughly symmetric with no outliers and you are reporting the mean, the MAD or standard deviation is the matching spread.

Tip. Ask: Do you need how spread out the middle half of the data is, ignoring the lowest and highest quarters?

How to Recognize It

Before subtracting, check which two values the question wants you to measure between, and whether extreme values should count.

  1. Does the question want a spread, a distance between values, rather than a typical value?

    Yes means a spread measure such as the IQR. If it wants a typical value, use the Median.

  2. Should a few extreme values be kept from affecting the answer?

    Yes favours the IQR, since it skips the lowest and highest quarters. If every value, including the two ends, should count, use the Range.

  3. Are Q1 and Q3 given, or can they be read from the box of a box plot?

    Yes, and the IQR is the length of the box, Q3−Q1. If you are asked for Q1 or Q3 themselves, that is Quartiles.

  4. Is the median the center being reported, because the data are lopsided or have outliers?

    Yes pairs well with the IQR, since both use positions in sorted data. For symmetric data reported with a mean, the usual spread is the Standard Deviation.

Interquartile Range (IQR) vs Range vs Quartiles vs Mean Absolute Deviation (MAD)

All four come from the same list, and three of them are spreads, so the real question is which values each one uses. Ask: the two ends, the two quartiles, distances from the mean, or the quartile positions themselves?

Interquartile Range (IQR)

Meaning
The IQR is the upper quartile minus the lower quartile, the width of the middle half of the data.
Key test
Uses Q1 and Q3 only, so the extremes cannot move it.
Formula
IQR=Q3−Q1
Example
Prices with Q1 at $4 and Q3 at $11 have an IQR of $7.

Range

Meaning
The range is the maximum minus the minimum, the width of all the data.
Key test
Uses the two most extreme values, so one outlier can stretch it.
Formula
range=maximum−minimum
Example
Prices from $2 to $40 give a range of $38, even if most cost $4 to $11.

Quartiles

Meaning
Quartiles are the cut points themselves: Q1, the median and Q3.
Key test
Positions on the scale, not a distance between them.
Example
Shoe prices with Q1 at $30 and Q3 at $55 show where the middle half starts and ends.

Mean Absolute Deviation (MAD)

Meaning
The MAD is the average distance of the values from the mean.
Key test
Measured from the mean and uses every value, so extremes still count.
Formula
1n∑∣x−xˉ∣
Example
Values 1, 3, 5, 11 have a mean of 5 and a MAD of 3.

Formula & Notation

IQR=Q3−Q1
The interquartile range is IQR=Q3−Q1. Outliers are defined as observations below Q1−1.5⋅IQR or above Q3+1.5⋅IQR.

How to read it: IQR stands for Interquartile Range. Q1 is the 25th percentile and Q3 is the 75th percentile. The 1.5×IQR rule defines the outlier fences.

Worked Examples

Example 1 — IQR of texts sent

Easy

Nine students sent these numbers of texts in one day: 12, 5, 30, 18, 22, 8, 25, 15, 40. Find the IQR.
Show the steps and the answer
  1. Sort: 5, 8, 12, 15, 18, 22, 25, 30, 40.

    Quartiles come from positions in the ordered list.

  2. Find the median, the 5th of 9 values: 18. Leave it out of both halves.

    The median splits the data into a lower half and an upper half of 4 values each.

  3. Q1: lower half 5, 8, 12, 15 gives (8+12)÷2=10. Q3: upper half 22, 25, 30, 40 gives (25+30)÷2=27.5.

    Each quartile is the median of its half.

  4. Subtract: IQR=27.5−10=17.5 texts.

    The middle half of the students sent between 10 and 27.5 texts.

Answer: IQR=17.5 texts.

Takeaway: Sort, find Q1 and Q3 as the medians of the halves, then subtract.

Example 2 — One rainy day: range against IQR

Standard

Rainfall over 8 days, in mm, was 0, 1, 1, 2, 3, 3, 4, 38. Find the range and the IQR. Is 38 mm an outlier by the 1.5×IQR rule?
Show the steps and the answer
  1. Range: 38−0=38 mm.

    The range is set entirely by the one stormy day.

  2. Quartiles: lower half 0, 1, 1, 2 gives Q1=(1+1)÷2=1; upper half 3, 3, 4, 38 gives Q3=(3+4)÷2=3.5.

    With 8 values, each half has 4, and each quartile is the average of a half's two middle values.

  3. IQR: 3.5−1=2.5 mm.

    The 38 sits at the end of the upper half, so it does not affect Q3.

  4. Upper fence: Q3+1.5×2.5=3.5+3.75=7.25 mm, and 38 is far above it.

    Values beyond the fence are flagged as outliers.

Answer: Range 38 mm, IQR 2.5 mm; 38 mm is an outlier because it is above the upper fence of 7.25 mm.

Takeaway: When one value is extreme, the range describes that value and the IQR describes the typical days.

Example 3 — Find the mistake: using the whiskers

Application

A box plot shows minimum 4, Q1=10, median 14, Q3=20 and maximum 31. Sam writes: "IQR =31−4=27." Find the mistake and correct it.
Show the steps and the answer
  1. Name what Sam computed: maximum minus minimum is the range, the full length of the plot from whisker end to whisker end.

    The IQR is designed to skip the extreme values.

  2. Use the quartiles instead: IQR=Q3−Q1=20−10=10.

    On a box plot, the IQR is the length of the box itself.

  3. Interpret it: the middle half of the data lies within 10 units, from 10 to 20.

    The other half of the data is shared between the two whiskers, which together cover 17 units.

Answer: IQR=10 (27 is the range).

Takeaway: For the IQR, subtract the quartiles at the ends of the box, never the minimum and maximum.

Where You'll See It

  • How spread out 'normal' delivery times are

    A pizza shop ignores the rare 2-hour storm delays and the instant pickups, looking at Q3 - Q1 of delivery times to see how wide the typical middle 50% of waits is.

  • Middle 50% of test scores

    A teacher reports the IQR so one student who scored 12 and one who aced it don't distort the picture; IQR shows the spread of the central half of the class.

  • Typical daily steps without the marathon day

    Your step tracker's IQR shows how much your normal days vary, ignoring the one day you walked 30,000 steps at an amusement park.

Common Mistakes

  1. The slip: IQR is the same as the range.

    Why it's tempting: Both are a difference of two values, so they look alike, but range uses max and min while IQR uses Q3 and Q1.

    Instead: Range = max - min (uses extremes); IQR = Q3 - Q1 (uses only the middle 50%, ignoring extremes).

  2. The slip: IQR is computed from the smallest and largest values.

    Why it's tempting: Students reach for min and max because that's how range works, but those are exactly the values IQR is designed to skip.

    Instead: IQR uses the quartiles Q1 and Q3, not the minimum and maximum.

  3. The slip: IQR describes the whole data set's spread.

    Why it's tempting: It's called a spread measure, so it feels like it covers everything, but it deliberately ignores the top and bottom 25%.

    Instead: IQR measures the spread of only the middle 50% of the data, which is what makes it resistant to outliers.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. A data set has Q1=24 and Q3=41. What is the IQR?

    Hint: Use IQR=Q3−Q1.

  2. Find the IQR of 5, 7, 8, 10, 12, 13, 15, 20.

    Hint: Find the middle of the lower four values and of the upper four.

  3. For the data 4, 6, 7, 8, 9, 10, 11, 12, 40, find the range and the IQR.

    Hint: The median is 9. Leave it out and split the rest into halves.

  4. A box plot shows minimum 10, Q1=18, median 25, Q3=30 and maximum 52. What is the IQR, and about what fraction of the data lies between 18 and 30?

    Hint: The box covers the data from Q1 to Q3.

  5. Twenty reaction times are recorded, including one very slow 2.5 s time from a distracted student. You want a spread measure that this one time does not distort. Range or IQR?

    Hint: Which measure uses the smallest and largest values?

  6. A box plot shows minimum 3, Q1=8, Q3=15 and maximum 22. A student writes "IQR = 22 − 3 = 19." What is the IQR?

    Hint: Which two values does the IQR use?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Can the IQR be zero even when the values are not all the same?

Yes. In 1, 5, 5, 5, 5, 5, 5, 20 the lower half 1, 5, 5, 5 gives Q1=5Q_1 = 5 and the upper half 5, 5, 5, 20 gives Q3=5Q_3 = 5, so the IQR is 0, while the range is 19. An IQR of zero means the middle half of the values are all equal. It does not mean the whole data set has no spread, so look at the range or a dot plot too.

Why are outlier fences set at 1.5 times the IQR, and not 1 or 2?

The statistician John Tukey chose 1.5 as a practical rule, not a law of nature. For bell-shaped data the fences then land about 2.7 standard deviations from the mean, so only about 7 values in every 1,000 get flagged. A multiplier of 1 would flag far too many ordinary values, and a larger one could miss real problems. Some people use 3 times the IQR to mark extreme outliers.

If I add a huge outlier, does the IQR stay exactly the same?

Not exactly, but nearly. Adding a value shifts the positions a little, so the quartiles can move by one step. For 2, 4, 6, 8, 10, 12 the IQR is 10−4=610 - 4 = 6. Add 1,000 and the list of seven gives Q1=4Q_1 = 4 and Q3=12Q_3 = 12, an IQR of 8. The change is 2, and it would be the same 2 if the new value were a million.

Learning Path

← Before

QuartilesRange
Interquartile Range (IQR)

You are here

You need Quartiles and Range first: the IQR is a range taken between the quartiles instead of between the extremes. It adds a spread measure that resists outliers and a ruler for spotting them. Next, a Box Plot draws the IQR as its box, and Outlier Detection uses the 1.5×IQR fences to flag values unusually far from the rest.

See Also