Quartile Calculator: Q1, Q3, IQR and Five Number Summary

Paste a list of numbers to get Q1, the median, Q3, the interquartile range (IQR), the five number summary and any outliers, with every step shown and a box plot of your data.

Your data

Five number summary

Step-by-step working

Same data, four quartile methods

Textbooks, calculators and spreadsheets do not all find quartiles the same way. If your answer is different from your teacher’s, check which method your class uses.

How to use the quartile calculator

  1. Type or paste your numbers into the box. Separate them with commas, spaces or new lines. They do not need to be in order.
  2. Pick the quartile method your class or software uses. If you are not sure, leave it on the first one, which is the method used by the TI-84 and most school textbooks.
  3. Read the five number summary, the interquartile range and the outliers. The box plot and the working update as you type.

What are quartiles?

Quartiles are three values that cut an ordered data set into four parts with the same number of values in each part.

  • Q1 (lower quartile): one quarter of the data lies below it.
  • Q2 (median): half of the data lies below it.
  • Q3 (upper quartile): three quarters of the data lies below it.

Together with the smallest and largest values, the quartiles make the five number summary: minimum, Q1, median, Q3, maximum. A box plot is a drawing of these five numbers.

How to find quartiles by hand

  1. Write the data in order from smallest to largest.
  2. Find the median. If there is an odd number of values it is the middle one. If there is an even number, it is the mean of the two middle values.
  3. Split the data into a lower half and an upper half. If the number of values is odd, leave the median out of both halves.
  4. Q1 is the median of the lower half. Q3 is the median of the upper half.

Worked example: find the quartiles of 3, 7, 8, 5, 12, 14, 21, 13, 18. In order: 3, 5, 7, 8, 12, 13, 14, 18, 21. There are 9 values, so the median is the 5th value, 12. The lower half is 3, 5, 7, 8, so \(Q_1 = \dfrac{5+7}{2} = 6\). The upper half is 13, 14, 18, 21, so \(Q_3 = \dfrac{14+18}{2} = 16\).

Interquartile range (IQR)

The interquartile range is the distance between the first and third quartiles. It tells you how spread out the middle half of the data is.

\[ \text{IQR} = Q_3 – Q_1 \]

In the example above, \(\text{IQR} = 16 – 6 = 10\). Unlike the range, the IQR is not changed by one very large or very small value, which is why it is used to describe skewed data.

How to find outliers with the 1.5 × IQR rule

A value is called an outlier if it lies more than 1.5 times the IQR below Q1 or above Q3. These two cut-off points are called fences.

\[ \text{Lower fence} = Q_1 – 1.5 \times \text{IQR} \]

\[ \text{Upper fence} = Q_3 + 1.5 \times \text{IQR} \]

Worked example: for 12, 15, 17, 20, 22, 24, 25, 28, 31, 58 the quartiles are \(Q_1 = 17\) and \(Q_3 = 28\), so \(\text{IQR} = 11\). The fences are \(17 – 1.5(11) = 0.5\) and \(28 + 1.5(11) = 44.5\). The value 58 is above the upper fence, so it is an outlier.

Why do calculators give different quartiles?

There is more than one accepted way to find quartiles, and they can give slightly different answers for the same data. None of them is wrong. Use the one your teacher, textbook or exam board uses.

MethodWhere it is usedQ1 and Q3 for 3, 5, 7, 8, 12, 13, 14, 18, 21
Median of halves, median left outTI-83 and TI-84 calculators, most US textbooks, AP Statistics6 and 16
Median of halves, median includedTukey’s hinges, some textbooks7 and 14
QUARTILE.INCExcel, Google Sheets (the default QUARTILE function)7 and 14
QUARTILE.EXCExcel, Minitab, SPSS6 and 16

The calculator shows all four side by side under the working, so you can see at once whether a different method explains a different answer.

Frequently asked questions

How do you find Q1 and Q3?

Put the data in order and find the median. Q1 is the median of the lower half of the data and Q3 is the median of the upper half. If the number of values is odd, most textbooks leave the median out of both halves.

What is the five number summary?

It is the minimum, the first quartile (Q1), the median, the third quartile (Q3) and the maximum of a data set. These five numbers are what a box plot shows.

How do you calculate the interquartile range?

Subtract the first quartile from the third quartile: IQR = Q3 − Q1. For example, if Q1 is 6 and Q3 is 16, the IQR is 10.

How do you find outliers using the IQR?

Multiply the IQR by 1.5. Subtract that from Q1 to get the lower fence and add it to Q3 to get the upper fence. Any value below the lower fence or above the upper fence is an outlier.

Why is my answer different from Excel?

Excel’s QUARTILE and QUARTILE.INC functions find quartiles by position and interpolate between values, while most textbooks and the TI-84 use the median of each half. Change the method in the calculator to QUARTILE.INC to match Excel and Google Sheets.

Is the median the same as Q2?

Yes. The second quartile, Q2, is the median. Half of the data lies below it and half above it.

Related tools