Documentation/Calc Functions/MEDIAN

Function name:
MEDIAN

Category:
Statistical Analysis

Summary:
Finds the median of a set of numbers. In a set containing an odd number of values, the average of the two numbers in the middle of the set (as appropriate) but only after the function has sorted the values into numerical order and in a set containing an even number of values, it will be the mean of the two values in the middle of the set.

Syntax:
MEDIAN(Number 1 [; Number 2 [; … [; Number 255]]])

Returns:
Returns a real number which is the median value in the list of arguments.

Arguments:
Number 1, Number 2, ..., Number 255 are numbers, references to cells or to cell ranges of numbers which represent a sample.


 * If any of the arguments contain text value either being passed directly then the function returns a name (#NAME?) error and when passed with double quotes an error value (Err:504) is returned.
 * If a cell contains text, error value, or empty cells, then the function ignores these values. For logical values, TRUE is considered as 1 and FALSE as 0.
 * If a cell has 0 then the function considers it.

Additional details:
None

Related LibreOffice functions:
[[Special:MyLanguage/Documentation/Calc_Functions/AVERAGE AVERAGE]

[[Special:MyLanguage/Documentation/Calc_Functions/MODE MODE]

ODF standard:
Section 6.18.47, part 2

Equivalent Excel functions:
MEDIAN