Median Calculator

Median Calculator

Paste a list of numbers to find the median, the middle value once they're sorted. The calculator shows which value (or pair of values) it comes from and compares it with the mean.

Median = value at position (n + 1) ÷ 2 of the sorted data

Separate with commas, spaces or new lines. They don't need to be in order.

Enter some numbers to find the median

What is the Median?

The median is the middle value once the data is sorted. Half the values are at or below it and half are at or above it. With an even number of values there are two middle values, and the median is halfway between them.

Its main strength is that extreme values hardly move it. A street of four ordinary houses and one mansion has a median price that still describes an ordinary house, while the mean is dragged up by the mansion. That's why incomes and house prices are usually reported as medians.

Comparing the median with the mean is a quick check on the shape of the data. A mean well above the median points to a long tail of high values; a mean well below it, to a tail of low values.

How to Find the Median

Definition as given in the NIST/SEMATECH e-Handbook of Statistical Methods. See Sources.

1. Sort the values

Arrange them from smallest to largest. Keep every repeated value; each one counts.

2. Find the middle position

Middle position = (n + 1) ÷ 2

With 9 values that's position 5. With 10 values it's 5.5, halfway between positions 5 and 6.

3. Read off the median

n odd: the value at the middle position
n even: (value at n ÷ 2 + value at n ÷ 2 + 1) ÷ 2

Worked Example: House Prices on One Street

Given:
Five houses sold for $250k, $210k, $1,200k, $265k and $235k.
Step 1:
Sort the prices:
210, 235, 250, 265, 1,200
Step 2:
Middle position:
(5 + 1) ÷ 2 = 3rd value = 250
Step 3:
Compare with the mean:
(210 + 235 + 250 + 265 + 1,200) ÷ 5 = 2,160 ÷ 5 = 432
Result:
The median price is $250k.

The mean of $432k is higher than four of the five prices, so it describes none of the ordinary houses. The median does.

Median vs Mean with an Outlier

Four fixed prices ($210k, $235k, $250k, $265k) plus a fifth house that gets more and more expensive. The median doesn't move; the mean follows the outlier.

Median and mean as the most expensive house becomes more extreme
Fifth houseMedianMean
$290k$250k$250k
$500k$250k$292k
$1,200k$250k$432k
$5,000k$250k$1,192k
$50,000k$250k$10,192k

Common Median Mistakes

  • Not sorting first. The median is the middle of the sorted list, not the middle of the list as it was written down. For 250, 210, 1,200, 265, 235, the middle entry as written is 1,200, which is the largest value.
  • Giving the position instead of the value. (n + 1) ÷ 2 tells you where the median is. With 9 values the median is the 5th value, not the number 5.
  • Dropping repeated values. In 3, 3, 3, 8 the median is 3. Every occurrence counts, not just each distinct value.
  • Combining medians. The median of two groups put together can't be worked out from each group's median. Combine the data and find it again.

Median Calculator FAQs

What if there’s an even number of values?

There’s no single middle value, so the median is the average of the two in the middle. For 2, 4, 6, 8 it’s (4 + 6) ÷ 2 = 5.

Can the median be a number that isn’t in the data?

Yes, when the count is even. The median of 2, 4, 6, 8 is 5, which isn’t one of the values. With an odd count, the median is always one of the values.

When should I use the median instead of the mean?

When the data is skewed or has outliers: incomes, house prices, journey times, hospital stays. Also for ranked data such as survey ratings, where the gaps between ranks aren’t equal.

Is the median the same as the 50th percentile?

Yes. It’s also called the second quartile (Q2). Every quartile method gives the same median.

Does the order I type the numbers in matter?

No. The calculator sorts them before finding the middle.

How do I find the median in Excel or Google Sheets?

Use MEDIAN(range). It handles even counts the same way, by averaging the middle two values.

What is the median of grouped data?

When you only have counts for ranges (such as “12 people aged 30–40”), the median is estimated by interpolating within the class that contains the middle value. The grouped data calculator does this.

Why is median income lower than mean income?

Income is right-skewed: most people earn moderate amounts and a few earn a great deal. The high earners raise the mean but barely affect the median, so the median is closer to what a typical person earns.

Sources

Related Tools