The MEDIAN function returns the middle of a set of numbers.
For an odd number of elements, the median is the central number in terms of value, and for an even number, it is the arithmetic mean of two central ones.
For example, for the set 2, 10, 1, the median is 2, and for the set 2, 10, 1, 15, it is 6 (arithmetic mean of 2 and 10).
This function can be useful for analyzing data distribution and identifying central tendencies, especially when the data contains outliers.
Syntax
MEDIAN(value1, [value2, ...])
Argument |
Description |
Permitted values |
|---|---|---|
value1 |
First number or range |
Any numerical values, ranges of cells with numbers. Text values or empty cells without numbers are not allowed. |
[value2, ...] |
(optional) Additional numbers or ranges |
Similar to the first argument |
Examples of use
Search for the median in a range
If you have a data set in cells A1:A10, you can find the median as follows:
=MEDIAN(A1:A10)
This formula will return the median value from the specified range.
Finding the median among individual numbers
You can specify individual numbers:
=MEDIAN(10, 20, 30, 40, 50)
In this case, the formula will return 30, as this is the average value in the ordered set.
Notes
–The MEDIAN function ignores text values and empty cells.
–If there are no numbers in the range, the function will return the #VALUE! error.