Home » Excel-Built-In-Functions » Excel-Statistical-Functions » Excel-Median-Function

# The Excel MEDIAN Function

## Basic Description

The Excel MEDIAN function returns the statistical median (the middle value) of a list of supplied numbers.

The format of the function is:

MEDIAN( number1, [number2], ... )

where the number arguments are a set of one or more numeric values, or arrays of numeric values, for which you want to calculate the median - these values can be supplied directly to the function, or as one or more cells or ranges of cells containing numeric values.

Note that :

- If a supplied array contains text and logical values, these values are ignored when calculating the median
- If there is an even number of values in the supplied data set, the average of the two middle values is returned

Also note that in Excel 2007 & later versions of Excel, you can provide up to 255 number arguments to the function, but in Excel 2003, you can only provide up to 30 number arguments.

## Excel Median Function Examples

The following example shows the function used to calculate the median of the set of values in cells A1 - A5. Although the same 5 values are provided to each of the functions in cells B1 - B3, in each of these 3 examples, the values are provided to the function in different ways.

Formulas: | Results: |

In the example below, there is an even number of values supplied to the median function, so the median is calculated to be the average of the 2 middle values.

Formulas: | Results: |

Note that in the example above, the blank cell A5 is included in the range that is supplied to the median function. However, because this cell is blank, it is ignored in the calculation.