Quartile Calculator

Enter a list of numbers to compute its quartiles.

Result

6.00
9.00
13.50
7.50

How it is calculated

Numbers can be separated by spaces or commas, and at least 4 are needed. The tool sorts them and uses the median-of-halves method: Q2 is the median of all values; Q1 is the median of the lower half and Q3 the median of the upper half; IQR = Q3 − Q1. Each half holds floor(n / 2) values. With an odd count the middle value belongs to neither half, with an even count the data splits cleanly in two. Results are shown to 2 decimals. If any entry is not a number, nothing is calculated. Spreadsheet functions and other textbooks use different interpolation rules, so their Q1 and Q3 can differ slightly on the same data.

Worked example

Data: 12 5 9 20 3 15 7 11 8. Sorted: 3, 5, 7, 8, 9, 11, 12, 15, 20 (n = 9). The median Q2 is the 5th value, 9.00. With 9 values, each half has 4: the lower half 3, 5, 7, 8 has median (5 + 7) / 2 = 6.00, so Q1 = 6.00. The upper half 11, 12, 15, 20 has median (12 + 15) / 2 = 13.50, so Q3 = 13.50. IQR = 13.50 − 6.00 = 7.50.

Try this example →

Common mistakes

  • Entering the numbers already grouped or as a frequency table. The tool expects each raw observation once, so a value that occurs three times must be typed three times.
  • Using decimal commas inside the list (for example 2,5). Commas separate numbers here, so write decimals with a point.
  • Comparing with a spreadsheet and assuming one is wrong. Different quartile methods give slightly different Q1 and Q3 on small samples; this tool uses the median of the lower and upper halves.
  • Expecting the middle value to be counted in both halves for an odd sample. Here it is left out of both halves.
  • Entering fewer than 4 values. Quartiles need enough data to form two halves, and a shorter list gives no result.

About this calculator

Quartiles split an ordered data set into four equal-sized groups: Q1 (the first quartile) is the value below which about a quarter of the data falls, Q2 is the median, splitting the data in half, and Q3 (the third quartile) is the value below which about three-quarters of the data falls. The interquartile range, IQR = Q3 − Q1, measures the spread of the middle 50% of the data, ignoring the extremes at either end.

Statisticians and data analysts use quartiles constantly to summarize a distribution without being thrown off by outliers the way a mean can be — the box-and-whisker plot is built directly from Q1, the median, and Q3, and the common ‘1.5 × IQR’ rule flags any point more than 1.5 interquartile ranges below Q1 or above Q3 as a potential outlier worth a closer look.

Enter a list of numbers and the calculator sorts the data and returns Q1, Q2 (the median), Q3 and the interquartile range.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators