Excel MEDIAN function: when the average lies, use the median
MEDIAN returns the middle value of a sorted list and ignores the pull of outliers. Salary, price and sales analysis, the even-count rule and common traps.
Five people in a department earn 4.5–6 million sum, and the director earns 25 million. AVERAGE says “the average salary is 8.4 million” — yet nobody earns that. One big number dragged the whole average up.
MEDIAN lines the values up in ascending order and takes the middle one: half are smaller, half are larger. One or two extreme values at either end barely move it.
That is why for “uneven” data — salaries, apartment prices, delivery times, daily sales — the median paints a far more realistic picture.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Employee | Salary | Measure | Value | ||
| 2 | Aziz | 4 500 000 | Average | 8 416 667 | ||
| 3 | Dilnoza | 5 200 000 | Median | 5 100 000 | ||
| 4 | Javohir | 4 800 000 | ||||
| 5 | Malika | 5 000 000 | ||||
| 6 | Sardor | 6 000 000 | ||||
| 7 | Rustam (director) | 25 000 000 | ||||
| 8 |
Syntax
=МЕДИАНА(number1; [number2]; ...)
- number1 — a number, cell or range (for example,
B2:B7). - number2, … — more numbers or ranges, up to 255 in total.
How it is calculated:
- With an odd number of values — exactly the middle one.
- With an even number — the average of the two middle values (which may not appear in the list).
- Text, TRUE/FALSE and empty cells in a range are ignored, but 0 is counted.
- No need to sort first — Excel orders the values itself.
Entering MEDIAN step by step
1
Select the result cell (E3). On the Формулы tab click Вставить функцию, or press Shift + F3.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Employee | Salary | Measure | Value | ||
| 2 | Aziz | 4 500 000 | Average | |||
| 3 | Dilnoza | 5 200 000 | Median | |||
| 4 | ||||||
| 5 |
2
In Or select a category choose Statistical, find MEDIAN in the list and click OK.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Employee | Salary | ||
| 2 | Aziz | 4 500 000 | ||
| 3 | Dilnoza | 5 200 000 | ||
| 4 | ||||
| 5 |
3
In Number1, select the salary range — B2:B7 — and click OK. The result appears at the bottom of the window right away.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Employee | Salary | Measure | Value | ||
| 2 | Aziz | 4 500 000 | Average | 8 416 667 | ||
| 3 | Dilnoza | 5 200 000 | Median | 5 100 000 | ||
| 4 | Javohir | 4 800 000 | ||||
| 5 | Malika | 5 000 000 | ||||
| 6 | Sardor | 6 000 000 | ||||
| 7 | Rustam | 25 000 000 | ||||
| 8 |
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Odd (5) | Even (6) | ||
| 2 | 3 | 3 | ||
| 3 | 7 | 7 | ||
| 4 | 9 | 9 | ||
| 5 | 12 | 12 | ||
| 6 | 40 | 40 | ||
| 7 | 9 | 41 | ||
| 8 | 10,5 | |||
| 9 |
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Day | Sales (k) | Diff from median | |
| 2 | Monday | 1 250 | 0 | |
| 3 | Tuesday | 1 180 | -70 | |
| 4 | Wednesday | 1 320 | 70 | |
| 5 | Thursday | 1 210 | -40 | |
| 6 | Friday | 2 950 | 1 700 | |
| 7 | Saturday | 1 270 | 20 | |
| 8 | Sunday | 640 | -610 | |
| 9 |
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Branch | Sales (k) | Branch | Median | ||
| 2 | Tashkent | 1 250 | Tashkent | 1 350 | ||
| 3 | Samarkand | 820 | Samarkand | 860 | ||
| 4 | Tashkent | 1 400 | ||||
| 5 | Bukhara | 760 | ||||
| 6 | Tashkent | 3 900 | ||||
| 7 | Samarkand | 900 | ||||
| 8 | Tashkent | 1 300 | ||||
| 9 |
=МЕДИАНА(ЕСЛИ($A$2:$A$8=D2;$B$2:$B$8)) — a plain Enter in Excel 365, Ctrl+Shift+Enter in older versionsPro level: AVERAGE or MEDIAN?
- Skew test:
=СРЗНАЧ(B2:B100)/МЕДИАНА(B2:B100). Close to 1 — the data is even and AVERAGE is fine. Above 1.2 — there is a long “tail”, so report the median. - Conditional median:
=МЕДИАНА(ЕСЛИ(A2:A100="Tashkent";B2:B100))— Excel has no MEDIANIFS function, and this formula fills the gap. In Excel 365=МЕДИАНА(ФИЛЬТР(B2:B100;A2:A100="Tashkent"))also works. - The median is the 50th percentile:
=ПЕРСЕНТИЛЬ(B2:B100;0,5)and=КВАРТИЛЬ(B2:B100;2)return the same result. QUARTILE 1 and 3 give you the bounds of the “middle 50%”. - Works with dates too: the median of order dates is the “typical” order date.
Try it in the simulator
Type =СРЗНАЧ(B2:B7) in E2 and =МЕДИАНА(B2:B7) in E3. Then change 25000000 in B7 to 6000000: the average drops sharply while the median barely moves.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Employee | Salary | Measure | Value | ||||||||||||||||||||
| 2 | Aziz | 4500000 | Average | |||||||||||||||||||||
| 3 | Dilnoza | 5200000 | Median | |||||||||||||||||||||
| 4 | Javohir | 4800000 | ||||||||||||||||||||||
| 5 | Malika | 5000000 | ||||||||||||||||||||||
| 6 | Sardor | 6000000 | ||||||||||||||||||||||
| 7 | Rustam | 25000000 | ||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 | ||||||||||||||||||||||||
| 11 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.