Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Calculate Median Score in Excel: Step-by-Step

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To calculate the median score in Excel, use the MEDIAN function: type =MEDIAN(range) in an empty cell, replacing range with your score cells (for example, =MEDIAN(B2:B20)), then press Enter. Excel returns the middle value of the scores, ignoring text and blank cells. This guide walks through the exact steps, common pitfalls, and troubleshooting so you get a correct result every time.

What You'll Need

  • Microsoft Excel (any modern version: Microsoft 365, Excel 2019, 2021, or Excel for Mac). The steps below use the desktop app; the web version works the same for this function.
  • Your score data entered in a single column or row, with one score per cell. Scores can be numbers, formulas that return numbers, or references to other cells.
  • A blank cell where you want the median to appear.

Note: Menu labels and ribbon locations can differ slightly by Excel version, device, and region. The function name and syntax are the same across versions.

Step-by-Step

  1. Open your workbook and locate the column or row that contains the scores. For example, scores might be in cells B2 through B20.
  2. Click an empty cell where you want the median to display. Choose a cell outside your data range so the result does not overwrite a score.
  3. Type the formula: =MEDIAN( then select your range with the mouse, or type it directly, for example =MEDIAN(B2:B20). Close the parenthesis with ).
  4. Press Enter. The cell now shows the median score. If the range contains an even number of scores, Excel returns the average of the two middle values.
  5. Verify the result by checking a few things: the range includes all scores and no extra cells (such as a total row or header). If your range includes a header like "Score", Excel ignores text, so it will not break the result, but it is cleaner to exclude it.
  6. Format the result if needed. Select the cell, then use the Number Format dropdown on the Home tab to set decimal places. The median may show more decimals than your scores; formatting only changes display, not the stored value.
  7. Copy the formula if you need medians for multiple groups. For example, if you have scores by class in separate columns, drag the fill handle to apply the same formula pattern. Use absolute references (like $B$2:$B$20) if the range should stay fixed.

Common Mistakes

  • Including non-score cells in the range. A total row, an average row, or a label can skew the result if it contains numbers. Double-check that the range covers only actual scores.
  • Using AVERAGE instead of MEDIAN. AVERAGE returns the mean, which is pulled by extreme scores. MEDIAN gives the middle value and is more robust for skewed data.
  • Typing the range incorrectly. A missing colon (e.g., B2B20) or a space inside the range causes an error. Use a colon between the first and last cell.
  • Forgetting that blank cells are ignored. MEDIAN skips blanks and text, which is usually correct, but if a blank should count as zero, you must enter 0 explicitly.
  • Expecting the median to update automatically when you add scores outside the range. If you add new rows below the range, the formula will not include them unless you extend the range or use a whole-column reference like B:B (which also includes the header, but text is ignored).

Tips

  • Use a named range (Formulas > Define Name) to make formulas easier to read and maintain, e.g., =MEDIAN(Scores).
  • To see the median alongside other statistics, use the Status Bar: select the scores and look at the bottom of the Excel window; it shows Average, Count, and Sum by default. Right-click the status bar to enable Median.
  • For grouped data, use MEDIAN with an array or a helper column. For example, if scores are in B2:B100 and groups in A2:A100, use =MEDIAN(IF(A2:A100="Group1",B2:B100)) and press Ctrl+Shift+Enter in older Excel versions; in Microsoft 365, just Enter.
  • If your scores are in a pivot table, you can add a median calculation by using Power Pivot or by creating a measure; the standard pivot table does not offer Median as a summary function by default.
  • Always keep a backup of your data before applying formulas that overwrite cells, especially when dragging formulas across a large range.

Troubleshooting

If the median does not calculate as expected, work through these checks in order:

  1. Check for errors in the range. If any cell in the range contains an error like #N/A or #DIV/0!, MEDIAN returns that error. Fix or remove the error first.
  2. Confirm the range contains numbers. If all cells are text or blank, MEDIAN returns #NUM!. Ensure scores are stored as numbers, not text. You can convert text to numbers by using Text to Columns or multiplying by 1.
  3. Look for hidden rows or filters. MEDIAN includes hidden rows and filtered-out rows. If you need to exclude them, use SUBTOTAL with function number 101 (AVERAGE) or 102 (COUNT), but SUBTOTAL does not support MEDIAN directly. Instead, copy visible cells to a new range or use AGGREGATE with function 16 (MEDIAN) if available in your version.
  4. Verify the formula syntax. Make sure parentheses are balanced and the range is correct. Excel usually highlights the error and offers a suggestion.
  5. Check for circular references. If the cell with the median formula is included in the range, Excel shows a circular reference warning. Move the formula to a cell outside the range.
  6. Update Excel if the function is not recognized. MEDIAN is a standard function in all versions; if you see #NAME?, the formula may be misspelled (e.g., MEDAIN). Correct the spelling.

If none of these resolve the issue, try opening the workbook in Excel for the web to rule out a file-specific problem, or start a new blank workbook and paste your scores there to test the formula.

Frequently Asked Questions

What does the median score tell me?

The median is the middle score when all scores are sorted from lowest to highest. Half the scores are below it and half are above. It is less affected by extreme high or low scores than the average, making it useful for skewed data like test scores or incomes.

How does Excel handle an even number of scores?

When the count is even, Excel averages the two middle values. For example, scores 10, 20, 30, 40 give a median of 25 (the average of 20 and 30).

Can I use MEDIAN with conditions?

Yes, but you need an array formula. In Microsoft 365, use =MEDIAN(IF(range=criteria, scores)) and press Enter. In older Excel, press Ctrl+Shift+Enter. This calculates the median only for scores that meet the criteria.

Does MEDIAN ignore text and blank cells?

Yes. Text, logical values, and empty cells are ignored. If a cell contains a zero, it is treated as a number and included. If you need blanks to count as zero, enter 0 in those cells.

Why does my median show a decimal when all scores are whole numbers?

If the number of scores is even, the median is the average of two middle numbers, which can be a decimal. Format the cell to show fewer decimal places if you prefer, but the underlying value remains exact.

Can I calculate the median for a filtered list?

The MEDIAN function includes filtered-out rows. To calculate the median of only visible rows, copy the visible cells to a new location and apply MEDIAN to that range, or use the AGGREGATE function with option 16 if your Excel version supports it.