In this article you will learn how to use median function. It can be used for calculating median of given numbers in Excel.

The Median is just the middle value in a set of numbers. But if there is no middle value in the set, median is an average of two middle values.

  • MEDIAN of (1, 2, 3, 4, 5) equals 3
  • MEDIAN of (1, 2, 3, 4, 5, 6) equals 3.5 which is an average of 3 and 4

The syntax for the MEDIAN function is:

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

You can use up to 255 numbers in your MEDIAN formula.

Example 1 Median of an odd number of values

In case of odd number of values, median is just a middle value.

MEDIAN ODD

Example 2  Median of an even number of values

In case of even number of values, median is average of two middle values. Here it is average of 3 and 4, which is 3.5.

MEDIAN EVEN

Example 3 Median of selected cells

You can type addresses of cells for which you want to calculate median in Excel.

MEDIAN selected cells

Example 4 Median of typed numbers

Instead of addresses you can also use number. Using this methon you don't need any table of data. Notice that formula is not connected with column A in the picture.

MEDIAN typed numbers

Example 5 Median - mix of above examples

You can also use all above methods together.

MEDIAN mix of examples