Excel tutorial
/

Functions

Intermediate

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.

Книга1 - Excel
—☐✕
E3fx=МЕДИАНА(B2:B7)
ABCDEF
1EmployeeSalaryMeasureValue
2Aziz4 500 000Average8 416 667
3Dilnoza5 200 000Median5 100 000
4Javohir4 800 000
5Malika5 000 000
6Sardor6 000 000
7Rustam (director)25 000 000
8
Готово
The average, 8.4 million, was pushed up by the director’s salary. The median, 5.1 million, is the real “middle” of ordinary salaries

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.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить функциюАвтосуммаФинансовыеЛогическиеТекстовыеДата и времяСсылки и массивыМатематические
Библиотека функций
Диспетчер имён
Определённые имена
E3fx
ABCDEF
1EmployeeSalaryMeasureValue
2Aziz4 500 000Average
3Dilnoza5 200 000Median
4
5
Готово

2

In Or select a category choose Statistical, find MEDIAN in the list and click OK.

Книга1 - Excel
—☐✕
B2fx4500000
ABCD
1EmployeeSalary
2Aziz4 500 000
3Dilnoza5 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.

Книга1 - Excel
—☐✕
E3fx=МЕДИАНА(B2:B7)
ABCDEF
1EmployeeSalaryMeasureValue
2Aziz4 500 000Average8 416 667
3Dilnoza5 200 000Median5 100 000
4Javohir4 800 000
5Malika5 000 000
6Sardor6 000 000
7Rustam25 000 000
8
ГотовоСреднее: 8416666,6667Количество: 6Сумма: 50500000
Книга1 - Excel
—☐✕
B8fx=МЕДИАНА(B2:B7)
ABCD
1Odd (5)Even (6)
233
377
499
51212
64040
7941
810,5
9
Готово
Example 1: of 5 numbers the middle one is 9. With 6 numbers there are two in the middle (9 and 12), so the median is their average, 10.5
Книга1 - Excel
—☐✕
C6fx=B6-МЕДИАНА($B$2:$B$8)
ABCD
1DaySales (k)Diff from median
2Monday1 2500
3Tuesday1 180-70
4Wednesday1 32070
5Thursday1 210-40
6Friday2 9501 700
7Saturday1 27020
8Sunday640-610
9
Готово
Example 2: a “normal day” is the median, 1,250. Friday (before a holiday) at +1,700 and Sunday (power cut) at −610 stand out at once. The average, 1,403, would misstate a normal day
Книга1 - Excel
—☐✕
E2fx1350
ABCDEF
1BranchSales (k)BranchMedian
2Tashkent1 250Tashkent1 350
3Samarkand820Samarkand860
4Tashkent1 400
5Bukhara760
6Tashkent3 900
7Samarkand900
8Tashkent1 300
9
ГотовоСреднее: 1105Количество: 2Сумма: 2210
Example 3: a conditional median. E2 holds =МЕДИАНА(ЕСЛИ($A$2:$A$8=D2;$B$2:$B$8)) — a plain Enter in Excel 365, Ctrl+Shift+Enter in older versions

Pro 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.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1EmployeeSalaryMeasureValue
2Aziz4500000Average
3Dilnoza5200000Median
4Javohir4800000
5Malika5000000
6Sardor6000000
7Rustam25000000
8
9
10
11
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

125 / 154