Quartile Calculator

Quartile Calculator

Find Q1, the median and Q3 of your data using the method your textbook, calculator or spreadsheet uses, and see exactly which values fall in each quarter.

Q1 = 25th percentile · Q2 = median · Q3 = 75th percentile

Separate with commas, spaces or new lines.

Quartile method

Most textbooks and TI-83/84 calculators: Q1 and Q3 are the medians of the lower and upper halves, leaving out the middle value when n is odd.

Enter at least four numbers to find the quartiles

What are Quartiles?

Quartiles are the three values that split sorted data into four parts with about the same number of values in each. A quarter of the data lies below Q1, half below Q2 (the median) and three quarters below Q3.

With the minimum and maximum, they make up the five-number summary that a box plot draws, and Q3 − Q1 is the interquartile range. They describe the shape of the data without being thrown off by a few extreme values.

The awkward part is that there's no single agreed way to calculate Q1 and Q3 for a small dataset. Textbooks, calculators and spreadsheets follow different conventions, which is why this calculator lets you choose.

Three Ways to Calculate Quartiles

Methods as catalogued by Hyndman and Fan (1996). See Sources.

1. Median of halves (textbooks, TI-83/84)

Q1 = median of the lower half · Q3 = median of the upper half

When n is odd, the middle value is left out of both halves.

2. Inclusive (Excel QUARTILE.INC, Google Sheets, R)

Q1 at position 0.25(n − 1) + 1 · Q3 at position 0.75(n − 1) + 1

3. Exclusive (Excel QUARTILE.EXC, Minitab, SPSS)

Q1 at position 0.25(n + 1) · Q3 at position 0.75(n + 1)

A position such as 3.5 means halfway between the 3rd and 4th values. All three methods give the same median, and they converge as the dataset grows.

Worked Example: the Classic Eleven-Value Set

Given:
6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 (n = 11), a set often used to compare quartile methods.
Step 1:
Median (every method agrees):
6th value = 40
Step 2:
Median of halves:
Lower 6, 7, 15, 36, 39 → Q1 = 15 · upper 41, 42, 43, 47, 49 → Q3 = 43
Step 3:
Inclusive (Excel):
Position 3.5 → (15 + 36) ÷ 2 = 25.5 · position 8.5 → (42 + 43) ÷ 2 = 42.5
Result:
Q1 is 15 or 25.5 depending on the method.

That changes the IQR from 28 to 17. Neither is wrong, but you should say which method you used.

Your Data Under Each Method

The classic eleven-value set, worked out all three ways. Enter your own data above to see it here.

Quartiles under three methods
MethodQ1Q3IQR
Median of halves154328
Inclusive (Excel QUARTILE.INC)25.542.517
Exclusive (Excel QUARTILE.EXC)154328

Common Quartile Mistakes

  • Including the median in both halves. In the usual textbook method the middle value is left out when n is odd. Some courses include it, which changes Q1 and Q3, so check yours.
  • Assuming Excel agrees with your textbook. QUARTILE and QUARTILE.INC interpolate, so they often disagree with hand calculations on small datasets.
  • Reading the position as the answer. Position 3.5 means halfway between the 3rd and 4th values, not the number 3.5.
  • Expecting exactly a quarter in each group. With 11 values the quarters can't be equal. The cut points just divide the data as evenly as possible.

Quartile Calculator FAQs

Which quartile method is correct?

All three are accepted conventions. Use the one your course, exam board or software expects, and state it in any report.

Which method does a TI-84 use?

The 1-Var Stats command on TI-83 and TI-84 calculators uses the median of halves, leaving out the median when n is odd.

Are quartiles the same as percentiles?

Q1, Q2 and Q3 are the 25th, 50th and 75th percentiles. The percentile calculator handles any other percentage.

What are Q0 and Q4?

Sometimes used for the minimum and maximum, so that the five-number summary reads Q0 to Q4.

Why do the methods agree for large datasets?

The differences come from how each method treats the few values next to the cut points. With hundreds of values those neighbours are almost the same, so the methods converge.

How do I calculate quartiles in Excel?

=QUARTILE.INC(range,1) and =QUARTILE.INC(range,3), or QUARTILE.EXC for the exclusive method. There’s no built-in median-of-halves function.

Can a quartile be a value that isn’t in the data?

Yes, whenever it falls between two values. 25.5 in the worked example is halfway between 15 and 36.

What if there are repeated values?

Keep every repeat. Quartiles are positions in the full sorted list, so duplicates count just like any other value.

Sources

Related Tools