Interquartile Range Calculator

Calculate the interquartile range (IQR), first and third quartile for a data set. Enter your numbers separated by commas or spaces.

Interquartile range (IQR)
4
IQR = Q3 − Q1
Q1 (25th percentile)
2.5
Q3 (75th percentile)
6.5
Embed on your website →

How to use the interquartile range calculator

  1. Enter your numbers in the field, separated by commas or spaces.
  2. The interquartile range (IQR), Q1 and Q3 update automatically.

What is interquartile range (IQR)?

The interquartile range (IQR) measures the spread of the middle half of a data set. It's calculated as the difference between the third quartile (Q3, the value below which 75% of the data falls) and the first quartile (Q1, the value below which 25% of the data falls): IQR = Q3 − Q1. This calculator uses the median-of-halves method to find the quartiles.

Note: IQR is considered a robust measure of spread, since it isn't affected by outliers the way standard deviation is — the lowest 25% and highest 25% of values are excluded from the calculation itself.

Frequently asked questions

What is interquartile range used for?

IQR is often used to describe the spread of a data set in a way that's robust to outliers, and is the basis for drawing box plots as well as identifying outliers (values more than 1.5 × IQR beyond Q1/Q3).

How are Q1 and Q3 calculated?

This calculator uses the median-of-halves method: the data set is split into a lower and an upper half (the median itself is excluded if the count is odd), and Q1/Q3 are the medians of the lower and upper halves respectively. Other methods for calculating quartiles can give slightly different results.

What's the difference between IQR and standard deviation?

Standard deviation accounts for all values in the data set and is therefore affected by outliers. IQR only looks at the middle half of the data and is thus more robust — useful when the data set may contain outliers.

Embed this calculator on your website

Copy the code below to show this calculator directly on your blog or website — completely free.