MEDIAN
Calculates the median of a list of numbers or lists of numbers.
Syntax
=MEDIAN(number1, number2, ..., numberN)
=MEDIAN(numberArray)
Arguments
Argument | Type | Description |
---|---|---|
number | Number or Array | A number or array of numbers to find the median of |
If an array of values is supplied, the array will be flattened when averaging. For example,
=MEDIAN(ARRAY(1,ARRAY(2,3)),ARRAY(4),5)
returns 3, the median of (1, 2, 3, 4, 5).
Examples
=MEDIAN(1, 2, 2, 3)
→ 2
Calculates the median of 1, 2, 2 and 3.
=MEDIAN([1, 2, 2, 3, 4], [5, 5, 3], 4)
→ 3
Calculates the median of an array containing the numbers 1, 2, 2, 3 and 4, and another array containing 5, 5, and the number 3, along with the number 4. Because the MEDIAN function flattens arrays, this is the same as the median of 1, 2, 2, 3, 4, 5, 5, 3 and 4.
Updated 5 months ago