The MEDIAN function
MEDIAN sorts the numbers and returns the one in the middle. With an even count, it averages the two middle values.
Because one extreme value can't drag it up or down, the median is often a fairer "typical" figure than the average for things like prices, salaries and journey times.
=MEDIAN(number1, [number2], ...)
Arguments
- number1
- The first number, cell or range.
- number2, ...optional
- More numbers, cells or ranges.
Try it
=MEDIAN(B2:B6) in D2. In order, the prices are £235,000, £248,500, £251,000, £262,000 and £1,150,000. The middle one is £251,000.
D2
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | House | Sold for | Median price | ||
| 2 | No. 3 | £235,000 | £251,000 | ||
| 3 | No. 7 | £248,500 | |||
| 4 | No. 12 | £262,000 | |||
| 5 | No. 15 | £251,000 | |||
| 6 | The Manor | £1,150,000 | |||
| 7 | |||||
| 8 |
Edit the formula in D2, or change the data, and press Enter.
More examples
| Formula | Result | What it does |
|---|---|---|
| =AVERAGE(B2:B6) | £429,300 | The manor pulls the average far above what most houses sold for. |
| =MEDIAN(B2:B5) | £249,750 | Four values: the average of the middle two, £248,500 and £251,000. |
| =MEDIAN(3,1,4,1,5) | 3 | Typed numbers work too, and don't need to be in order. |
Tips
- Report the median alongside the average: if they're far apart, a few extreme values are skewing the data.
- Blank cells and text are ignored, but zeros are included.
Common mistakes
- The median is lower than expected.Zeros for missing data are counted as real values. Leave those cells blank.
- You expected the value in the middle row.MEDIAN sorts the numbers first. The middle *row* of unsorted data isn't the median.
Practise MEDIAN with instant feedback
Type real formulas into a working spreadsheet and get told straight away whether they work.