Interquartile Range Calculator

Paste a list of numbers to find the first and third quartiles, the interquartile range, the five-number summary and any outliers by the 1.5 × IQR rule.

How to find the interquartile range

  1. Sort the data from smallest to largest.
  2. Find the median, which splits the data into a lower and an upper half. With an odd count, leave the median out of both halves.
  3. Q1 is the median of the lower half and Q3 is the median of the upper half.
  4. IQR = Q3 − Q1.

Worked example

For 4, 7, 8, 10, 12, 15, 18, 20, 22 the median is 12. The lower half 4, 7, 8, 10 gives Q1 = 7.5 and the upper half 15, 18, 20, 22 gives Q3 = 19. IQR = 19 − 7.5 = 11.5.

Finding outliers

Lower fence = Q1 − 1.5 × IQR Upper fence = Q3 + 1.5 × IQR

Values outside the fences are flagged as possible outliers. In the example the fences are −9.75 and 36.25, so there are none.

Software packages use several quartile methods, so their Q1 and Q3 can differ slightly. This calculator uses the median-of-halves method taught in most classes.

Frequently asked questions

What does the IQR tell you?

It measures the spread of the middle 50% of the data and is not affected by extreme values.

Why does my calculator give a different Q1?

There are several ways to compute quartiles. Spreadsheets often interpolate, which can give slightly different results.

What is the five-number summary?

Minimum, Q1, median, Q3 and maximum. It is the basis of a box plot.

Is IQR the same as range?

No. Range is maximum minus minimum; IQR covers only the middle half.

Related calculators