Statistical
MEDIAN Function in Excel
Returns the median (middle value) of the given numbers. The median is the number in the middle of a set of numbers.
Syntax
- =MEDIAN(number1, [number2], ...)
Arguments
- number1 (required): First number or range
- number2 (optional): Additional numbers or ranges
Examples
- =MEDIAN(1, 2, 3, 4, 5) - Median of odd count - Result: 3
- =MEDIAN(1, 2, 3, 4) - Median of even count (average of middle two) - Result: 2.5
- =MEDIAN(A1:A100) - Median of range - Result: Middle value
Excel MEDIAN function documentation
- MEDIAN returns the middle value in a sorted set of numbers — resistant to outliers unlike [AVERAGE](/functions/average/).
- Syntax: =MEDIAN(number1, [number2], …). Ignores text and blank cells.
- Use for salary bands, home prices, survey scales, and any skewed distribution.
- Related: [AVERAGE](/functions/average/), [MODE](/functions/mode-sngl/), [PERCENTILE](/functions/percentile-inc/).
How MEDIAN handles even vs odd counts
- Odd count of values — MEDIAN returns the single middle number.
- Even count — MEDIAN averages the two middle values.
- Empty and text cells are ignored when determining the middle.
- MEDIAN of {1,2,3,4} is 2.5 — the average of 2 and 3.
Step-by-step: compare MEAN vs MEDIAN on skewed data
- Step 1 — Put compensation values in column B (include one high outlier).
- Step 2 — =AVERAGE(B2:B100) — pulled up by the outlier.
- Step 3 — =MEDIAN(B2:B100) — typical central tendency.
- Step 4 — Report both metrics with labels "Mean (incl. outliers)" and "Median (typical)".
- Step 5 — For conditional median in M365 consider SORT + FILTER patterns or helper columns.
MEDIAN vs AVERAGE vs MODE
- AVERAGE — arithmetic mean; sensitive to extremes.
- MEDIAN — middle rank; robust for skewed data.
- MODE — most frequent value; useful for categorical numeric codes.
- Category: [Statistical functions](/categories/statistical/) for full library.
Worked examples to copy
- Typical home price: =MEDIAN(C2:C500).
- Survey Likert 1–5: =MEDIAN(responses) alongside AVERAGE for reporting.
- Even set: =MEDIAN(10,20,30,40) returns 25.
- With IFERROR: =IFERROR(MEDIAN(range), "Insufficient data").
People also ask
- When use MEDIAN over AVERAGE? — Skewed data with outliers (income, prices).
- Does MEDIAN ignore blanks? — Yes. Blanks and text are skipped.
- MEDIAN with even number of cells? — Averages the two middle values.
- MEDIAN vs PERCENTILE 50%? — Equivalent to PERCENTILE.INC(range, 0.5) on clean numeric data.
Common errors
- Empty cells and text are ignored
- Returns #NUM! if no numeric values
Use cases
- Central tendency analysis
- Salary analysis
- Performance metrics
- Outlier-resistant average
Frequently asked questions
- When should I use MEDIAN instead of AVERAGE? Use MEDIAN when your data has outliers or is skewed. MEDIAN is not affected by extreme values, making it better for salary data, home prices, or any dataset where a few very high or low values could distort the average.
- How does MEDIAN handle an even number of values? When there's an even count, MEDIAN returns the average of the two middle values. For example, MEDIAN(1,2,3,4) returns 2.5, which is the average of 2 and 3.
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.
When to use MEDIAN
- Central tendency analysis — common Statistical scenario for MEDIAN.
- Salary analysis — common Statistical scenario for MEDIAN.
- Performance metrics — common Statistical scenario for MEDIAN.
- Outlier-resistant average — common Statistical scenario for MEDIAN.
MEDIAN in the Statistical category
- Browse all Statistical functions at /categories/statistical/ for related formulas.
- MEDIAN syntax: =MEDIAN(number1, [number2], ...)
- number1 (required): First number or range
- number2 (optional): Additional numbers or ranges
- Confirm MEDIAN arguments match the syntax shown above before filling down.
- Lock table and range references with $ when copying formulas across rows or sheets.
Formula checklist before you copy down
- Confirm MEDIAN arguments match the syntax shown above before filling down.
- Lock table and range references with $ when copying formulas across rows or sheets.
- If results look wrong, check for text stored as numbers and invisible spaces with TRIM.
- Spot-check three known input rows manually against expected output.
Related Excel functions
- AVERAGE (/functions/average/): Returns the average (arithmetic mean) of the arguments.
- MODE.SNGL (/functions/mode-sngl/): Returns the most frequently occurring value in a data set.
- QUARTILE.INC (/functions/quartile-inc/): Returns the quartile of a data set (inclusive).
Errors to watch for
- Empty cells and text are ignored — review causes on linked error pages in the directory.
- Returns #NUM! if no numeric values — review causes on linked error pages in the directory.
Copy-paste audit workflow
- Enter MEDIAN on three test rows with known expected output documented on a QA tab.
- Fill down only after absolute references are locked on lookup tables and rate tables.
- Compare against manual calculation or a calculator for financial and statistical functions.
- Search this directory for comparison guides when choosing between similar functions in the same category.
MEDIAN worked examples to copy
- =MEDIAN(1, 2, 3, 4, 5) — Median of odd count. Expected result: 3.
- =MEDIAN(1, 2, 3, 4) — Median of even count (average of middle two). Expected result: 2.5.
- =MEDIAN(A1:A100) — Median of range. Expected result: Middle value.
MEDIAN reference summary for crawlers and offline review
- MEDIAN belongs to the Statistical category in Excel. Returns the median (middle value) of the given numbers. The median is the number in the middle of a set of numbers.
- Full syntax: =MEDIAN(number1, [number2], ...). Open /functions/median/ for parameters, FAQs, and related pages.
- Common mistakes: Empty cells and text are ignored; Returns #NUM! if no numeric values
- Pair this function with comparison guides when another Excel formula might fit the same task better.
- Review fix-excel-formula-errors when unexpected errors appear after upgrading Excel or sharing across locales.