# Documentation/Calc Functions/MEDIAN

From The Document Foundation Wiki

TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate

## Function name:

MEDIAN

## Category:

Statistical Analysis

## Summary:

Returns the median of a set of numbers. In a set containing an uneven number of values, the median will be the number in the middle of the set 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(**Number1**; **Number2**; ...; **Number30**)

## Returns:

## Arguments:

**Number1**, **Number2**, ..., **Number30** are values or ranges, which represent a sample. Each number can also be replaced by a reference.

## Additional details:

## Examples:

for an odd number: =MEDIAN(1;5;9;20;21) returns 9 as the median value.

for an even number: =MEDIAN(1;5;9;20) returns the average of the two middle values 5 and 9, thus 7.