FormulaCamp
Completed
← All functions
Statistics

AVERAGEIF

Average with one condition.

Syntax

AVERAGEIF(range, criteria, [average_range])

Example: =AVERAGEIF(A:A,"Denver",C:C)

Available in: All versions

AVERAGEIF returns the average of the cells that meet one condition: =AVERAGEIF(range, criteria, [average_range]). Use it to find the average sale for one rep, the average score above a threshold, or the average price for one category.

When to use it

Arguments explained

Worked examples

Average for one region

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =AVERAGEIF(A2:A7,"West",C2:C7)

Result: 1175

West rows are 850 and 1500, giving 1175.

Average of larger amounts only

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =AVERAGEIF(C2:C7,">500")

Result: 1026

Five of the six amounts exceed 500; their sum 5130 divided by 5 is 1026.

Average for one rep

ABC
1RegionRepAmount
2EastAna1200
3WestBen850
4EastCara430
5NorthDan970
6WestEli1500
7EastAna610

Formula: E2: =AVERAGEIF(B2:B7,"Ana",C2:C7)

Result: 905

Ana's two amounts are 1200 and 610.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =AVERAGEIF(A2:A7,"East",C2:C7)

Example spreadsheet for AVERAGEIF
ABCDEF
1RegionProductUnitsPriceResult
2EastPen1202.560
3WestPen802.5
4EastBook4512
5NorthBook6012
6WestLamp3025
7EastLamp1525
Result in F2: 60
Practice this in a lesson: Multiple Conditions

Common errors and how to fix them

Related functions

Frequently asked questions

How do I average ignoring zeros?
Use =AVERAGEIF(range,"<>0").
Does AVERAGEIF include blank cells?
No. Empty cells in the average range are ignored.
What if no cells match?
It returns #DIV/0!. Use IFERROR to show a message.
Can AVERAGEIF take two conditions?
No, use AVERAGEIFS.

More in Statistics