MEDIAN Function - Excel


Overview


The MEDIAN function in Excel is a useful tool for calculating the median of a set of numbers. The median is the middle value in a dataset when it is sorted in ascending or descending order. If the dataset has an odd number of values, the median is the middle value. If the dataset has an even number of values, the median is the average of the two middle values. This functions takes up to 255 arguments.

An example of the MEDIAN function in Excel with an even number of inputs

Example:

=MEAN(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)

Syntax:

=MEAN(number1, [number2], ...)

number1: The first number or range of numbers.

[number2], ...: Optional additional numbers or ranges.


Example: Even number of values


In the example above, the MEDIAN function has an even number of inputs so it will average out the two middle values. The final output is 5.5 because the two middle numbers were 5 and 6.


Example: Odd number of values


In this example, the MEDIAN function has an odd number of inputs so it will only return the number that is in the middle, which in this case is 5.

An example of the MEDIAN function in Excel with an odd number of inputs

Interactive GSheet