MEDIAN Function

Excel Functions › Statistical

All versions Statistical

The Excel MEDIAN function returns the middle value of a set of numbers — the value where half the data falls above and half below. Unlike AVERAGE, it shrugs off extreme outliers.


Quick answer:
=MEDIAN({1,2,3,4,5,6}) middle of an even set = 3.5

Syntax

=MEDIAN(number1, [number2], ...)
ArgumentDescription
number1RequiredThe first number, cell reference, or range whose median you want.
number2, ...OptionalUp to 254 additional numbers or ranges. Excel sorts all the values internally to find the middle.

How to use it

MEDIAN sorts the values and returns the one in the middle. With an odd count it returns the exact middle value; with an even count it returns the average of the two middle values.

=MEDIAN({1,2,3,4,5}) // odd count, middle = 3
=MEDIAN({1,2,3,4,5,6}) // even count = (3+4)/2 = 3.5

Because it ignores how far away the extremes are, MEDIAN is the go-to summary for skewed data like salaries or home prices, where a few huge values would drag the AVERAGE upward.

Median vs average: for {1, 2, 3, 100} the MEDIAN is 2.5 but the AVERAGE is 26.5. When one number is wildly out of line, the median is usually the more honest "typical" value.

Try it: interactive demo

Live demo

Pick a MEDIAN example to see the formula and its result.

Result:

Practice workbook

📊
Download the free MEDIAN practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

How does MEDIAN handle an even number of values?
It averages the two middle values. For {1,2,3,4,5,6} the two middle numbers are 3 and 4, so MEDIAN returns 3.5.
When should I use MEDIAN instead of AVERAGE?
Use MEDIAN for skewed data or data with outliers — salaries, house prices, response times. A few extreme values pull the AVERAGE around but barely move the median.
Does MEDIAN ignore blank cells and text?
Yes — empty cells, text, and logical values inside a referenced range are skipped; only numbers count. (Logical values passed directly as arguments are counted.)
Is there a conditional MEDIAN like MEDIANIF?
There is no MEDIANIF function. Use an array formula such as =MEDIAN(IF(A2:A100="East",B2:B100)) entered with Ctrl+Shift+Enter (or naturally in Excel 365).

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: AVERAGE · MODE.SNGL · QUARTILE.INC · PERCENTILE.INC · MIN · MAX