AVERAGEIFS in Excel: examples and practice

AVERAGEIFS calculates the average of the cells that meet all conditions. For example, =AVERAGEIFS(C2:C7,A2:A7,"North") gives the average amount of the North region.

Syntax

=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
=MAXIFS(max_range, criteria_range1, criteria1, ...)
average_range
The cells with the numbers to average.
criteria_range1
The cells to test, for example the Region column.
criteria1
The condition, for example "North" or ">100".
criteria_range2, criteria2, ...
Optional. More pairs of range and condition.

Examples

Example data

ABC
1RegionStatusAmount
2NorthPaid120
3SouthOpen80
4NorthOpen200
5EastPaid60
6NorthPaid100
7SouthPaid150
FormulaResultWhat it does
=AVERAGEIFS(C2:C7,A2:A7,"North")140The average of the North amounts: (120 + 200 + 100) / 3.
=AVERAGEIFS(C2:C7,A2:A7,"North",B2:B7,"Paid")110Only rows that are North and also Paid: 120 and 100.
=MAXIFS(C2:C7,B2:B7,"Paid")150MAXIFS gives the largest amount with the status Paid.

Try it

In cell E2, calculate the average amount of the South region.

Show the solution

=AVERAGEIFS(C2:C7,A2:A7,"South") → 115

Common mistakes

#DIV/0! when no row matches

If no row meets the conditions, AVERAGEIFS divides by 0. Check the spelling of the condition, or wrap the formula in IFERROR.

AVERAGEIF order in AVERAGEIFS

AVERAGEIF has the average range last, AVERAGEIFS has it first. Start AVERAGEIFS with the numbers.

Fatima Haddad, owns Ridgeline Bike Rental

Practice this in a story

A short lesson from a real job. We show you each step, then you do it yourself.

Longest tour per type · Module 6 · Conditional Sums and Counts · 5 min

Customers write the distance of every tour in June. Fatima wants to put a sign at the door: the average tour for each bike type, and the record. Goat the mountain bike is a candidate.

Practice this in a story

Related functions