Skip to content

Lesson 13 of 92 · Free Excel Course

Excel

Excel AVERAGE Formula: Plus MEDIAN, MIN, MAX and COUNT Explained

How to average in Excel, find the middle, lowest and highest values, count numbers or filled cells, ignore zeros and round the result.

Once you can total a column, the next questions are usually "what's the typical value?", "what's the lowest and highest?" and "how many are there?". Excel has a short function for each: AVERAGE, MEDIAN, MIN, MAX and COUNT. They all work the same way as SUM from the last lesson: a name, brackets and a range. This lesson uses one small list of quiz scores to show all of them, including the one detail that trips people up most: how AVERAGE treats zeros, blank cells and text.

The example: a list of quiz scores

Here are eight students and their scores in B2:B9. The list has three awkward cells on purpose, because real lists always do:

  • Cara took the quiz and scored 0.
  • Eli was absent, so someone typed the word absent.
  • Fay's cell is empty: no score yet.
B11=AVERAGE(B2:B9)
AB
1StudentScore
2Ana82
3Ben91
4Cara0
5Dev76
6Eliabsent
7Fay
8Gus95
9Hana71
10
11Average69.16666667
AVERAGE adds the six numbers (415) and divides by 6. The word absent and Fay's empty cell are skipped; Cara's 0 is counted.

That three-way split matters for every function in this lesson, so keep these eight cells in mind as you read on.

How to calculate an average in Excel

AVERAGE adds up the numbers and divides by how many numbers there are. You can type it or let AutoSum write it.

Type it (Windows, Mac and Excel for the web):

  1. Click the cell for the answer, here B11.
  2. Type =AVERAGE( and drag over B2:B9.
  3. Type ) and press Enter (Return on a Mac).

Or use the AutoSum drop-down:

  1. Click B11.
  2. On the Home tab, click the small arrow next to AutoSum (Σ). It's on the Formulas tab too.
  3. Choose Average. Excel writes an AVERAGE formula and outlines the range it guessed.
  4. Check the outline. The empty row 10 can make AutoSum guess too little, so if it isn't B2:B9, drag over B2:B9 yourself. Press Enter.

The same drop-down has Count Numbers, Max and Min, so you can build every formula in this lesson without typing a function name. The menu is the same on a Mac and in Excel for the web.

The answer is 69.16666667. Here's why: the numbers are 82, 91, 0, 76, 95 and 71, which add up to 415. There are six of them, and 415 divided by 6 is 69.1666... Microsoft's rules for AVERAGE are simple once you see them:

In the rangeDoes AVERAGE use it?
A number, including 0Yes
An empty cellNo, it's skipped
Text, like "absent"No, it's skipped
TRUE or FALSENo, it's skipped
An error such as #N/AThe whole answer becomes an error

So Cara's 0 drags the class average down, while Eli and Fay don't count at all. Whether that's what you want depends on what the 0 means. If she really scored zero, it should count. If 0 is just a placeholder for "didn't take it", the average is unfairly low, and you'll fix that below.

You can give AVERAGE more than one range, separated by commas, like =AVERAGE(B2:B9, D2:D9), up to 255 items.

MEDIAN: the middle value, and when it beats the average

MEDIAN sorts the numbers in your head and picks the middle one. Type =MEDIAN(B2:B9) and you get 79. With an even number of values, there's no single middle, so Excel averages the two middle ones. Sorted, the six scores are 0, 71, 76, 82, 91, 95. The middle pair is 76 and 82, and halfway between them is 79. MEDIAN skips text and empty cells the same way AVERAGE does, and it also counts zeros.

The median earns its place when a list has an outlier: one value far away from the rest. Pay is the classic case. Here's a small business with five people:

B28=MEDIAN(B22:B26)
AB
21JobSalary
22Assistant$42,000
23Clerk$45,000
24Designer$47,000
25Manager$51,000
26Owner$310,000
27Average salary$99,000
28Median salary$47,000
The owner's pay pushes the average to $99,000, more than four of the five people earn. The median, $47,000, is the typical salary.

Check it by hand: 42,000 + 45,000 + 47,000 + 51,000 + 310,000 = 495,000, and 495,000 divided by 5 is 99,000. The middle of the five sorted values is 47,000. If someone told you "the average salary here is $99,000", you'd get the wrong idea. That's why news reports on house prices and incomes usually quote the median. A good habit: when the average and the median are far apart, look for an outlier before trusting either.

MIN and MAX: the lowest and highest values

MIN returns the smallest number in a range and MAX the largest.

  1. In B13, type =MIN(B2:B9) and press Enter. The answer is 0 (Cara).
  2. In B14, type =MAX(B2:B9) and press Enter. The answer is 95 (Gus).

Like AVERAGE, both skip text, empty cells and TRUE/FALSE in a range. One surprise: if a range holds no numbers at all, MIN and MAX return 0 rather than an error, so a 0 answer can mean "there was nothing to look at". A common use is the spread of a list: =MAX(B2:B9)-MIN(B2:B9) gives 95, the gap between the best and worst score.

COUNT, COUNTA and COUNTBLANK: what each one counts

These three sound alike but count different things. Using the same eight cells:

B16=COUNTA(B2:B9)
AB
15COUNT (numbers)6
16COUNTA (filled cells)7
17COUNTBLANK (empty cells)1
Same eight cells, three different counts: COUNT sees 6 numbers, COUNTA sees 7 filled cells, COUNTBLANK sees 1 empty cell.
  • COUNT counts cells that contain numbers. Dates count too, because Excel stores dates as numbers. Here it's 6: the five scores plus Cara's 0. It ignores "absent" and the empty cell. This is the one AutoSum calls Count Numbers.
  • COUNTA counts every cell that isn't empty: numbers, text, TRUE/FALSE and even error values. Here it's 7, because "absent" now counts.
  • COUNTBLANK counts empty cells. Here it's 1 (Fay). Cells holding 0 are not blank, so Cara isn't counted.

Which should you use? Use COUNT to find how many scores you actually have, COUNTA to count names or entries in a list, and COUNTBLANK to see how many gaps are left to fill in. Note that COUNT plus COUNTBLANK doesn't always equal the number of rows, because text sits in neither group.

One trap: a formula that shows nothing, like ="", isn't truly empty. Microsoft says COUNTA counts it and COUNTBLANK counts it too, so the two can overlap.

Average while ignoring zeros

Back to Cara's 0. If it's only a placeholder, you want the average of the real scores. Use AVERAGEIF with the condition "not equal to zero":

  1. Click B18.
  2. Type =AVERAGEIF(B2:B9,"<>0") and press Enter.

The result is 83: 415 divided by the five scores that aren't 0. The "<>0" part means "not equal to 0", and it must be inside double quotes. If every cell were 0 or empty, you'd get #DIV/0!, because there's nothing left to divide by. AVERAGEIF can do much more, such as averaging only one class or only scores above 50. That's all in COUNTIF, SUMIF and AVERAGEIF.

A simpler fix is often better: if a 0 really means "no score", delete it and leave the cell empty. Plain AVERAGE then skips it.

Round an average with ROUND

69.16666667 is more detail than anyone needs. You have two options, and they're not the same:

  • Decrease Decimal (Home tab, in the Number group) changes how the number looks. The cell still holds 69.1666..., and any formula that uses it gets the full value.
  • ROUND changes the value. Type =ROUND(AVERAGE(B2:B9),1) in B19 and you get 69.2.

ROUND takes two things: the number (here the whole AVERAGE formula) and how many decimal places to keep. Use 0 for a whole number (69) or 2 for cents. Use ROUND when the rounded figure gets used again, for example in a report total, so the numbers on the page add up the way readers expect. For more on number display, see Format cells.

Quick answers in the status bar

You don't always need a formula. Select B2:B9 and look at the status bar, the thin strip at the bottom of the Excel window. By default it shows Average, Count and Sum. Here it reads Average 69.16666667, Count 7 and Sum 415.

To add more:

  1. Right-click the status bar (on a Mac, Control-click it).
  2. Tick Numerical Count, Minimum and Maximum.

Now the bar shows Numerical Count 6, Min 0 and Max 95 as well. Look closely at the two counts: the status bar's Count includes the cell with "absent", like COUNTA, while Numerical Count counts only numbers, like COUNT. In Excel for the web, you can't right-click the bar; click the small arrow next to the last status bar item instead and tick the entries you want. Status bar values aren't saved anywhere, so use a formula for anything you want to keep.

Try it yourself

Download the practice workbook and open the Practice sheet. Yellow cells are where you type.

  1. In B11, type =AVERAGE(B2:B9). You should see 69.16666667.
  2. In B12, B13 and B14, find the median, minimum and maximum. Answers: 79, 0 and 95. Try the AutoSum arrow for Min and Max.
  3. In B15, B16 and B17, use COUNT, COUNTA and COUNTBLANK. You should get 6, 7 and 1.
  4. In B18, type =AVERAGEIF(B2:B9,"<>0"). The answer is 83.
  5. In B19, type =ROUND(AVERAGE(B2:B9),1) to get 69.2.
  6. In B27 and B28, average and median the salaries. You should see $99,000 and $47,000.
  7. Select B2:B9, add Numerical Count, Minimum and Maximum to the status bar, and compare.

Check your work on the Answers sheet.

Common mistakes

  • Treating 0 and blank as the same. AVERAGE counts a 0 but skips an empty cell. A column full of placeholder zeros gives an average that's too low.
  • Typing "n/a" or "-" instead of leaving a gap. AVERAGE skips the text, which is usually fine, but COUNTA will count it and COUNT won't, so your counts disagree.
  • Using COUNT on a list of names. COUNT only counts numbers, so a list of names gives 0. Use COUNTA.
  • Numbers stored as text. A score pasted in as text is skipped by AVERAGE, MIN, MAX and COUNT with no warning. Look for left-aligned numbers with a green triangle, as covered in Add and SUM.
  • Trusting the average when there's an outlier. Check the median too. If they're far apart, one value is pulling the average.
  • Rounding with the Decrease Decimal button only. The cell still holds the long number, so totals built from it can look off by a cent.
  • Forgetting the quotes in AVERAGEIF. =AVERAGEIF(B2:B9,<>0) is an error; the condition needs double quotes: "<>0".

What's next

Before this lesson came Percentages, which pairs well with averages when you want to show a score as a share of the total. Next up is Absolute and relative references, which explains the dollar signs you'll need when you copy a formula like =B2/AVERAGE($B$2:$B$9) down a column. Later, Statistics in Excel goes further into MODE, standard deviation and more. You can also go back to the full Excel course.

Frequently asked questions

Does the Excel AVERAGE function count blank cells or zeros?

It skips blank cells, text and TRUE/FALSE values in a range, but it does count zeros. So a 0 pulls the average down while an empty cell doesn't. If a 0 really means "no data", use =AVERAGEIF(B2:B9,"<>0") instead.

How do I average in Excel but ignore zeros?

Use AVERAGEIF with the condition not equal to zero: =AVERAGEIF(B2:B9,"<>0"). It averages only the cells that aren't 0. If every cell is 0 or empty, you'll get #DIV/0!. More on conditions in COUNTIF, SUMIF and AVERAGEIF.

What's the difference between COUNT and COUNTA?

COUNT counts only cells that hold numbers (dates count, because Excel stores them as numbers). COUNTA counts every cell that isn't empty: numbers, text, errors, even a formula that shows nothing (""). COUNTBLANK counts the empty cells.

When should I use MEDIAN instead of AVERAGE?

When one or two values are far bigger or smaller than the rest, such as house prices or pay. One huge salary can drag the average up, while the median stays at the middle value and shows what's typical.

How do I round an average in Excel?

Wrap it in ROUND: =ROUND(AVERAGE(B2:B9),1) rounds to one decimal place, and 0 instead of 1 rounds to a whole number. The Decrease Decimal button only changes how the number looks; ROUND changes the value itself.

How do I see the average without writing a formula?

Select the cells and look at the status bar along the bottom of the window. It shows Average, Count and Sum by default. Right-click it (Control-click on a Mac) to add Numerical Count, Minimum and Maximum.