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

Syntax

AVERAGEIFS(average_range,criteria_range1,criteria1,criteria_range2,criteria2…)

Average_range is one or more cells to average, including numbers or names, arrays, or references that contain numbers.

Criteria_range1, criteria_range2, … are 1 to 127 ranges in which to evaluate the associated criteria.

Criteria1, criteria2, … are 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.

Remarks

Note The AVERAGEIFS function measures central tendency, which is the location of the center of a group of numbers in a statistical distribution. The three most common measures of central tendency are:

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.

Example: Averaging student grades

The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

  1. Create a blank workbook or worksheet.
  2. Select the example in the Help topic.

    Note Do not select the row or column headers.

    selecting an example from helpSelecting an example from Help

  3. Press CTRL+C.
  4. In the worksheet, select cell A1, and press CTRL+V.
  5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
1
2
3
4
5
6
7
8
9
A B C D
Student First Quiz Grade Second Quiz Grade Final Exam Grade
Emilio 75 85 87
Julie 94 80 88
Hans 86 93 In complete
Frederique In complete 75 75
Formula Description (result)
=AVERAGEIFS(B2:B5,B2:B5,">70",B2:B5,"<90") Averages for all students all first quiz grades that are between 70 and 90 (80.5)
=AVERAGEIFS(C2:C5,C2:C5,">95") Averages for all students all second quiz grades that are greater than 95, but none exist (#DIV/0!)
=AVERAGEIFS(D2:D5,D2:D5,"<>Incomplete",D2:D5,">80") Averages for all students all first quiz grades that are above 80 and not marked "Incomplete" (87.5)

Example: Averaging real estate prices

The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

  1. Create a blank workbook or worksheet.
  2. Select the example in the Help topic.

    Note Do not select the row or column headers.

    selecting an example from helpSelecting an example from Help

  3. Press CTRL+C.
  4. In the worksheet, select cell A1, and press CTRL+V.
  5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
1
2
3
4
5
6
7
8
9
A B C D E
Type Price Town Number of Bedrooms Garage?
Cozy Rambler 230000 Issaquah 3 No
Snug Bungalow 197000 Bellevue 2 Yes
Cool Cape Codder 345678 Bellevue 4 Yes
Splendid Split Level 321900 Issaquah 2 Yes
Exclusive Tudor 450000 Bellevue 5 Yes
Classy Colonial 395000 Bellevue 4 No
Formula Description (result)
=AVERAGEIFS(B2:B7,C2:C7,"Bellevue",D2:D7,">2" ,E2:E7,"Yes") Average price of a home in Bellevue that has at least 3 bedrooms and a garage (397839)
=AVERAGEIFS(B2:B7,C2:C7,"Issaquah",D2:D7,"<=3" ,E2:E7,"No") Average price of a home in Issaquah that has up to 3 bedrooms and no garage (230000)


See also: