Interquartile Range Calculator

Find the quartiles (Q1, median, Q3), the interquartile range, the five-number summary and a box plot from any list of numbers, with the median-of-halves method shown step by step.

IQR
28
Minimum
6
Q1
15
Median (Q2)
40
Q3
43
Maximum
49
Lower fence
−27
Upper fence
85
Q1 15M 40Q3 43
Box plot. Whiskers reach the most extreme values inside the fences; red circles are outliers.
−20020406080
▲ mean 33.1818 · ◆ median 40

Step-by-step working

  1. Sort the data6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49
  2. Find the median (Q2) of all 11 valuesQ2 = 40
  3. n is odd, so leave the median out and split the data into a lower and upper halflower: 6, 7, 15, 36, 39 upper: 41, 42, 43, 47, 49
  4. Q1 is the median of the lower half; Q3 is the median of the upper halfQ1 = 15, Q3 = 43
  5. Interquartile range = Q3 − Q1IQR = 43 − 15 = 28
  6. Fences: 1.5 × IQR below Q1 and above Q3lower = 15 − 1.5 × 28 = −27 upper = 43 + 1.5 × 28 = 85
  7. Any value outside the fences is an outlierNone — every value is inside the fences

Note: Excel’s QUARTILE.INC (and some textbooks) interpolate instead, giving Q1 = 25.5 and Q3 = 42.5. Both are accepted methods; use the one your course teaches.

Formula IQR = Q3 − Q1 five-number summary: min, Q1, median, Q3, max

Ask the tutor about your result

An AI tutor reads your inputs and results above and explains them in plain English. The numbers come from the calculator; the explanation is AI-written, so check it against your notes.

How to find Q1, Q3 and the IQR

  1. Sort the data and find the median.
  2. Split the data into a lower half and an upper half. With an odd count, leave the median out of both halves.
  3. Q1 is the median of the lower half; Q3 is the median of the upper half.
  4. IQR = Q3 − Q1: the spread of the middle 50% of the data.

This is the method used by the TI-83/84 and most introductory statistics textbooks (Moore, The Basic Practice of Statistics). Excel’s QUARTILE.INC interpolates instead and can give slightly different quartiles; the calculator notes when that happens.

Reading a box plot

The box runs from Q1 to Q3 with a line at the median, so it holds the middle half of the data. Whiskers extend to the most extreme values that are not outliers, and outliers (beyond 1.5 × IQR from the box) are plotted as separate points. A median off-centre in the box, or one whisker much longer than the other, suggests skew.

Frequently asked questions

Why is the IQR better than the range?

It ignores the top and bottom quarters of the data, so a single extreme value cannot inflate it. That makes it a resistant measure of spread, the natural partner of the median.

Why does my textbook get a different Q1?

There are several accepted quartile definitions. This calculator uses the median-of-halves (exclusive) method; Excel and some texts interpolate. Use whichever your course specifies.

What is the five-number summary?

Minimum, Q1, median, Q3 and maximum: the five values a box plot is drawn from.