
The Excel AVERAGEIFS function returns the arithmetic mean of numbers only when all specified conditions are met. Use it to calculate average sales by region and product, average employee pay by department and role, or average transaction size within a date range.
AVERAGEIFS syntax
=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
average_range is the numeric range to average. Each subsequent pair checks one condition; a row must meet every condition to count. All criteria ranges must be the same size and shape as the average range.
Example 1: Average sales for a region and product
Suppose columns A, B and C contain Region, Product and Sales. The five rows are West/Laptop/1000, West/Phone/500, East/Laptop/700, West/Laptop/1400 and East/Phone/600.
=AVERAGEIFS(C2:C6,A2:A6,"West",B2:B6,"Laptop")
Result: 1,200. The matching West/Laptop sales are 1,000 and 1,400; their average is 1,200.
Example 2: Average above a threshold within a category
With regions in A2:A100 and order values in C2:C100, average West region orders worth more than 500:
=AVERAGEIFS(C2:C100,A2:A100,"West",C2:C100,">500")
The average range can also act as one of the criteria ranges.
Example 3: Use cell references for interactive reports
If E2 contains a selected region and F2 a selected product:
=AVERAGEIFS(C2:C100,A2:A100,E2,B2:B100,F2)
Changing the inputs updates the answer. To compare with a threshold stored in G2, concatenate the operator: ">"&G2.
Example 4: Average between two dates
Suppose A2:A100 stores real dates and C2:C100 stores order amounts. To average orders placed in October 2026:
=AVERAGEIFS(C2:C100,A2:A100,">="&DATE(2026,10,1),A2:A100,"<"&DATE(2026,11,1))
Using a strict less-than test for 1 November also includes records with times on 31 October.
Example 5: Average while excluding blanks
To average scores in C2:C100 for West while excluding zero scores:
=AVERAGEIFS(C2:C100,A2:A100,"West",C2:C100,"<>0")
Zero and blank values are not always interchangeable; decide whether zero represents a genuine result or missing data.
Example 6: Wildcard criteria
Average amounts for product names starting with Laptop in the West region:
=AVERAGEIFS(C2:C100,A2:A100,"West",B2:B100,"Laptop*")
The * wildcard matches any number of characters. The ? wildcard matches exactly one.
AVERAGEIF vs AVERAGEIFS
AVERAGEIF handles one condition and takes the criteria range first. AVERAGEIFS handles two or more conditions (or even just one) and takes the average range first. This argument-order difference is a frequent source of mistakes.
Common errors and fixes
- #DIV/0!: no qualifying numeric values were found. Double-check spelling, criteria and data types.
- #VALUE!: criteria ranges have different dimensions. Make all ranges equally sized.
- Incorrect date results: verify that dates are stored as dates, not text strings.
- Operators treated as text: use
">"&G2, not">G2". - Unexpected averages: review blanks, zero values and numbers stored as text.
Frequently asked questions
Does AVERAGEIFS use AND or OR logic?
It uses AND across its criteria pairs. For OR logic, you usually need a different setup or separate calculations weighted by matching counts.
Can I use AVERAGEIFS with one condition?
Yes. AVERAGEIFS supports one or more criteria pairs.
How can I prevent #DIV/0!?
First check why no numeric records matched. If an empty result is expected, use =IFERROR(AVERAGEIFS(...),"No matching data") with the full AVERAGEIFS formula in place of the ellipsis.
Practice exercise
Create a sales table with Date, Region, Product and Amount. Calculate the average Laptop sale in West, the average West sale over ₹1,000, and the average order value during a selected month.
For related conditional calculations, explore Module 3: Excel Functions and learn the differences between COUNTIFS, SUMIFS and AVERAGEIFS.
