How to Calculate an Average in Excel: AVERAGE, AVERAGEIF, and More

Calculating an average in Excel sounds simple — and for basic use cases, it is. But Excel offers several averaging functions, each designed for different situations. Knowing which one fits your data makes a real difference in accuracy and efficiency.

The Core Function: AVERAGE

The most straightforward way to calculate an average in Excel is the AVERAGE function. It adds up all the numbers in a range and divides by the count of those numbers — exactly what you'd expect from a standard arithmetic mean.

Syntax:

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

Example:

=AVERAGE(B2:B10) 

This calculates the mean of all values in cells B2 through B10. You can also reference individual cells or mix ranges with direct values:

=AVERAGE(B2, B5, B9) =AVERAGE(B2:B10, D2:D10) 

Key behavior to know: AVERAGE automatically ignores empty cells and text. It does not ignore cells containing zero — zeros are counted as values. This distinction matters more than most people expect when working with real datasets.

Typing It Manually vs. Using AutoSum ⚡

If you prefer not to type formulas, Excel's AutoSum shortcut includes an average option. Select the cell where you want the result, go to Home → AutoSum → Average, then highlight your range and press Enter. Excel writes the formula for you.

For keyboard users: Alt + = triggers AutoSum. You can then click the dropdown arrow next to the button to switch to Average.

Both approaches produce identical results — the method just depends on how you prefer to work.

When You Need to Average With Conditions: AVERAGEIF and AVERAGEIFS

Standard AVERAGE treats every number equally. But what if you only want to average sales figures for a specific region, or scores above a certain threshold? That's where conditional averaging functions come in.

AVERAGEIF — One Condition

Syntax:

=AVERAGEIF(range, criteria, [average_range]) 

Example — average sales only for the "North" region:

=AVERAGEIF(A2:A20, "North", B2:B20) 

Here, column A contains region names and column B contains sales figures. Excel averages only the rows where column A equals "North."

Criteria can be:

  • Text: "North"
  • Numbers: 150
  • Comparison operators: ">100", "<>0"
  • Wildcards: "N*" matches anything starting with N

If you omit the average_range, Excel averages the values in the range argument itself — useful when your condition and your data live in the same column.

AVERAGEIFS — Multiple Conditions

Syntax:

=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...) 

Example — average sales for "North" region in Q1:

=AVERAGEIFS(C2:C20, A2:A20, "North", B2:B20, "Q1") 

AVERAGEIFS requires the average range first, which is the reverse order from AVERAGEIF — a common source of errors when switching between the two.

Handling Specific Data Situations

SituationBest FunctionNotes
Average all numbers in a rangeAVERAGEIgnores blanks and text
Average only values meeting one conditionAVERAGEIFSupports wildcards and operators
Average with two or more conditionsAVERAGEIFSAverage range goes first
Average including zerosAVERAGEZeros count as values by default
Average excluding zerosAVERAGEIF(range,">0")Filters out zero values
Weighted averageCustom formulaSee below

Weighted Averages: A Different Approach

A standard AVERAGE gives equal weight to every value. A weighted average accounts for the fact that some values count more than others — for example, a final exam worth 50% of a grade versus a quiz worth 10%.

Excel doesn't have a dedicated weighted average function, but you can combine SUMPRODUCT and SUM:

=SUMPRODUCT(B2:B5, C2:C5) / SUM(C2:C5) 

Where B2:B5 contains the scores and C2:C5 contains the weights. SUMPRODUCT multiplies each score by its corresponding weight, sums those products, then divides by the total weight.

Common Errors and What They Mean

  • #DIV/0! — Excel is trying to divide by zero, which usually means your range contains no numeric values, or your AVERAGEIF condition matched no rows.
  • #VALUE! — Often caused by text in a range where numbers are expected, or mismatched range sizes in AVERAGEIFS.
  • Unexpected results — Double-check whether zeros in your data are intentional values or placeholders for missing data. This is one of the most frequent sources of averages that look slightly off.

Variables That Shape Your Approach 🔢

The "right" way to average data in Excel depends heavily on factors specific to your spreadsheet:

  • Data structure — Are your values in a single column, across multiple sheets, or in a pivot table?
  • Conditions — Do you need a simple overall average, or do categories, date ranges, or thresholds matter?
  • Zeros and blanks — Should missing entries pull your average down, or be excluded entirely?
  • Weighting — Do all data points carry equal importance, or do some values count more than others?
  • Excel version — Older versions of Excel (pre-2007) don't support AVERAGEIFS; if you're working in a shared environment with legacy files, that's worth checking.

A dataset tracking monthly expenses behaves very differently from one tracking survey scores, student grades, or server response times — even though the math looks the same on the surface. The function that works cleanly for one scenario can produce misleading results in another if the underlying data has gaps, outliers, or unequal weights.

How you handle those specifics depends entirely on what your data actually represents and what question you're trying to answer with it.