Math function
Excel MEDIAN function
MEDIAN sorts your numbers and returns the one in the middle. With an even count it averages the two middle values. Use it for "typical" figures like house prices or salaries, where one extreme value would skew an average.
=MEDIAN(number1, [number2], ...)Arguments
number1- The first number, cell or range.
number2- Optional. More numbers, cells or ranges, up to 255.
MEDIAN examples
Every result below was calculated live from this sample sheet.
| A | B | C | |
|---|---|---|---|
| 1 | Listing | Price | Bedrooms |
| 2 | 12 Oak St | 315000 | 3 |
| 3 | 4 Elm Ave | 289000 | 2 |
| 4 | 88 Lake Rd | 1450000 | 5 |
| 5 | 19 Pine Ct | 342000 | 3 |
| 6 | 7 Birch Ln | 298000 | 3 |
| 7 | 31 Cedar Dr | 327000 | 4 |
Result: 321000
Six prices, so MEDIAN averages the two middle ones after sorting.
Result: 182500
How far the one mansion drags the average above the median. That gap is why MEDIAN is better for prices.
Result: 315000
Five prices give an odd count, so the middle value is returned as-is.
Result: 3
The typical number of bedrooms in these listings.
How to use MEDIAN
- Click an empty cell.
- Type =MEDIAN(
- Select the numbers. They do not need to be sorted.
- Close the bracket and press Enter.
Common MEDIAN mistakes
Sorting the data first
You do not need to. MEDIAN sorts internally and leaves your sheet alone.
Zeros used as placeholders
Zeros count as values and shift the middle. Leave unknown cells blank, because blanks are skipped.
Expecting a value from the list
With an even count, the median is the average of the two middle numbers, so it may not appear in your data.
MEDIAN FAQ
What is the difference between median and average in Excel?
AVERAGE adds everything and divides by the count. MEDIAN is the middle value. When a few values are extreme, the median is a better picture of the typical one.
How does Excel calculate the median of an even number of values?
It sorts the values and averages the two in the middle. For 2, 4, 6, 8 the median is 5.
Does MEDIAN ignore blank cells?
Yes. Blank cells and text in a range are ignored. Zeros are included.
Related functions
Updated 2026-10-31