Statistics

Interquartile Range Calculator

Enter a data set to instantly calculate the first quartile (Q1), third quartile (Q3), and interquartile range (IQR) — a measure of statistical spread based on the middle 50% of the data.

Your data set

Interquartile range
Enter a data set to calculate.

How the Interquartile Range formula works

The interquartile range formula:

Q1 = median of the lower half of the sorted data
Q3 = median of the upper half of the sorted data
IQR = Q3 − Q1

Step-by-step calculation

  1. Sort the data set from smallest to largest.
  2. Find Q1, the median of the lower half of the data.
  3. Find Q3, the median of the upper half of the data.
  4. Subtract Q1 from Q3 to get the IQR.

Worked example

Data set: 4, 8, 15, 16, 23, 42. Lower half: 4, 8, 15 (Q1 = 8). Upper half: 16, 23, 42 (Q3 = 23). IQR = 23 − 8 = 15.

Frequently asked questions

Why use IQR instead of range?

IQR focuses on the middle 50% of the data, making it far less sensitive to extreme outliers than the full range (max − min), which can be heavily skewed by a single unusual value.

How is IQR used to detect outliers?

A common rule flags any value more than 1.5×IQR below Q1 or above Q3 as a statistical outlier — the Outlier Calculator applies this method directly if you need outlier detection rather than just the IQR itself.