The MEDIAN function calculates the median of a list of numbers. The median is the middle value in a list of numbers, after the list has been arranged in ascending order. MEDIAN both orders the list and finds the middle value, so you can enter the list values in any order you like. If the list contains an even number of numbers, the median is calculated as the average of the two middle numbers.
For example:
MEDIAN(3, 5 ,17, 34, 98)
returns 17.
MEDIAN(3, 5, 17, 26, 34, 98)
returns 21.5, which is the average of the two middle numbers 17 and 26.
MEDIAN will return an error message if any of the list values are non-numeric, though it will ignore non-numeric values if calling on a range.
See also: