Interquartile Range

The interquartile range measures the spread of the middle 50% of your data, telling you how compressed or spread out typical values are.

IQR=Q3Q1\text{IQR} = Q_3 - Q_1

Solve a problem with Interquartile Range

Type the problem. The solver will use Interquartile Range where Interquartile Range is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Interquartile Range takes
Q1Q_1
Q3Q_3
Interquartile Range
SymbolMeaning
Q1Q_1The first quartile, or 25th percentile—the value below which one quarter of the dataset falls, measured in the same units as your data.
Q3Q_3The third quartile, or 75th percentile—the value below which three quarters of the dataset falls, measured in the same units as your data.

When to use it

Use IQR when comparing variability between datasets while ignoring extreme outliers, or when describing how concentrated the central half of your data is.

Level

Usually taught in: Statistics

Worked examples

1. Find the IQR of a small dataset with odd count

Problem

Find the interquartile range of 3,5,7,9,11,13,153, 5, 7, 9, 11, 13, 15
  1. 3,5,7,9,11,13,153, 5, 7, 9, 11, 13, 15

    The dataset is already sorted in ascending order, which is the first step for any quartile calculation.

  2. n=7n = 7

    We have 7 values. Since nn is odd, the median sits exactly in the middle.

  3. Q2=9Q_2 = 9

    The median (4th value) is 9, which divides the data into two halves.

  4. Lower half: 3,5,7\text{Lower half: } 3, 5, 7

    Take all values strictly below the median.

  5. Q1=5Q_1 = 5

    The median of the lower half is 5.

  6. Upper half: 11,13,15\text{Upper half: } 11, 13, 15

    Take all values strictly above the median.

  7. Q3=13Q_3 = 13

    The median of the upper half is 13.

  8. IQR=135=8\text{IQR} = 13 - 5 = 8

    Subtract Q1Q_1 from Q3Q_3 to get the interquartile range.

Answer: IQR=8\text{IQR} = 8

This dataset has a compact IQR of 8, meaning the middle 50% of values span only 8 units. The calculation split the data at the median, then found the median of each half, which is the most intuitive method for odd-sized datasets.

2. Find the IQR with negatives and even count

Problem

Find the interquartile range of 8,3,0,2,5,7,12,14-8, -3, 0, 2, 5, 7, 12, 14
  1. 8,3,0,2,5,7,12,14-8, -3, 0, 2, 5, 7, 12, 14

    The data is already sorted, which is essential before calculating quartiles.

  2. n=8n = 8

    We have 8 values (even count), so we split the data cleanly in half without a middle median.

  3. Lower half: 8,3,0,2\text{Lower half: } -8, -3, 0, 2

    The first 4 values form the lower half.

  4. Upper half: 5,7,12,14\text{Upper half: } 5, 7, 12, 14

    The last 4 values form the upper half.

  5. Q1=3+02=1.5Q_1 = \frac{-3 + 0}{2} = -1.5

    For the lower half, Q1Q_1 is the average of the two middle values (3-3 and 00).

  6. Q3=7+122=9.5Q_3 = \frac{7 + 12}{2} = 9.5

    For the upper half, Q3Q_3 is the average of the two middle values (77 and 1212).

  7. IQR=9.5(1.5)=11\text{IQR} = 9.5 - (-1.5) = 11

    When subtracting a negative number, you add its absolute value instead.

Answer: IQR=11\text{IQR} = 11

Even-sized datasets require averaging the two middle values of each half to find quartiles. This example shows how negative values are handled naturally—Q1Q_1 is negative, and subtracting it adds to the range, making the IQR larger. The IQR of 11 shows much wider variability than in Example 1.

3. Calculate IQR for work hours to measure consistency

Problem

A construction supervisor records daily work hours for Crew A over a week: 6,7,8,8,9,10,116, 7, 8, 8, 9, 10, 11 hours. Find the IQR to understand how consistent their schedule is.
  1. 6,7,8,8,9,10,116, 7, 8, 8, 9, 10, 11

    The data is sorted in ascending order.

  2. n=7n = 7

    Crew A has 7 recorded workdays.

  3. Q2=8 (position 4)Q_2 = 8 \text{ (position 4)}

    With 7 values, the median is the 4th value, which is 8.

  4. Lower half: 6,7,8\text{Lower half: } 6, 7, 8

    All values less than or equal to the first occurrence below the median.

  5. Q1=7Q_1 = 7

    The median of the lower half is 7.

  6. Upper half: 9,10,11\text{Upper half: } 9, 10, 11

    All values greater than the median.

  7. Q3=10Q_3 = 10

    The median of the upper half is 10.

  8. IQR=107=3\text{IQR} = 10 - 7 = 3

    A small IQR shows that hours are fairly consistent day to day.

Answer: IQR=3 hours\text{IQR} = 3 \text{ hours}

The IQR of 3 hours tells you that the middle 50% of Crew A's workdays fall within a predictable 3-hour window (7 to 10 hours). This is valuable for construction scheduling because it lets you forecast resource needs and crew availability without being thrown off by the occasional short day or overtime day.

Common mistakes

Where Interquartile Range usually goes wrong
Answer came out wrong
Calculating quartiles before sorting the data.
Always sort your dataset in ascending order before you begin—this is the single most important first step.
Including the median in both the lower half and upper half when finding Q1Q_1 and Q3Q_3.
Exclude the median from both halves when nn is odd. When nn is even, split cleanly at the midpoint with no overlap.
Using the range (maxmin\text{max} - \text{min}) instead of IQR when asked for spread.
Use IQR when outliers might be present or when you want to describe the central cluster; use range only if you specifically need the full extent and have no extreme values.
The mistakeWhy it is wrongThe fix
Calculating quartiles before sorting the data.Unsorted data puts values in the wrong positions, giving you incorrect Q1Q_1 and Q3Q_3 values and a useless IQR.Always sort your dataset in ascending order before you begin—this is the single most important first step.
Including the median in both the lower half and upper half when finding Q1Q_1 and Q3Q_3.The median is the dividing line; if you count it twice, you distort both quartiles and make your IQR unreliable.Exclude the median from both halves when nn is odd. When nn is even, split cleanly at the midpoint with no overlap.
Using the range (maxmin\text{max} - \text{min}) instead of IQR when asked for spread.The range captures only extremes and is destroyed by a single outlier, whereas IQR ignores the outer 25% and shows you typical spread.Use IQR when outliers might be present or when you want to describe the central cluster; use range only if you specifically need the full extent and have no extreme values.

Tips and when to use something else

  • Always sort your data first—more errors come from skipping this step than from any arithmetic mistake.
  • IQR is robust to outliers because it ignores the extreme 25% on each end; use it instead of range whenever you see unusually large or small values.
  • If you need to account for all values in your spread measure (not just the middle 50%), switch to standard deviation or variance instead.
  • Check whether your data has an odd or even count before you divide it; even-sized datasets require you to average middle pairs to find quartiles.

Frequently asked questions

Is Q1Q_1 the same as the median?
No. Q1Q_1 is the 25th percentile (one-quarter of the data lies below it), while the median is the 50th percentile (half the data lies below it). The median is also called Q2Q_2. They are three different positions.
Can the IQR ever be negative?
No. By construction, Q3Q_3 always sits further up the sorted list than Q1Q_1, so Q3Q1Q_3 \geq Q_1. Therefore, IQR=Q3Q1\text{IQR} = Q_3 - Q_1 is always zero or positive.
How do I use IQR to find outliers?
Use the 1.5 × IQR rule: any value below Q11.5IQRQ_1 - 1.5 \cdot \text{IQR} or above Q3+1.5IQRQ_3 + 1.5 \cdot \text{IQR} is flagged as a potential outlier. This rule identifies points far outside the central cluster.
Should I include the median in both halves when I split the data?
No. If your data has an odd count, exclude the median from both halves—it is the dividing line, not part of either half. For even-sized data, there is no single median, so you split cleanly at the midpoint without double-counting.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18