Google Sheets AVERAGEIF Function: Syntax, Examples & Tips

Returns the average of values in a range that meet a single condition.
Google Sheets
=AVERAGEIF(criteria_range, criterion, [average_range])

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What Is AVERAGEIF?
  3. How AVERAGEIF Works
  4. Basic Examples
  5. Comparison Operators
  6. Wildcards
  7. Dates as Criteria
  8. Common Use Cases
  9. Common Errors
  10. Tips and Best Practices
  11. Related Functions
  12. Example use case

Parameters

ParameterRequiredDescription
criteria_rangeYesThe range to test against the criterion.
criterionYesThe condition to apply, such as "West", ">100", or a cell reference.
average_rangeNoThe cells to average. If omitted, the cells in criteria_range are averaged.

What Is AVERAGEIF?

AVERAGEIF returns the mean of the values that meet one condition. It works like SUMIF, except that it divides the matching total by the number of matches. Use it when you want an answer such as "average order value for the West region" or "average score above 50".

How AVERAGEIF Works

AVERAGEIF checks every cell in criteria_range against the criterion. For each match, the cell in the same position in average_range is included in the average. If you leave out average_range, AVERAGEIF averages the matching cells in criteria_range itself. Text and blank cells in the averaged range are ignored, just as with AVERAGE.

Basic Examples

Average by category

Google Sheets
=AVERAGEIF(A2:A200, "West", C2:C200)

Averages column C for every row where column A is "West".

Average values above a threshold

Google Sheets
=AVERAGEIF(B2:B100, ">50")

Averages only the numbers in B2:B100 that are greater than 50.

Exclude zeros

Google Sheets
=AVERAGEIF(B2:B100, "<>0")

Averages every non-zero number, a common way to ignore placeholder zeros.

Use a cell as the criterion

Google Sheets
=AVERAGEIF(A2:A200, F1, C2:C200)

Lets you change the category in F1 and see the result update.

Comparison Operators

OperatorMeaningExample
>Greater than">100"
<Less than"<10"
>=Greater than or equal to">=0"
<=Less than or equal to"<=5"
<>Not equal to"<>Closed"

Combine an operator with a cell value using &:

Google Sheets
=AVERAGEIF(B2:B100, ">="&E1)

Wildcards

For text criteria, * matches any run of characters and ? matches exactly one:

Google Sheets
=AVERAGEIF(A2:A200, "*Pro*", C2:C200)

Averages column C for any product name that contains "Pro". To match a literal asterisk or question mark, put a tilde in front (~*).

Dates as Criteria

Google Sheets
=AVERAGEIF(A2:A365, ">="&DATE(2026,7,1), B2:B365)

Averages values for dates on or after 1 July 2026. Build date criteria with DATE rather than typing a date string, to avoid locale problems.

Common Use Cases

  • Sales: average deal size per rep or region
  • Support: average resolution time for one priority level
  • Education: average score for a class or section
  • Marketing: average cost per click for one channel
  • Data cleaning: averages that skip zeros or a "test" category

Common Errors

  • #DIV/0!: No cells matched the criterion, or the matching cells contain no numbers. Wrap with IFERROR to show a blank: =IFERROR(AVERAGEIF(...), "").
  • Operator outside quotes: >50 must be written as ">50".
  • Mismatched ranges: Keep criteria_range and average_range the same size and aligned on the same rows.
  • Numbers stored as text: These are skipped in the averaged range and can produce a misleading average.

Tips and Best Practices

  • Text matching is not case-sensitive: "west" matches "West".
  • For two or more conditions, switch to AVERAGEIFS, which puts the averaged range first.
  • To count how many rows the average is based on, pair it with COUNTIF using the same criterion.
  • AVERAGEIFS: averages with multiple conditions
  • AVERAGE: unconditional mean
  • SUMIF: sums with a condition
  • IF: build more complex logic

Example use case

A sales director wants to compare regions. With regions in column A and deal values in column C, =AVERAGEIF(A2:A500, "West", C2:C500) returns the average deal size in the West, and changing the criterion to a cell reference lets one formula serve every region.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.