Range and Interquartile Range

Learn how to measure the spread of data using range and IQR.

Intermediate25 min15 problems

Definition

Range and interquartile range (IQR) are measures of spread: they tell you how spread out the data values are.

Range

The range is the difference between the largest and smallest values:
Range=Maximum−Minimum\text{Range} = \text{Maximum} - \text{Minimum}

Interquartile Range (IQR)

The IQR measures the spread of the middle 50% of the data:
IQR=Q3−Q1\text{IQR} = Q_3 - Q_1
Where:
  • Q1Q_1 (first quartile, also called lower quartile) = median of the lower half
  • Q3Q_3 (third quartile, also called upper quartile) = median of the upper half
How we split the data (in this whole lesson and in the box plot): order the values and find the median. With an odd number of values, leave the median out of both halves; with an even number, split the list exactly in the middle. Some textbooks use a slightly different rule, so their quartiles can differ a little.
The IQR is more reliable than the range when there are extreme values (outliers), because it only looks at the middle half of the data.

Try it now

What is the range of this data set: 8,12,15,19,238, 12, 15, 19, 23?

Worked Examples

Find the range of these test scores: 72,85,91,68,77,83,9572, 85, 91, 68, 77, 83, 95
1

Identify the maximum value

Looking at all values: 72,85,91,68,77,83,9572, 85, 91, 68, 77, 83, 95 → Maximum =95= 95
2

Identify the minimum value

The smallest score in the set → Minimum =68= 68
3

Calculate the range

Range=95−68\text{Range} = 95 - 68 → Range=27\text{Range} = 27

Common Mistakes

Not ordering the data before finding quartiles

Why it's wrong: Quartiles are based on position in ordered data. Unordered data gives wrong Q1 and Q3 values.

Correct: Always sort the data from smallest to largest first, then find the median and quartiles.

Including the median in both halves when finding Q1 and Q3

Why it's wrong: When you have an odd number of data points, the median should be excluded from both halves.

Correct: For odd-sized datasets, split the data excluding the median, then find Q1 and Q3 from those halves.

Confusing range with IQR

Why it's wrong: They measure different things: range uses extreme values, IQR uses quartiles.

Correct: Range == Max −- Min. IQR =Q3−Q1= Q_3 - Q_1. Both measure spread, but IQR focuses on the middle 50%.

Interactive Visual

Box Plot Builder

12Q1: 16.525Q3: 3342
Min
12
Q1
16.5
Median
25
Q3
33
Max
42
IQR (Q3 - Q1):16.5
Range:30
Sorted data:
12; 15; 18; 22; 25; 28; 31; 35; 42
n = 9

Click on parts of the box plot to learn what they represent.

Box Plot Builder

20Q1: 2325.5Q3: 2930
Min
20
Q1
23
Median
25.5
Q3
29
Max
30
IQR (Q3 - Q1):6
Range:10
Outliers:100
Sorted data:
20; 22; 24; 25; 26; 28; 30; 100
n = 8

Click on parts of the box plot to learn what they represent.

Interactive Sandbox

Expression Calculator

Try these:

History

No calculations yet

Practice Problems

15 problems
Problem 1 of 15
Easy
What is the range of this data set: 8,12,15,19,238, 12, 15, 19, 23?

Why It Matters

Understanding data spread is essential in real life:
  • Weather: A city with temperatures ranging from 10°C10°C to 15°C15°C has consistent weather, while −5°C-5°C to 35°C35°C shows extreme variation
  • Sports: Consistent athletes have a small IQR in their scores; inconsistent ones have large spreads
  • Quality Control: Manufacturers use IQR to ensure products are uniform
  • Grades: Teachers analyze test score spread to understand class performance
The range gives a quick overview, but the IQR tells you about typical variation without being skewed by outliers.

Real World Applications

Salary Comparisons

Companies use IQR to understand typical salary ranges without being skewed by executive pay.

Example:

If salaries at a company range from 30,000 to 500,000 dollars, but the middle 50% of salaries lie between 35,000 and 55,000 dollars (IQR = 20,000 dollars), most employees earn in that narrower band.

1Try It Yourself

Employee salaries (in thousands): 32, 38, 42, 45, 48, 52, 58, 250. Find the IQR.

What is the interquartile range of these salaries?

Step 1: Write the mathematical expression

First find Q1Q_1 and Q3Q_3, then calculate Q3−Q1Q_3 - Q_1:

Athletic Performance

Coaches analyze athlete consistency using IQR of performance metrics.

Example:

A sprinter's 100m times: 11.2,11.4,11.3,11.5,11.4,11.6,11.311.2, 11.4, 11.3, 11.5, 11.4, 11.6, 11.3 seconds. A small IQR indicates consistent performance.

2Try It Yourself

A basketball player's points per game: 12, 15, 18, 20, 22, 25, 28, 30. Find the range and IQR.

What is the IQR of the points per game?

Step 1: Write the mathematical expression

Calculate both measures of spread:

Key Takeaways

  • 1Range == Maximum −- Minimum (measures total spread)
  • 2IQR =Q3−Q1= Q_3 - Q_1 (measures spread of middle 50%)
  • 3Q1Q_1 is the median of the lower half; Q3Q_3 is the median of the upper half
  • 4IQR is resistant to outliers; range is not
  • 5A smaller range or IQR indicates data points are closer together (less variability)

Frequently Asked Questions

The IQR is barely affected by extreme values (outliers) that can inflate the range. It focuses on where the middle 50% of the data lies, giving a better picture of the typical spread.
The IQR is barely affected by extreme values (outliers) that can inflate the range. It focuses on where the middle 50% of the data lies, giving a better picture of the typical spread.
An IQR of 0 means the middle 50% of your data are all the same value. This indicates very little variability in the central portion of your dataset.
With an odd number of data points, exclude the median from both halves. With an even number, split the data exactly in half and include all values.

Glossary

Range
The difference between the maximum and minimum values in a dataset
Interquartile Range (IQR)
The difference between the third quartile (Q3Q_3) and first quartile (Q1Q_1), representing the spread of the middle 50% of data
Quartile
Values that divide an ordered dataset into four equal parts
Q1 (First Quartile)
The median of the lower half of the data; about 25% of the values lie below it
Q3 (Third Quartile)
The median of the upper half of the data; about 75% of the values lie below it
Outlier
A data point that is significantly different from other values in the dataset
Today's challengeOne problem, three tries

More in This Topic