---
title: "MEDIAN function in Excel: syntax and examples | ExcelSavvy"
description: "How to use MEDIAN in Excel and Google Sheets: the middle value, and why it resists outliers better than AVERAGE."
canonical_url: "https://excelsavvy.com/functions/median"
meta:
  "og:description": "How to use MEDIAN in Excel and Google Sheets: the middle value, and why it resists outliers better than AVERAGE."
  "og:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~TUVESUFOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBNRURJQU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHRoZSBtaWRkbGUgdmFsdWUsIGFuZCB3aHkgaXQgcmVzaXN0cyBvdXRsaWVycyBiZXR0ZXIgdGhhbiBBVkVSQUdFLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TUVESUFOKG51bWJlcjEsIFtudW1iZXIyXSwgLi4uKQ%2Cp_Ii9mdW5jdGlvbnMvbWVkaWFuIg%2Cs_Bn6zC78OJqJMI6xI.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "MEDIAN function in Excel: syntax and examples | ExcelSavvy"
  "twitter:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~TUVESUFOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBNRURJQU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHRoZSBtaWRkbGUgdmFsdWUsIGFuZCB3aHkgaXQgcmVzaXN0cyBvdXRsaWVycyBiZXR0ZXIgdGhhbiBBVkVSQUdFLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TUVESUFOKG51bWJlcjEsIFtudW1iZXIyXSwgLi4uKQ%2Cp_Ii9mdW5jdGlvbnMvbWVkaWFuIg%2Cs_Bn6zC78OJqJMI6xI.png"
---

> Index of every page on this site: [llms.txt](https://excelsavvy.com/llms.txt)

# **The MEDIAN function**

Returns the middle value of a set of numbers. With an even count it averages the two in the middle.

=

MEDIAN(

## **How to use MEDIAN**

The median is the middle value when you line the numbers up from smallest to largest. Half of the numbers are below it and half are above it. Picture a row of houses sorted by price: the median is the price of the house standing in the middle.

Use MEDIAN when a few extreme values would distort an average, for example salaries on a staff list, order sizes, delivery times or house prices. One huge value pulls AVERAGE up, but MEDIAN hardly moves. `**=MEDIAN(C2:C6)**` finds the middle sale in the list. You do not need to sort the data first, because MEDIAN does the ordering behind the scenes.

With an odd number of values, the median is one of them. With an even number, it is the average of the two in the middle, so `**=MEDIAN(1,2,3,10)**` gives a number that is not in the list. Text and empty cells in a range are skipped.

Put MEDIAN next to AVERAGE. If the two are far apart, your data has outliers, and the median is usually the fairer picture of a typical value. To pick a value by its position instead, use LARGE or SMALL.

## **Syntax**

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

<dl><dt>**number1 **</dt>
<dd>The first number, cell or range.</dd>
<dt>**number2 **(optional)</dt>
<dd>More numbers or ranges.</dd></dl>

## **Examples**

E1=MEDIAN(C2:C6)

|  | A | B | C | D | E |
| --- | --- | --- | --- | --- | --- |
| 1 | Region | Product | Sales |  | **300** |
| 2 | North | Shoes | 500 |  | |
| 3 | South | Shoes | 300 |  | |
| 4 | North | Bags | 250 |  | |
| 5 | North | Shoes | 420 |  | |
| 6 | South | Bags | 180 |  | |

B1=MEDIAN(1,2,3,10)

|  | A | B |
| --- | --- | --- |
| 1 |  | **2.5** |

## **Common MEDIAN mistakes**

- MEDIAN and AVERAGE give very different numbers

  That is not an error. One very large or very small value pulls the average toward it, while the median stays near the middle. Check the list for an outlier, and decide which of the two answers your question.
- MEDIAN ignores some of my numbers

  Numbers stored as text are skipped, just like in SUM. They sit on the left side of the cell. Convert them with `**=VALUE(C2)**` in a helper column and take the median of that column.
- MEDIAN is pulled down by zeros

  An empty cell is skipped, but a zero is a real number and counts. If the zeros mean "no value", delete them, or let the formula that fills the cell return empty text with `**""**` instead of 0.
- MEDIAN returns #NUM!

  The range holds no numbers at all, only text or empty cells, so there is no middle to find. Check that you pointed at the right cells and that the numbers are not stored as text.

## **Questions**

<details>

<summary>

### What is the difference between MEDIAN and AVERAGE?

</summary>

AVERAGE adds all the numbers and divides by how many there are, so one extreme value moves it a lot. MEDIAN takes the middle value after sorting, which makes it steadier when the data has outliers.

</details>

<details>

<summary>

### What does MEDIAN do with an even number of values?

</summary>

It averages the two middle values. =MEDIAN(1,2,3,10) averages 2 and 3 and gives 2.5.

</details>

<details>

<summary>

### Is there a MEDIANIF function?

</summary>

No. In Excel 365 you can use =MEDIAN(IF(A2:A6="North",C2:C6)). In older versions of Excel, confirm that formula with Ctrl+Shift+Enter. In Google Sheets, wrap it in ARRAYFORMULA.

</details>

<details>

<summary>

### Does MEDIAN ignore blanks and text?

</summary>

In a range, yes: empty cells and text are skipped. Zeros and numbers you type straight into the formula are counted.

</details>

## **Related functions**

- [**AVERAGE**](https://excelsavvy.com/functions/average)
- [**LARGE**](https://excelsavvy.com/functions/large)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://excelsavvy.com/#identity","@type":"Organization","name":"ExcelSavvy","url":"https://excelsavvy.com/","logo":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/#website","@type":"WebSite","inLanguage":"en-US","name":"ExcelSavvy","url":"https://excelsavvy.com/","alternateName":["Excel Savvy","ExcelSavvy.com","PracticeExcel","Practice Excel Online"],"publisher":{"@id":"https://excelsavvy.com/#identity"},"workTranslation":[{"@id":"https://excelopgaver.dk/#website"},{"@id":"https://excelpraxis.de/#website"}]},{"@id":"https://excelsavvy.com/functions/median#webpage","dateModified":"2026-11-16","description":"How to use MEDIAN in Excel and Google Sheets: the middle value, and why it resists outliers better than AVERAGE.","name":"MEDIAN function in Excel: syntax and examples","url":"https://excelsavvy.com/functions/median","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://excelsavvy.com/functions/median#breadcrumb"},"isPartOf":{"@id":"https://excelsavvy.com/#website"},"mainEntity":[{"@id":"https://excelsavvy.com/functions/median#/schema/question/1"},{"@id":"https://excelsavvy.com/functions/median#/schema/question/2"},{"@id":"https://excelsavvy.com/functions/median#/schema/question/3"},{"@id":"https://excelsavvy.com/functions/median#/schema/question/4"}],"potentialAction":[{"@type":"ReadAction","target":["https://excelsavvy.com/functions/median"]}],"primaryImageOfPage":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/functions/median#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://excelsavvy.com","position":1},{"@type":"ListItem","name":"Excel functions","item":"https://excelsavvy.com/functions","position":2},{"@type":"ListItem","name":"MEDIAN function in Excel: syntax and examples","position":3}]},{"@id":"https://excelsavvy.com/functions/median#article","dateModified":"2026-11-16","description":"How to use MEDIAN in Excel and Google Sheets: the middle value, and why it resists outliers better than AVERAGE.","headline":"MEDIAN function in Excel: syntax and examples","inLanguage":"en-US","thumbnailUrl":"https://excelsavvy.com/_og/d/c_Page%2Ctitle_~TUVESUFOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBNRURJQU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHRoZSBtaWRkbGUgdmFsdWUsIGFuZCB3aHkgaXQgcmVzaXN0cyBvdXRsaWVycyBiZXR0ZXIgdGhhbiBBVkVSQUdFLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TUVESUFOKG51bWJlcjEsIFtudW1iZXIyXSwgLi4uKQ%2Cp_Ii9mdW5jdGlvbnMvbWVkaWFuIg%2Cs_Bn6zC78OJqJMI6xI.png","@type":["Article","TechArticle"],"author":{"@id":"https://excelsavvy.com/#identity"},"image":{"@id":"https://excelsavvy.com/#/schema/image/1"},"isPartOf":{"@id":"https://excelsavvy.com/functions/median#webpage"},"mainEntityOfPage":{"@id":"https://excelsavvy.com/functions/median#webpage"},"publisher":{"@id":"https://excelsavvy.com/#identity"}},{"@id":"https://excelsavvy.com/functions/median#/schema/question/1","@type":"Question","inLanguage":"en-US","name":"What is the difference between MEDIAN and AVERAGE?","acceptedAnswer":{"@type":"Answer","text":"AVERAGE adds all the numbers and divides by how many there are, so one extreme value moves it a lot. MEDIAN takes the middle value after sorting, which makes it steadier when the data has outliers."}},{"@id":"https://excelsavvy.com/functions/median#/schema/question/2","@type":"Question","inLanguage":"en-US","name":"What does MEDIAN do with an even number of values?","acceptedAnswer":{"@type":"Answer","text":"It averages the two middle values. =MEDIAN(1,2,3,10) averages 2 and 3 and gives 2.5."}},{"@id":"https://excelsavvy.com/functions/median#/schema/question/3","@type":"Question","inLanguage":"en-US","name":"Is there a MEDIANIF function?","acceptedAnswer":{"@type":"Answer","text":"No. In Excel 365 you can use =MEDIAN(IF(A2:A6=\"North\",C2:C6)). In older versions of Excel, confirm that formula with Ctrl+Shift+Enter. In Google Sheets, wrap it in ARRAYFORMULA."}},{"@id":"https://excelsavvy.com/functions/median#/schema/question/4","@type":"Question","inLanguage":"en-US","name":"Does MEDIAN ignore blanks and text?","acceptedAnswer":{"@type":"Answer","text":"In a range, yes: empty cells and text are skipped. Zeros and numbers you type straight into the formula are counted."}},{"@id":"https://excelsavvy.com/#logo","@type":"ImageObject","caption":"ExcelSavvy","contentUrl":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3","inLanguage":"en-US","url":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3"},{"@id":"https://excelsavvy.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://excelsavvy.com/_og/d/c_Page%2Ctitle_~TUVESUFOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBNRURJQU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHRoZSBtaWRkbGUgdmFsdWUsIGFuZCB3aHkgaXQgcmVzaXN0cyBvdXRsaWVycyBiZXR0ZXIgdGhhbiBBVkVSQUdFLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TUVESUFOKG51bWJlcjEsIFtudW1iZXIyXSwgLi4uKQ%2Cp_Ii9mdW5jdGlvbnMvbWVkaWFuIg%2Cs_Bn6zC78OJqJMI6xI.png","inLanguage":"en-US","url":"https://excelsavvy.com/_og/d/c_Page%2Ctitle_~TUVESUFOIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBNRURJQU4gaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHRoZSBtaWRkbGUgdmFsdWUsIGFuZCB3aHkgaXQgcmVzaXN0cyBvdXRsaWVycyBiZXR0ZXIgdGhhbiBBVkVSQUdFLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TUVESUFOKG51bWJlcjEsIFtudW1iZXIyXSwgLi4uKQ%2Cp_Ii9mdW5jdGlvbnMvbWVkaWFuIg%2Cs_Bn6zC78OJqJMI6xI.png"}]}
```

## Sitemap

See the full [sitemap](https://excelsavvy.com/sitemap.md) for all pages.
