Median Calculator

Paste or type your numbers to get the median, with the working shown.

Median
10.5
8 values

Sorted data

347912151821

Steps

  1. Sort the 8 values from smallest to largest.
  2. 8 is even, so the median is the average of the values at positions 4 and 5.
  3. (9 + 12) ÷ 2 = 10.5
Q1
5.5
Q3
16.5
IQR (Q3 − Q1)
11
Min / Max
3 / 21

Quartiles use the textbook (TI-83/84) method. Excel QUARTILE.INC gives Q1 = 6.25 and Q3 = 15.75.

Need the mean and mode as well? Mean, median and mode calculator →

What the median tells you

The median is the value that splits a sorted list in half: as many values sit below it as above it. With an odd count it is the single middle value. With an even count there are two middle values, and the median is their average, so it may not appear in the data at all.

Its strength is that it ignores how extreme the extremes are. Change the largest value in a list from 50 to 5,000 and the mean shoots up, but the median does not move. That makes it the better "typical value" for skewed data such as salaries, home prices, response times and test scores with a few outliers.

The quartiles extend the same idea. Q1 is the median of the lower half and Q3 the median of the upper half, so a quarter of the data sits below Q1 and a quarter above Q3. The gap between them, the interquartile range, is the spread of the middle 50%. Textbooks, calculators and spreadsheets do not all split the halves the same way, so this page shows both the textbook result and Excel's.

Frequently asked questions

How do you find the median?

Sort the numbers from smallest to largest. If there is an odd number of values, the median is the one in the middle, at position (n + 1) ÷ 2. If there is an even number, it is the average of the two middle values, at positions n ÷ 2 and n ÷ 2 + 1. For 3, 7, 9, 12 the median is (7 + 9) ÷ 2 = 8.

What is the median of an even set of numbers?

The mean of the two values in the middle once the list is sorted. It does not have to be one of the numbers in the list: the median of 1, 2, 3, 4 is 2.5.

What is the difference between the median and the mean?

The mean adds every value and divides by the count, so one extreme value pulls it a long way. The median only cares about the middle position, so it barely moves. For 30, 32, 35, 36 and 500 the mean is 126.6 but the median is 35. That is why incomes and house prices are usually reported as medians.

Do duplicate numbers count?

Yes. Every value is one observation, so repeats stay in the sorted list and count toward the middle. The median of 2, 2, 2, 9 is 2.

Why are my quartiles different from Excel?

There is no single agreed way to compute quartiles. This calculator uses the method most US textbooks and the TI-83/84 use: split the sorted data into a lower and an upper half, leaving the median out of both halves when the count is odd, and take the median of each half. Excel QUARTILE.INC and Google Sheets QUARTILE interpolate instead, so they can give slightly different Q1 and Q3. Both results are shown. The median itself is the same in every method.

What is the interquartile range?

Q3 minus Q1: the spread of the middle half of the data. Like the median, it ignores the extremes, so it is a better measure of spread than the range when the data has outliers.