QUARTILE CALCULATOR

Quartile calculator

Enter your numbers, get the quartiles and IQR.

How do I find the quartiles?

Sort the data and find the median. Q1 is the median of the lower half and Q3 the median of the upper half; with an odd count, the median itself is left out of both halves. For 1, 3, 5, 7, 9, 11, 13: Q1 = 3, median = 7, Q3 = 11.

What is the interquartile range?

IQR = Q3 − Q1, the spread of the middle half of the data: 11 − 3 = 8 in the example.

How do I find outliers?

Values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR are outliers. In 2, 4, 4, 5, 6, 7, 8, 30, the IQR is 3.5 and the upper fence 12.75, so 30 is an outlier. NIST’s box plot description uses the same 1.5 × IQR limits and, as a second step, 3.0 × IQR for points that are far out.

Worked example: 13 home prices

OpenStax (Introductory Statistics 2e, Example 2.13) lists 13 sale prices in dollars: 114,950; 158,000; 230,500; 387,000; 389,950; 479,000; 488,800; 529,000; 575,000; 639,000; 659,000; 1,095,000; 5,500,000. The median is the 7th value, 488,800. Leaving it out, the lower half has six values, so Q1 is the mean of the 3rd and 4th, 308,750; the upper half gives Q3 = 649,000. The IQR is 340,250, and 1.5 × IQR = 510,375. The fences are −201,625 and 1,159,375, so 5,500,000 is the one potential outlier. A single huge price like this pulls the mean far above the median, but barely moves the quartiles.

Why do other calculators give different quartiles?

There are several methods. This one — halves without the median — is what TI-83/84 calculators use, and it is the method in the OpenStax text. Spreadsheets often interpolate instead, so their numbers can differ: on the 13 prices, Excel’s QUARTILE.INC rule gives Q1 = 387,000 and Q3 = 639,000, against 308,750 and 649,000 here. Neither is wrong; they answer slightly different definitions, so compare quartiles only when they come from the same method.

What is the five-number summary?

Minimum, Q1, median, Q3 and maximum — the five numbers a box plot is drawn from. The table lists them all. The box covers the middle 50% of the data, from Q1 to Q3, with a line at the median, and the whiskers reach out to the extremes inside the fences.

Common mistakes with quartiles

First, finding the quartiles of unsorted data; the calculator sorts for you, but by hand the order matters. Second, including the median in both halves when the count is odd, which this method does not do. Third, treating an outlier flag as an error: it only marks a value worth checking, and a real observation should stay in the data. Fourth, using quartiles on a handful of values: with only four or five numbers, the quartiles change a lot from one method to another. Fifth, confusing the IQR with the range: the range runs from minimum to maximum, the IQR only across the middle half.

Worked example: an even number of values

For 2, 4, 4, 5, 6, 7, 8, 30 there are eight values and no single middle one, so the median is the mean of the 4th and 5th: (5 + 6) ÷ 2 = 5.5. The lower half is 2, 4, 4, 5 and its median is Q1 = 4; the upper half is 6, 7, 8, 30 and its median is Q3 = 7.5. Nothing is left out of either half because the count is even. The IQR is 7.5 − 4 = 3.5, and the fences are -1.25 and 12.75. The value 30 lies far beyond the upper fence and is flagged, while the mean of the data (about 8.3) is pulled well above the median of 5.5.

Reading the quartiles: where the median sits

In a box plot, the position of the median line inside the box shows how the middle half of the data is spread. A rough number for this is the quartile skewness (Q3 + Q1 − 2 × median) ÷ IQR: positive means the median sits nearer Q1 and the upper part of the box is stretched out, negative means the opposite, and about 0 means a roughly symmetric middle. For the eight values above it is 0.14. For the 13 home prices it is -0.06, almost 0, even though the highest price is more than 5 million: the measure uses only the middle half of the data, so it ignores what happens in the tails. Use it together with the fences, not instead of them.

Sources: OpenStax, Introductory Statistics 2e, section 2.3 (Measures of the Location of the Data, Example 2.13); NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.3.7 (Box plot). Related: percentile calculator, average calculator, standard deviation calculator, mean absolute deviation calculator and z-score calculator.