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.
Syntax
| Argument | Description | |
|---|---|---|
number1 | Required | The first number, cell reference, or range whose median you want. |
number2, ... | Optional | Up 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.
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
Pick a MEDIAN example to see the formula and its result.
Practice workbook
Frequently asked questions
How does MEDIAN handle an even number of values?
{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?
Does MEDIAN ignore blank cells and text?
Is there a conditional MEDIAN like MEDIANIF?
=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