AVERAGEIF function in Excel
Returns the average (arithmetic mean) of all the cells in a range that meet a given criteria
=AVERAGEIF(range, criteria, [average_range])AVERAGEIF syntax and parameters
Three arguments, two required.
- rangerangeRequired
One or more cells to average, including numbers or names, arrays, or references that contain numbers.
- criteriaanyRequired
The criteria in the form of a number, expression, cell reference, or text that defines which cells are averaged. For example, criteria can be expressed as 32, "32", ">32", "apples", or B4.
- average_rangerangeOptional
The actual set of cells to average. If omitted, range is used.
AVERAGEIF examples
Formulas you'll actually reuse.
Average deal size for the West region only:
=AVERAGEIF(A2:A100, "West", C2:C100)Result
8450Average of the deals over $1,000, ignoring the small ones:
=AVERAGEIF(C2:C100, ">1000")Result
4820
AVERAGEIF in Google Sheets
Same name — your formula ports as-is.
Try AVERAGEIF in the playground
Edit the example — nothing to install.
Preloaded with the AVERAGEIF formula from Example 1 — change anything and watch it respond.
AVERAGEIF errors
What they mean — and the fixes.
#DIV/0!No cell matched the criterion, so there was nothing to average — verify the criterion text matches the data exactly.
Related functions
More ways Excel gets this done.
- FORECAST.LINEARReturns a future value based on existing valuesStatisticalGoogle Sheets
- LINESTReturns the parameters of a linear trendStatisticalGoogle Sheets
- CELLReturns information about the formatting, location, or contents of a cellThis function is not available in Excel for the web.InfoGoogle Sheets
- CSCReturns the cosecant of an angleMathGoogle Sheets
- FILTERFilters a range of data based on criteria you defineLookupGoogle Sheets
- FINDFinds one text value within another (case-sensitive)TextGoogle Sheets