Category: FUNCTION | Updated: 2026-11-22

How to Use the AVERAGEIFS Function in Google Sheets | Calculate the Average of Numbers Meeting Multiple Criteria

How to Use the AVERAGEIFS Function

The AVERAGEIFS function is a statistical function that filters rows meeting all specified search criteria (AND conditions) and calculates the average of the corresponding numeric values.

Syntax

=AVERAGEIFS(average_range, criteria_range1, criterion1, [criteria_range2, criterion2, ...])
  • average_range: The cell range containing the numbers to average (required; 1st argument).
  • criteria_range1: The first cell range to evaluate (required).
  • criterion1: The criterion for criteria_range1 (required).
  • criteria_range2, criterion2, …: Additional pairs of criteria ranges and criteria, as many as needed (optional).

Table Example

Here is an example of calculating the average satisfaction score for respondents where "Area is Tokyo" and "Age Group is 30s" from the survey summary below.

Row Column A (Area) Column B (Age Group) Column C (Satisfaction Score)
1 Area Age Group Satisfaction Score
2 Tokyo 30s 80
3 Osaka 30s 90
4 Tokyo 20s 70
5 Tokyo 30s 90
6 Tokyo 30s 85
  • Formula: =AVERAGEIFS(C2:C6, A2:A6, "Tokyo", B2:B6, "30s")
  • Result: 85 ((80 + 90 + 85) ÷ 3)

Common Errors and Notes

  • Put average_range as the 1st argument: Unlike AVERAGEIF, the range of numbers to average goes first. Putting a criteria range first causes a #VALUE! error or unintended results.
  • Keep all range sizes identical (#VALUE!): average_range and each criteria_range must have the same number of rows and columns, or a #VALUE! error occurs.
  • #DIV/0! error when no rows match: If 0 rows satisfy all criteria, an error is returned. When building summary tables, wrapping it in =IFERROR(AVERAGEIFS(...), "") keeps the sheet clean.

Frequently Asked Questions

Q. How do I exclude "0" when calculating a conditional average with AVERAGEIFS?

A. Add the average_range itself as a criteria range and specify "<>0" or ">0" as the criterion. For example, =AVERAGEIFS(C2:C20, A2:A20, "Tokyo", C2:C20, "<>0") calculates the average while excluding zeros.

Q. Why does AVERAGEIFS return a "#DIV/0!" error?

A. This happens when no rows satisfy all specified conditions simultaneously, or when none of the matching cells contain numeric values. Wrap it in IFERROR to display a custom fallback.