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], ...)
| Argument | Required? | What it is |
|---|---|---|
number1 | Required | The first number, cell or range. |
number2 | Optional | More 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.
| Cell | Formula | Result | What it shows |
|---|---|---|---|
| F2 | =MEDIAN(B2:B6) | 4 | Typical delivery time; the 21-day order barely affects it |
| F3 | =AVERAGE(B2:B6) | 7 | The average for comparison, pulled up by one late order |
| F4 | =MEDIAN(B2:B5) | 3.5 | With 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
| Order | Delivery days | Check | Result | ||
| A-1 | 2 | Median | 4 | ||
| A-2 | 3 | Average | 7 | ||
| A-3 | 4 | First four orders | 3.5 | ||
| A-4 | 5 | ||||
| A-5 | 21 |
Practice MEDIAN
Graded instantly, then re-checked on changed data.
Typical deal size per rep
G2, return the median of Ana's five monthly deal totals. Fill down to G5 for the other reps.Common mistakes
| What you see | Why, and how to fix it |
|---|---|
| The median looks like a number that isn't in the list | With an even number of values, MEDIAN averages the two middle ones. That's correct behavior. |
| Blank cells change the result | They 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.