The Median

Imagine you and your friends compare how much pocket money you get, and one friend happens to be very rich. The average would make everyone look rich. The value right in the middle gives a fairer picture of what's typical — and that middle value is the median.

The median is the value in the middle of the data once it is lined up from smallest to largest. Half the values sit below it and half sit above. It answers a different question from the mean: not "what is the fair share?" but "what is the value right in the middle of the pack?"

Imagine a class lined up shortest to tallest. The child standing exactly in the centre of the line is the median height — there are just as many shorter children on one side as taller children on the other.

Here are five animals sorted from shortest to tallest:

duck cat dog goat cow

Two animals are shorter than the dog and two are taller, so the dog in the middle is the median. Notice we did not have to know any exact heights — the median is about position in the sorted line, not about adding anything up.

Step one: put the numbers in order

The median lives in the middle of the sorted list, so you must sort the data first. The middle of the unsorted list means nothing.

Worked example (odd count). Find the median of

7, \quad 3, \quad 9, \quad 4, \quad 5

First sort from smallest to largest:

3, \quad 4, \quad \boxed{5}, \quad 7, \quad 9

There are five values, so the middle one is the 3rd. The median is 5 — two numbers below it, two numbers above it.

When there are two in the middle

With an even number of values there is no single middle value — there are two. The median is then the mean of those two middle values (add them and halve).

Worked example (even count). Find the median of

10, \quad 3, \quad 8, \quad 5

Sort them:

3, \quad \boxed{5}, \quad \boxed{8}, \quad 10

The two middle values are 5 and 8, so

\text{median} = \frac{5 + 8}{2} = 6.5

The median does not have to be one of the original numbers — here it is 6.5, which never appeared in the data at all.

See it: find the middle of a sorted row

Below is a row of numbers already sorted from smallest to largest. The tile in the very middle is highlighted — that is the median. Count from each end and you will reach it at the same time. Press Refresh for a brand-new row.

Why the median is useful

The median's superpower is that it is robust: because it only cares about the middle position, one wild value at an end barely moves it. The mean, where every value gets a vote, is dragged along instead. That is why incomes and house prices are usually reported as medians — a single billionaire would yank the mean upward, but the typical person's experience is captured far better by the middle value.

Five pets. Four are small and one is enormous:

cat cat duck dog rhino

The mean weight would be huge — the rhino drags it up so far that it no longer describes any of the small pets. But the median is just the middle animal, so it stays sensibly small. Swap the rhino for an even bigger elephant and the median does not budge at all.

Median versus mean under an outlier

Drag the orange point toward an extreme. Two lines track the data: the mean chases the outlier, while the median barely flinches — it stays anchored at the middle of the sorted values. This is exactly why incomes and house prices are usually reported as medians.

See it explained