Spreadsheet Practice

MEDIAN function

MEDIAN returns the middle value once the numbers are sorted. Half the values are above it and half below, so a single extreme number barely moves it. That makes it a better "typical" figure than AVERAGE for things like delivery times, house prices or salaries.

Available in
Every current version
Category
Statistical functions
Returns
The middle number. With an even count of numbers, the average of the two in the middle.
Google Sheets
Also available in Google Sheets.

Syntax

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

ArgumentRequired?What it is
number1RequiredThe first number, cell or range.
number2OptionalMore numbers, cells or ranges, up to 255 in total.

Examples

Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.

CellFormulaResultWhat it shows
F2=MEDIAN(B2:B6)4Typical delivery time; the 21-day order barely affects it
F3=AVERAGE(B2:B6)7The average for comparison, pulled up by one late order
F4=MEDIAN(B2:B5)3.5With four values, the median is the average of the middle two

Try it live

This is the sample sheet. Change any number or text, or edit a formula, and the results update.

Show the sample data as a table
OrderDelivery daysCheckResult
A-12Median4
A-23Average7
A-34First four orders3.5
A-45
A-521

Practice MEDIAN

Graded instantly, then re-checked on changed data.

Typical deal size per rep

In G2, return the median of Ana's five monthly deal totals. Fill down to G5 for the other reps.

Common mistakes

What you seeWhy, and how to fix it
The median looks like a number that isn't in the listWith an even number of values, MEDIAN averages the two middle ones. That's correct behavior.
Blank cells change the resultThey don't: MEDIAN skips empty cells. Zeros are included, though, so a 0 meaning "no data" will drag the median down.

Tips

  • Report the median and the average together. A big gap between them tells you the data has outliers.

Questions

When should I use MEDIAN instead of AVERAGE?

When a few very large or very small values would distort the average, such as salaries, prices or response times.

Does the data need to be sorted for MEDIAN?

No. MEDIAN sorts the values internally.

Last reviewed October 2026. Every example result on this page is calculated live by the Spreadsheet Practice formula engine.