Boneyard Tools

Interquartile Range (IQR) Calculator

Paste a data set to find the first quartile, median, third quartile and interquartile range, with Tukey fences at 1.5 times the IQR. Any values beyond the fences are flagged as outliers.

How to calculate the interquartile range

  1. Enter your numbers separated by commas, spaces or new lines.
  2. Read off Q1, Q3 and the IQR (Q3 minus Q1).
  3. Check the fences and the list of flagged outliers.

Examples

Quartiles of 1 to 9

1, 2, 3, 4, 5, 6, 7, 8, 9
Q1 = 3, median = 5, Q3 = 7, IQR = 4

Frequently asked questions

What is the interquartile range?

The IQR is the spread of the middle half of the data: the third quartile minus the first quartile (Q3 - Q1). It is resistant to extreme values.

Which quartile method does this use?

Linear interpolation between closest ranks, matching Excel PERCENTILE.INC and NumPy. Other tools may use slightly different rules, so quartiles can vary a little.

How are outliers detected?

By Tukey's fences. Values below Q1 minus 1.5 times the IQR, or above Q3 plus 1.5 times the IQR, are flagged as outliers.

Why use the IQR instead of the range?

The full range depends on the two most extreme values, so one outlier distorts it. The IQR ignores the tails and describes the typical spread.

Can I paste data in any order?

Yes. The calculator sorts your values before computing the quartiles, so the input order does not matter.

Related tools