MEDIAN Function
Finds the central (50th percentile) value of a dataset.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| number1 | The first number, cell, or range to evaluate. | Required |
| number2 | Additional numbers, cells, or ranges (optional). Up to 255 arguments. | Optional |
Basic Example
Median of five ordered scores
=MEDIAN(1,2,3,4,5)With 5 values the sorted middle (3rd) value is 3.
Advanced Examples
Example 1: Even number of values averages the two middle numbers
Four monthly figuresWhen the count is even, MEDIAN averages the two central values.
=MEDIAN(1,2,3,4)Example 2: Median ignores blanks and text automatically
Mixed column with a repeated figureMEDIAN on a range with a duplicated central value.
=MEDIAN(10,20,20,30,40)How MEDIAN Works
MEDIAN sorts the numeric values it receives and returns the value at the center position. With an odd count it returns the single middle value; with an even count it returns the arithmetic mean of the two middle values. Text, logical values, and empty cells are ignored.
Important Notes & Limitations
Ignores text, logical values, and empty cells, which can change the perceived count.
For an even number of values it returns an average, not one of the actual data points.
Cells with text-formatted numbers are treated as text and ignored.
Common Errors & Fixes
#NUM! errorNo numeric values were supplied to the function.Fix: Make sure the range or arguments contain at least one number.
Unexpected resultNumbers stored as text are ignored, shrinking the dataset.Fix: Convert text to numbers or use VALUE() before MEDIAN.
Download Practice File
MEDIAN
medianPractice MEDIAN with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the MEDIAN function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps