On this concept: Formula

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

Math · Statistics & Probability · Grade 6-8

Interquartile Range

The IQR is Q3−Q1: the width of the middle 50% of a sorted dataset.

IQR=Q3−Q1

Quick Answer

The IQR is Q3−Q1: the width of the middle 50% of a sorted dataset. Use it to describe spread when the data is lopsided or has extreme values, such as house prices, wait times or screen time, because the top and bottom quarters, where outliers sit, are left out. Find Q1 and Q3 from the sorted data and subtract. The IQR also sets the box-plot fences: values more than 1.5×IQR beyond the box are flagged as outliers.

Why This Matters

One extreme value can double or triple the range while the IQR stays put, so the IQR gives an honest typical spread for messy real data. It also turns spotting outliers into a rule rather than a hunch: more than 1.5×IQR beyond Q1 or Q3. Without it, a single data-entry error, like a 600-minute commute, can distort every comparison.

Intuitive Explanation

Nine friends report how many minutes they spent on their phones yesterday, sorted: 40, 55, 60, 70, 80, 85, 95, 110, 400. The median is the 5th value, 80. Leave it out and split the rest: the lower half 40, 55, 60, 70 gives Q1=55+602=57.5, and the upper half 85, 95, 110, 400 gives Q3=95+1102=102.5. The IQR is 102.5−57.5=45 minutes: the middle friends' times fit inside a 45-minute window.

Now look at the friend who reported 400 minutes. The range is 400−40=360 minutes, mostly because of that one value. Change 400 to 120 and the range drops to 80 minutes, but Q3 is still 95+1102=102.5 and the IQR is still 45. The IQR ignores how far the outer quarters stretch, so one extreme value cannot inflate it.

Is 400 an outlier? The upper fence is Q3+1.5×IQR=102.5+67.5=170, and 400>170, so yes. Keep the IQR separate from the range (maximum minus minimum) and from Q2, the median: the IQR is always a width, a difference of two quartiles, never a position. With very few values, say five, each half holds only two numbers, and the IQR loses much of its resistance to outliers.

Think of it like this. The IQR measures the width of the middle of a concert crowd, ignoring the stragglers at the back and the fans pressed against the stage. However far the stragglers wander, the middle of the crowd stays the same width. The comparison fails for a tiny crowd, where there is hardly a middle to measure.

Core idea. IQR throws away the extreme 25% on each end and measures only how wide the central 50% of the data is.


When to Use

Use the IQR when you need the spread of data that is skewed or has outliers, or when a question mentions the middle 50%, the length of a box plot's box, or the 1.5×IQR outlier rule. Pair it with the median, since both depend only on order. If the data is roughly symmetric with no outliers, the standard deviation uses more of the information. If the question asks for the full extent from smallest to largest, give the range.

Tip. Ask: Am I measuring the width of the middle half of sorted data, not the full extent?

How to Recognize It

Before reaching for the IQR, look at whether the data has a long tail or a few extreme values, and whether the question wants one width or the cut points themselves.

  1. Does the data set have a value far from the rest, like one $2 million house on a street of $300,000 homes?

    If yes, the IQR gives a spread that the extreme value cannot stretch. If no and the data is roughly symmetric, the standard deviation uses every value and is usually the better spread to report.

  2. Does the question want a single distance, not the values where the quarters split?

    If yes, subtract Q1 from Q3 to get one number. If no, because it asks for the lower or upper quartile itself, the answer is a cut point, and nothing is subtracted.

  3. Does the question ask for the gap between the smallest and largest values?

    If yes, that is the range, maximum minus minimum, which includes the extremes. The IQR answers a narrower question: how far apart the values one quarter and three quarters of the way up the sorted list sit.

  4. Is the center being reported as the median rather than the mean?

    If yes, the IQR is its natural partner, since both depend only on the order of the values. If the mean is the center, the standard deviation usually goes with it.

Interquartile Range compared with Range, Standard deviation, and Quartiles

Range, IQR, standard deviation and quartiles are all read from the same sorted list, so they blur together. Ask whether the answer should be one distance or a cut point, and whether the extreme values should count.

Interquartile Range

Meaning
Use this when you need the spread of a dataset but a few extreme values would distort the ordinary range.
Key test
Am I measuring the width of the middle half of sorted data, not the full extent?
Formula
IQR=Q3−Q1
Example
Sorted scores are 3,5,6,8,10,12,14,16,20. Find the IQR.

Range

Meaning
Measures the full spread from smallest to largest, so one outlier can blow it up.
Key test
Use when there are no extreme values and you want the total extent.
Formula
max−min
Example
Scores 2 to 98 give a range of 96

Standard deviation

Meaning
Measures the root-mean-square (typical) distance from the mean, using every value.
Key test
Use when data is roughly symmetric and you summarize with the mean.
Formula
s=∑(x−xˉ)2n−1
Example
Test scores clustered tightly around 80

Quartiles

Meaning
Are the cut points (Q1,Q2,Q3) themselves, not a single spread number.
Key test
Use when you need the boundary values, not the distance between two of them.
Example
Q1=40, Q3=70 are positions; their gap is the IQR

Formula & Notation

IQR=Q3−Q1
IQR=Q3−Q1 where Q1=Q0.25 and Q3=Q0.75 are the first and third quartiles

How to read it: IQR=Q3−Q1; the middle 50% of the data

Worked Examples

Example 1 — IQR of nine scores

Easy

Sorted scores are 3,5,6,8,10,12,14,16,20. Find the IQR.
Show the steps and the answer
  1. Find the median: n=9, so it is the 5th value, 10.

    With an odd count the median is one of the values, and it is left out of both halves.

  2. Lower half 3,5,6,8: Q1=5+62=5.5.

    Q1 is the middle of the lower half.

  3. Upper half 12,14,16,20: Q3=14+162=15.

    Q3 is the middle of the upper half.

  4. Subtract: IQR=15−5.5=9.5.

    The middle scores, from 6 to 14, fit inside a window 9.5 points wide.

Answer: IQR=9.5

Takeaway: Find Q1 and Q3 as the medians of the halves, then subtract; the extremes 3 and 20 play no part.

Example 2 — Range instead

Standard

Same scores 3,5,6,8,10,12,14,16,20 — what is the range?
Show the steps and the answer
  1. Read the question: it asks for the range, the full extent of the data.

    The range uses the two extreme values, not the quartiles.

  2. Subtract: 20−3=17.

    Maximum minus minimum covers every score.

  3. Compare with the IQR of 9.5: the range is almost twice as big.

    The range includes the outer quarters, 3 to 5.5 and 15 to 20, which the IQR leaves out.

  4. Test sensitivity: if 20 were 50, the range would jump to 47 while the IQR stayed at 9.5.

    This is why the IQR is preferred when an extreme value might be an error.

Answer: range=20−3=17

Takeaway: The range measures the full extent from the extremes; the IQR measures the middle half from the quartiles.

Example 3 — Find the mistake: the IQR is a width, not the median

Application

For the data 2,4,5,8,9,11,15, Pat writes: "The interquartile range is the middle quartile, Q2=8." Find the mistake and correct it.
Show the steps and the answer
  1. Name what Pat found: 8 is the median, Q2, a location in the data.

    The IQR is a width, the distance between two quartiles, not a middle value.

  2. Find Q1: leave out the median 8; the lower half 2,4,5 has middle value 4.

    With 7 values, each half holds 3 values.

  3. Find Q3: the upper half 9,11,15 has middle value 11.

    Q3 is the median of the upper half.

  4. Subtract: IQR=11−4=7.

    The middle part of the data, from 4 to 11, spans 7.

Answer: IQR=Q3−Q1=11−4=7

Takeaway: The IQR is a difference, Q3−Q1; the median, Q2, is a location and answers a different question.

Where You'll See It

  • Choosing the more reliable delivery service

    Shop A's delivery times have median 3 days and IQR 1 day; shop B's have median 3 days and IQR 4 days. The middle half of shop A's orders arrive within a 1-day window, so A is far more predictable even though the medians match.

  • Cleaning glitches from weather data

    Weather stations sometimes record glitches, such as 70 °C on a spring day. Data teams flag any reading beyond the 1.5×IQR fences: with quartiles of 12 °C and 20 °C, the IQR is 8, so readings above 32 °C or below 0 °C are checked by hand.

Common Mistakes

  1. The slip: Subtracting min from max instead of Q3−Q1

    Instead: the IQR uses the quartiles, never the extreme values.

  2. The slip: Computing quartiles on unsorted data

    Instead: order the data from smallest to largest before finding Q1 and Q3.

  3. The slip: Confusing Q3−Q1 with Q2

    Instead: the IQR is a width (a difference), not the median itself.


Mini Practice

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

  1. A data set has Q1=42 and Q3=67. What is the IQR?

    Hint: Subtract the lower quartile from the upper quartile.

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

    Hint: Find the median of each half of the 8 values.

  3. Find the IQR of 11,4,16,7,21,9,13.

    Hint: Sort the list first; leave the median out of the halves.

  4. The data 5,6,7,8,9,10,11,12 has its largest value changed from 12 to 60. What happens to the range and to the IQR?

    Hint: Find Q3 before and after. Is 12 one of the values used for it?

  5. Household incomes in a small town are strongly skewed, with a few very high earners. To report the spread, should you use the IQR or the standard deviation?

    Hint: Which measure is pulled by a few extreme values?

  6. For 1,4,6,9,12,15,30, Priya writes "IQR =30−1=29." Correct her work.

    Hint: Which two values does the IQR subtract?

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 ever equal the range?

Yes, when the data piles up at the two ends. In 1, 1, 1, 9, 9, 9, the lower half 1, 1, 1 gives Q1=1Q_1 = 1 and the upper half 9, 9, 9 gives Q3=9Q_3 = 9, so the IQR and the range are both 8. The IQR can never be bigger than the range, because both quartiles always sit between the smallest and largest values. The closer the two numbers are, the more the data crowds toward its ends.

How do I find the IQR from a frequency table?

Work with positions. Suppose scores 1, 2, 3 and 4 have counts 3, 5, 7 and 5, which is 20 values in all. Q1Q_1 is the middle of the lower 10, between the 5th and 6th values, and Q3Q_3 is between the 15th and 16th. Running totals show that values 1 to 3 are 1s, 4 to 8 are 2s, 9 to 15 are 3s and 16 to 20 are 4s, so Q1=2Q_1 = 2, Q3=3.5Q_3 = 3.5 and the IQR is 1.5.

Isn't it wasteful for the IQR to ignore half the data?

It does throw information away, on purpose. Ignoring the top and bottom quarters makes the IQR stable: one wild value or a few typing errors barely move it. The price is that it is blind to the tails. Two classes whose middle halves match but whose top scores differ by 30 points get the same IQR. That is why the IQR is usually shown in a box plot, whose whiskers and dots show the tails it leaves out.

Learning Path

← Before

Quartiles
Interquartile Range

You are here

Next →

Box Plot
You need Quartiles, because the IQR is the distance from Q1 to Q3. The IQR adds a single spread number that resists outliers, plus the fence rule for flagging them. Next, the Box Plot draws the IQR as its box and uses the fences to decide where the whiskers stop and which values appear as separate dots.

See Also