MEDIAN function

MEDIAN() function

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Returns the median or middle number in a data set.

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


Return the median or number in the middle of a set of numbers using either defined values (e.g. 1,1,2,3) or ranges, named ranges or cell references (e.g. C3:C6).

MEDIAN syntax requires the number arguments to be considered.


MEDIAN with a number.

In the example below, the MEDIAN function is used to identify the median or middle number in a list of defined values or a cell range.

Use the MEDIAN function to return the median or middle value in a data set.

Use the Excel function MEDIAN to return the median or middle number in a data set.

Syntax

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

The MEDIAN function consists of at least 1 argument:

  1. number 1. Required. A number or cell reference that refers to numeric values.
  2. number 2. Optional. A number or cell reference that refers to numeric values.

Try it now!

  • Enter your formulas into the grey cells.

Scope

MEDIAN can be applied to numbers, ranges, named ranges or cell references. Up to 255 numbers can be used as separate arguments.

  • Number:
  =MEDIAN(1,2,3,4,5) || result is 3
  • Cell reference:
  =MEDIAN(C3:C10) where the range holds values in each cell.

Caveats

  • If there is an odd number of values, the middle number is returned.
  • If there is an even number of values, the median is calculated as the average of the two numbers in the middle.
  • Arguments can be numbers, defined names, arrays, or cell references that contain numbers.
  • Empty cells, and cells that contain boolean values or text will be ignored by the MEDIAN function. Cells with the value zero (0) will be included.
  • MEDIAN will return #N/A if there are error values or text that can not be interpreted as a number in the arguments.

Related Functions

  • AVERAGE() returns the average (arithmetic mean) of the values in a data set.
  • MODE.MULT() returns the most common values in a data set as an array.
  • MODE.SNGL() returns the most common value in a data set.
  • MODE() returns the most common value in a data set. Use MOMODE.SNGL instead.

Functions Category

 


Register (for free!) or Login to access bonus materials

About xlsnippets

Learn how to master functions, charts, pivot tables and more using Excel for Microsoft Office 365. Simple instructions and embedded spreadsheets help you practise the basics.

Latest Updates

26 March 2022
26 March 2022
26 March 2022
25 March 2022
22 March 2022

Coming soon

xlsnippets.com is currently in beta version. More functions and bonus content for registered users will be added weekly. Detailed training courses with additional downloadable resources are also on the horizon!