AVERAGEIFS Function

Excel Functions › Statistical

Excel 2007+ Statistical

The Excel AVERAGEIFS function averages cells that satisfy multiple conditions at once — for example, the average sale for the East region in Q1 that also exceeded target.


Quick answer:
=AVERAGEIFS(C2:C20,A2:A20,"East",B2:B20,"Q1") avg of C where A=East and B=Q1

Syntax

=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
ArgumentDescription
average_rangeRequiredThe cells to average — listed first, unlike AVERAGEIF.
criteria_range1RequiredThe first range to test.
criteria1RequiredThe condition applied to criteria_range1, e.g. "East" or ">=100".
criteria_range2, criteria2, ...OptionalUp to 126 more range/criteria pairs. A row must satisfy all of them.

How to use it

AVERAGEIFS averages only the rows that meet every criteria pair you list. The big difference from AVERAGEIF: the average_range comes first, then each criteria_range, criteria pair follows.

=AVERAGEIFS(C2:C20, A2:A20,"East", B2:B20,"Q1") // East AND Q1
=AVERAGEIFS(C2:C20, A2:A20,"East", C2:C20,">=100") // East AND >= 100

All ranges must be the same size and shape, since AVERAGEIFS lines them up row by row. With a table where 3 rows are both "East" and "Q1" and their values total 930, =AVERAGEIFS(C2:C20,A2:A20,"East",B2:B20,"Q1") returns 310.

Argument order trap: AVERAGEIF puts the average range last (and optional); AVERAGEIFS puts it first (and required). Mixing them up is the most common AVERAGEIFS mistake.

Try it: interactive demo

Live demo

Pick a AVERAGEIFS example to see the formula and its result.

Result:

Practice workbook

📊
Download the free AVERAGEIFS practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

How is the argument order different from AVERAGEIF?
AVERAGEIFS lists the average_range first and requires it; AVERAGEIF lists the average range last and makes it optional. This trips up many users switching between the two.
How many conditions can AVERAGEIFS handle?
Up to 127 criteria pairs. Every condition must be satisfied for a row to be included — the logic is AND, not OR.
Do all the ranges have to be the same size?
Yes. The average range and every criteria range must have identical dimensions, or AVERAGEIFS returns a #VALUE! error.
Why does AVERAGEIFS return #DIV/0!?
No row satisfied all of the conditions, so there was nothing to average. Loosen a criterion or check for typos in the text criteria.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: AVERAGEIF · AVERAGE · SUMIFS · COUNTIFS · MAXIFS