Statistical Excel 2007 ◉ 17 views

=AVERAGEIFS()

Returns the average (arithmetic mean) of all cells that meet multiple criteria.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016Excel Web App
=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Hover argument names in the table for details.
Output typeNumber
Popularity60 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =AVERAGEIFS() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download AVERAGEIFS.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
average_range Any type Required One or more cells to average, including numbers or names, arrays, or references that contain numbers.
criteria_range1 Any type Required , criteria_range2, … Criteria_range1 is required, subsequent criteria_ranges are optional. 1 to 127 ranges in which to evaluate the associated criteria.
criteria1 Any type Required , criteria2, ... Criteria1 is required, subsequent criteria are optional. 1 to 127 criteria in the form of a number, expression, cell reference, or text that define which cells will be averaged. For example, criteria can be expressed as 32, "32", ">32", "apples", or B4.

▣ Examples

▦ Data
CellValue
A2 Student
B2 First
C2 Second
D2 Final
B3 Quiz
C3 Quiz
D3 Exam
B4 Grade
C4 Grade
D4 Grade
A5 Emilio
B5 75
C5 85
D5 87
A6 Julie
B6 94
C6 80
D6 88
A7 Hans
B7 86
C7 93
D7 Incomplete
A8 Frederique
B8 Incomplete
C8 75
D8 75
A9 Type
B9 Price
C9 Town
D9 Number of Bedrooms
E9 Garage?
A10 Cozy Rambler
B10 230000
C10 Issaquah
D10 3
E10 No
A11 Snug Bungalow
B11 197000
C11 Bellevue
D11 2
E11 Yes
A12 Cool Cape Codder
B12 345678
C12 Bellevue
D12 4
E12 Yes
A13 Splendid Split Level
B13 321900
C13 Issaquah
D13 2
E13 Yes
A14 Exclusive Tudor
B14 450000
C14 Bellevue
D14 5
E14 Yes
A15 Classy Colonial
B15 395000
C15 Bellevue
D15 4
E15 No
A16 Student
B16 First
C16 Second
D16 Final
B17 Quiz
C17 Quiz
D17 Exam
B18 Grade
C18 Grade
D18 Grade
A19 Emilio
B19 75
C19 85
D19 87
A20 Julie
B20 94
C20 80
D20 88
A21 Hans
B21 86
C21 93
D21 Incomplete
A22 Frederique
B22 Incomplete
C22 75
D22 75
A23 Type
B23 Price
C23 Town
D23 Number of Bedrooms
E23 Garage?
A24 Cozy Rambler
B24 230000
C24 Issaquah
D24 3
E24 No
A25 Snug Bungalow
B25 197000
C25 Bellevue
D25 2
E25 Yes
A26 Cool Cape Codder
B26 345678
C26 Bellevue
D26 4
E26 Yes
A27 Splendid Split Level
B27 321900
C27 Issaquah
D27 2
E27 Yes
A28 Exclusive Tudor
B28 450000
C28 Bellevue
D28 5
E28 Yes
A29 Classy Colonial
B29 395000
C29 Bellevue
D29 4
E29 No
Average first quiz grade that falls between 70 and 90 for all students (80.5). The score marked "Incomplete" is not included in the calculation because it is not a numerical value. =AVERAGEIFS(B2:B5, B2:B5, ">70", B2:B5, "<90")
Result: 75
Average second quiz grade that is greater than 95 for all students. Because there are no scores greater than 95, #DIV0! is returned. =AVERAGEIFS(C2:C5, C2:C5, ">95")
Result: #DIV/0!
Average final exam grade that is greater than 80 for all students (87.5). The score marked "Incomplete" is not included in the calculation because it is not a numerical value. =AVERAGEIFS(D2:D5, D2:D5, "<>Incomplete", D2:D5, ">80")
Result: 87.5
Average price of a home in Bellevue that has at least 3 bedrooms and a garage =AVERAGEIFS(B2:B7, C2:C7, "Bellevue", D2:D7, ">2",E2:E7, "Yes")
Result: 397839
Average price of a home in Issaquah that has up to 3 bedrooms and no garage =AVERAGEIFS(B2:B7, C2:C7, "Issaquah", D2:D7, "<=3",E2:E7, "No")
Result: 230000

§ Remarks

  • If average_range is a blank or text value, AVERAGEIFS returns the #DIV0! error value.
  • If a cell in a criteria range is empty, AVERAGEIFS treats it as a 0 value.
  • Cells in range that contain TRUE evaluate as 1; cells in range that contain FALSE evaluate as 0 (zero).
  • Each cell in average_range is used in the average calculation only if all of the corresponding criteria specified are true for that cell.
  • Unlike the range and criteria arguments in the AVERAGEIF function, in AVERAGEIFS each criteria_range must be the same size and shape as average_range.
  • If cells in average_range cannot be translated into numbers, AVERAGEIFS returns the #DIV0! error value.
  • If there are no cells that meet all the criteria, AVERAGEIFS returns the #DIV/0! error value.
  • You can use the wildcard characters, question mark (?) and asterisk (*), in criteria. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
  • Average which is the arithmetic mean, and is calculated by adding a group of numbers and then dividing by the count of those numbers. For example, the average of 2, 3, 3, 5, 7, and 10 is 30 divided by 6, which is 5.
  • Median which is the middle number of a group of numbers; that is, half the numbers have values that are greater than the median, and half the numbers have values that are less than the median. For example, the median of 2, 3, 3, 5, 7, and 10 is 4.
  • Mode which is the most frequently occurring number in a group of numbers. For example, the mode of 2, 3, 3, 5, 7, and 10 is 3.
  • For a symmetrical distribution of a group of numbers, these three measures of central tendency are all the same. For a skewed distribution of a group of numbers, they can be different.

✦ Tips

  • If average_range is a blank or text value, AVERAGEIFS returns the #DIV0! error value.
  • If a cell in a criteria range is empty, AVERAGEIFS treats it as a 0 value.
  • Cells in range that contain TRUE evaluate as 1; cells in range that contain FALSE evaluate as 0 (zero).
  • Each cell in average_range is used in the average calculation only if all of the corresponding criteria specified are true for that cell.
  • Unlike the range and criteria arguments in the AVERAGEIF function, in AVERAGEIFS each criteria_range must be the same size and shape as average_range.
  • If cells in average_range cannot be translated into numbers, AVERAGEIFS returns the #DIV0! error value.
  • You can use the wildcard characters, question mark (?) and asterisk (*), in criteria. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
  • Average which is the arithmetic mean, and is calculated by adding a group of numbers and then dividing by the count of those numbers. For example, the average of 2, 3, 3, 5, 7, and 10 is 30 divided by 6, which is 5.
  • Median which is the middle number of a group of numbers; that is, half the numbers have values that are greater than the median, and half the numbers have values that are less than the median. For example, the median of 2, 3, 3, 5, 7, and 10 is 4.
  • Mode which is the most frequently occurring number in a group of numbers. For example, the mode of 2, 3, 3, 5, 7, and 10 is 3.
  • For a symmetrical distribution of a group of numbers, these three measures of central tendency are all the same. For a skewed distribution of a group of numbers, they can be different.

⚠ Common Errors

#DIV/0! If there are no cells that meet all the criteria, AVERAGEIFS returns the #DIV/0! error value.
Fix: Check the criteria or handle the error with IFERROR

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.