What AVERAGEIFS does

AVERAGEIFS averages the numbers on the rows that meet several conditions at once. =AVERAGEIFS(C2:C7,A2:A7,"Rapid",B2:B7,"North") averages the delivery days in C2:C7 on the rows where the carrier is Rapid and the region is North. A row is counted only when every condition is true.

It takes its arguments in the same order as SUMIFS: the numbers to average first, then pairs of a range to test and the condition for it. With one pair it does the job of AVERAGEIF, so you can use AVERAGEIFS for every conditional average and keep a single argument order in mind.

Put the conditions in cells, and the same formula answers for whichever carrier or region someone types in.

Syntax

=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Arguments in square brackets are optional; the rest are required.
average_rangeRequired
The numbers to average, such as the delivery days in C2:C7. In AVERAGEIFS this comes first.
criteria_range1Required
The first range to test, such as the carrier column A2:A7. It must be the same size as average_range.
criteria1Required
The condition for that range: "Rapid", ">2", a number or a cell. Join an operator to a cell with &: ">="&B1.
criteria_range2Optional, can repeat
The next range to test, such as the region column B2:B7, again the same size.
criteria2Optional, can repeat
The condition for that range. Add more pairs as you need them, up to 127; a row counts only when it meets every condition.

Example: average delivery time for one carrier and region

A logistics team logs every delivery with the carrier, the region and the days it took.

Rows 2, 5 and 7 are Rapid deliveries to the North: (3 + 4 + 2) ÷ 3 = 3. In C8, =AVERAGEIFS(C2:C7,A2:A7,"Rapid",B2:B7,"North") returns 3.

Read it as: average C2:C7 on the rows where A2:A7 says Rapid and B2:B7 says North. Row 3 is a Rapid delivery to the South and row 4 goes North with Swift, so neither counts.

Example: average daily sales between two dates

A store manager wants the average day’s sales for one week, with the first and last dates in B1 and B2.

Four days fall from Mar 9 to Mar 15, 2026: (980 + 1,150 + 1,310 + 880) ÷ 4 = 1,080. In B12, =AVERAGEIFS(B5:B11,A5:A11,">="&B1,A5:A11,"<="&B2) returns 1,080.

The date column is tested twice, once for each end, and both dates count. Type new dates into B1 and B2 and the average follows.

AVERAGEIFS with OR

AVERAGEIFS joins its conditions with AND, so =AVERAGEIFS(C2:C7,B2:B7,"North",B2:B7,"South") looks for rows that are in both regions and returns #DIV/0!.

To average the rows of one region or another, add the totals and divide by the counts: =SUM(SUMIFS(C2:C7,B2:B7,{"North","South"}))/SUM(COUNTIFS(B2:B7,{"North","South"})). Every delivery above is North or South, so here it gives 3.67, the same as averaging all six. Averaging the two regions’ AVERAGEIFS results instead gives 4.125, because that weighs the South’s two deliveries as much as the North’s four.

Common mistakes

  • AVERAGEIFS takes the numbers first and AVERAGEIF takes them last. Written in AVERAGEIF’s order, =AVERAGEIFS(A2:A7,"Rapid",C2:C7) gives an error.
  • Every range must cover the same rows as the numbers. =AVERAGEIFS(C2:C7,A2:A7,"Rapid",B2:B6,"North") gives #VALUE!.
  • When no row meets every condition, AVERAGEIFS shows #DIV/0!. Test each condition on its own with COUNTIFS to find the one that matches nothing, often a typo or a trailing space in the data.
  • A date typed into a condition as text, such as “9/3/2026”, can mean a different day on another computer. Keep the dates in cells and join them on with ">="&B1.

Frequently asked questions

How do I use AVERAGEIFS with a date range?

Test the date column twice: =AVERAGEIFS(B5:B11,A5:A11,">="&B1,A5:A11,"<="&B2) averages the rows from the date in B1 to the date in B2, both included.

How do I average excluding zeros with AVERAGEIFS?

Add the numbers themselves as a range to test, with ">0" as its condition: =AVERAGEIFS(C2:C7,A2:A7,"Rapid",C2:C7,">0") averages Rapid’s deliveries and leaves out any 0.

Why is AVERAGEIFS returning #DIV/0!?

No row met every condition, so there was nothing to average. Check each condition with COUNTIFS, and when no match is normal, wrap the formula in IFERROR to show a message instead.

How many conditions can AVERAGEIFS take?

Up to 127 pairs of range and condition. A row is averaged only when it meets all of them.

What is the difference between AVERAGEIF and AVERAGEIFS?

AVERAGEIF takes one condition and puts the numbers to average last. AVERAGEIFS takes one condition or many and puts the numbers first.