MEDIAN function

MEDIAN(FirstParameter, OtherParameters...) MEDIAN(FirstParameter; OtherParameters...)

FirstParameter

Number or { Number }

The first parameter.

OtherParameters

Number or { Number } (accepts many)

Additional parameters.

Returns

Number

The median of the given numbers.

Returns the median of the given numbers.

Examples

MEDIAN(1, 2, 3, 4, 5, 10)MEDIAN(1; 2; 3; 4; 5; 10)

Returns 3.5.

PERCENTILE.INC({ 1, 2, 3, 4, 5, 10 }, 50%)PERCENTILE.INC({ 1; 2; 3; 4; 5; 10 }; 50%)

Returns 3.5. This example uses the PERCENTILE.INC function instead, which returns the value at the kth percentile, in this case 50%, which is equivalent to the median.

MEDIAN(1, 2, 3, 4, BLANK(), 5, 10)MEDIAN(1; 2; 3; 4; BLANK(); 5; 10)

Returns 3.5. Blank values are ignored.

MEDIAN(1, 2, 3, 5, 5, 10)MEDIAN(1; 2; 3; 5; 5; 10)

Returns 4.

MEDIAN({ 1, 2, 3, 5, 5, 10 })MEDIAN({ 1; 2; 3; 5; 5; 10 })

Returns 4. Arrays are supported.

MEDIAN(1, 2, 3, { 5, 5, 10 })MEDIAN(1; 2; 3; { 5; 5; 10 })

Returns 4. Arrays mixed with regular numbers are supported.

MEDIAN(1, 2, 3, { BLANK(), 5, 5, 10 })MEDIAN(1; 2; 3; { BLANK(); 5; 5; 10 })

Returns 4. Arrays mixed with regular numbers are supported. Blank values are ignored.