Function · Statistical

Excel MEDIAN function

The Excel MEDIAN function returns the middle value. The four utility bills have no single middle, so Excel averages February and March and returns $107.325.

All current Excel versions. Also in Excel for the web and Google Sheets.

Syntax =MEDIAN(number1, [number2], ...)

MEDIAN
=MEDIAN(B2:B5)

Arguments

NameRequiredWhat to pass
number1RequiredThe first number or range.
number2OptionalMore numbers or ranges. Text and blanks are ignored.

Examples

Middle of four utility bills

=MEDIAN(B2:B5)

Result $107.325

=MEDIAN(B2:B5)B6
Utilities
AB
1MonthBill
2Jan143.60
3Feb96.20
4Mar118.45
5Apr88.10
6Median107.325
A picture of the sheet, not a live calculator. An odd count would return the single middle bill instead of an average.

MEDIAN is the middle after the numbers are sorted. Sorted, the four bills are $88.10, $96.20, $118.45, and $143.60. Two sit on each side of the center, so there is no single middle bill. Excel averages the two central ones, $96.20 and $118.45, and returns $107.325. AVERAGE of the same four is $111.5875, pulled up by January.

Add a fifth number and the median becomes whichever bill lands in third place, with no averaging. A blank month is ignored. A zero is included and can become the middle if you meant the cell to be empty. One very large January does not move the median the way it moves the average. That is the reason to look at both. TRIMMEAN of these four bills at 20% is 111.5875, the same number AVERAGE returns, because 0.8 rounds down to no points dropped. PERCENTILE.EXC at 0.5 and QUARTILE.EXC at quart 2 are the exclusive median.