To find the median average in Excel, type =MEDIAN(range) into an empty cell and press Enter, replacing range with the cells that hold your numbers. For example, =MEDIAN(A1:A20) returns the middle value of that column. Unlike the everyday "average," which Excel calls the mean, the median ignores extreme outliers, so it often gives a fairer picture of typical values such as salaries, house prices, or response times.
Note that Excel's default =AVERAGE() function does not return the median - it adds all values and divides by the count. If you have been using AVERAGE and getting a surprising result, that is usually why. The MEDIAN function is the correct tool.
What You'll Need
- Excel on desktop (Windows or Mac), Excel for the web, or the Excel mobile app - MEDIAN works in all of them.
- A list or table of numeric values in cells, with one number per cell.
- An empty cell below or beside your data to hold the formula.
- Basic familiarity with typing formulas and pressing Enter/Return.
Step-by-Step
- Set up your data in a single column or row. Put each number in its own cell, with no blank rows inside the range and no text mixed in. For example, enter values in A1 through A20. Blanks and text cells are ignored by MEDIAN, but keeping the list clean makes the result easier to trust.
- Click an empty cell where you want the answer. A cell just below your data, such as A21, works well and keeps the result next to the source.
- Type the formula. Enter
=MEDIAN(and then the range. For column A rows 1 to 20, type=MEDIAN(A1:A20)and close with a parenthesis. You can also select the range with your mouse while the cursor is between the parentheses, which is often less error-prone than typing cell references. - Press Enter (Windows) or Return (Mac). Excel calculates and displays the middle value in that cell. The formula remains visible in the formula bar when the cell is selected.
- Check the answer makes sense. With an odd count of numbers, the median is the actual middle value. With an even count, Excel returns the average of the two middle values, so the result may not appear anywhere in your list. That is correct behaviour, not an error.
- Add more than one range if you need to. MEDIAN accepts multiple arguments separated by commas, such as
=MEDIAN(A1:A20, C1:C10), and it combines them all before finding the middle. This is handy when your data is split across two blocks. - Use an Excel Table or named range for growing data. If you add new rows later, a reference like
A1:A20will not expand. Convert the data to a Table (select it, then Insert > Table) and use the table's column reference such as=MEDIAN(Table1[Sales]), or define a named range, so new entries are included automatically. - Apply the formulas to a whole category with a pivot table. For medians by group, insert a PivotTable, drag your category field to Rows and your number field to Values, then change the value summarisation from Sum to Median via the field's settings menu. Labels can differ slightly between Excel versions and platforms, so look for a "Summarize Values By" or "Value Field Settings" option. Note that older versions of Excel for the web restricted which aggregations were available in a PivotTable, so desktop Excel is the safer place for this.
- Round the result if needed. Wrap it in a rounding function, for example
=ROUND(MEDIAN(A1:A20),0)for whole numbers or=ROUND(MEDIAN(A1:A20),2)for two decimals. This changes display only, not the underlying calculation approach. - Compare with the mean to spot skew. Put
=AVERAGE(A1:A20)in a nearby cell. If the average is far higher than the median, a few large values are pulling it up; if far lower, a few small values are pulling it down. A median close to the mean suggests a fairly symmetrical set of numbers.
Common Mistakes
Using AVERAGE and calling it the median. These are different statistics. AVERAGE divides the total by the count; MEDIAN finds the middle value. Outliers affect the mean heavily and the median very little.
Including text or error cells inside the range. MEDIAN ignores text and logical values inside a range, but a cell containing an error such as #N/A will make the whole formula return an error. Select your range and look for stray characters, spaces, or error values.
Numbers stored as text. If values were pasted from elsewhere, they may be text that looks like numbers. MEDIAN will ignore them, giving a wrong count and a wrong middle. Look for left-aligned numbers with green warning triangles, then use Data > Text to Columns or multiply by 1 to convert them.
Leaving blank cells that should contain a zero. Blanks are skipped, so a month with zero sales entered as an empty cell is not counted at all. That shifts the median upward.
Hard-coding a fixed range that misses new rows. Recheck the range after adding data, or use a Table as described above.
Forgetting the closing parenthesis. Excel will offer to correct it, but accepting the suggestion blindly can produce a reference you did not intend. Press Escape and retype the formula cleanly.
Tips
- Select a range and look at the status bar at the bottom of the Excel window. Many versions show Average and Count, but Median is not always shown there, so a helper cell with the MEDIAN formula is more reliable.
- Use
=MEDIAN(IF(range="value", values))as an array formula to get a conditional median, or use a modern dynamic array version if your Excel supports it. Test carefully: older versions require pressing Ctrl+Shift+Enter. - Combine MEDIAN with the QUARTILE function to build a quick five-number summary: minimum, first quartile, median, third quartile, and maximum.
- Keep a labelled cell such as "Median response time" so anyone opening the sheet understands what the number represents.
- Copy the formula down or across carefully. Use absolute references with dollar signs (for example
$A$1:$A$20) when the source range must stay fixed.
Troubleshooting
The formula shows as text instead of a result. The cell is probably formatted as Text before you typed the formula. Change the format to General, then click the cell, press F2, and press Enter again to force recalculation.
You get #NUM! or #DIV/0!. This means no numeric values were found in the range. Check for text-formatted numbers, hidden rows you did not expect, or a range that points at empty cells.
You get #NAME?. The function name is probably misspelled, for example MIDIAN or MEDIAN with a stray space. Retype it, or start typing =MED and pick MEDIAN from the autocomplete list.
The result looks wrong compared with your own calculation. Verify the count with =COUNT(range) and compare it to the number of values you believe are there. A mismatch almost always means text or blank cells are being skipped. Also confirm that you did not accidentally include a header row - a text header is ignored, but a numeric-looking header such as a year will be counted.
If that did not work, copy the values into a fresh sheet with Paste Special > Values, delete any rows with blanks or text, and rebuild the formula. This clears lingering formatting problems and confirms whether the original data or the formula is at fault.
Frequently Asked Questions
What is the difference between median and average in Excel?
AVERAGE adds all values and divides by the count. MEDIAN sorts them and returns the middle one. With the values 1, 2, and 100, the average is about 34 and the median is 2.
Does MEDIAN work with an even number of values?
Yes. It returns the average of the two middle values, so with 1, 2, 3, and 4 the result is 2.5 even though 2.5 does not appear in your data.
Can I find the median if my data is in rows instead of a column?
Yes. Use a row reference such as =MEDIAN(A1:J1). The orientation makes no difference to the calculation.
Will MEDIAN include zeros?
Yes, a cell containing 0 is a value and is counted. Only truly blank cells and text are ignored.
Can I calculate a median that ignores errors in my range?
Not directly. Clean the errors first, for example with IFERROR around the source formulas, or filter the data so error rows are excluded. MEDIAN itself will fail if any cell in the range contains an error.
Does the median work the same in Google Sheets?
Yes, the function is also called MEDIAN and the syntax is identical: =MEDIAN(A1:A20).