Science & Engineering

Median Calculator (Plus Mean, Mode, Range)

Find the median of any list of numbers, the middle value once they are sorted. It also returns the mean, mode, range, sum, and count for context.

Reviewed and updated

How to use
  1. Paste or type your list of numbers.
  2. Check the mean, mode, range, sum, and count alongside it.
Load sample
Median (middle value)
12

Sorted: 5, 8, 9, 12, 17, 21, 33

Count (n)
7
Mean (average)
15
Mean − median
3
Range (min–max)
28
For study and estimation. Verify against authoritative data before relying on a result.
Was this helpful?

Sort the data, then take the middle

odd count middle value;   even count average of the two middle values

The median is the value that splits a sorted data set into two equal halves. Sorting first is mandatory — the median of the raw, unsorted list is wrong. With an odd count there is one clear middle; with an even count you average the two straddling the center.

Two worked cases

  • Odd count. 12, 8, 21, 5, 33 sorts to 5, 8, 12, 21, 33. Five values, so the 3rd is the middle: median = 12.
  • Even count. 10, 15, 20, 25 is already sorted. The two middle values are 15 and 20, so median = (15 + 20) ÷ 2 = 17.5.

Why the median beats the mean on skewed data

Take 25, 28, 30, 32, 1000. The lone outlier barely moves the median but wrecks the mean.

Mean223
Median30

Four of the five values sit near 30, yet the single 1000 pulls the mean to 223. The median stays at 30, describing the typical value.

Median vs mean vs mode

MeasureWhat it isReacts to outliers?
Medianmiddle value when sortedno, resistant
Meansum divided by countyes, strongly
Modemost frequent valueno

In a symmetrical distribution the median and mean coincide. They diverge as the data skews — which is why US median household income (~$75K) sits well below the mean (~$105K).

Common questions

How do you find the median of a data set?

Sort the numbers from smallest to largest, then take the middle one. If there is an odd count, that single middle value is the median. If the count is even, average the two middle values.

What is the median of an even number of values?

It is the average of the two middle values after sorting. For 10, 15, 20, 25 the two middle numbers are 15 and 20, so the median is 17.5. The median does not have to be a value that appears in the set.

When is the median better than the mean?

When the data is skewed or has outliers. Incomes and house prices are classic cases: a few very large values drag the mean upward, while the median stays near the typical figure.

From the blog

Guides & how-tos

All articles →