Skip to content
Excel

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.

  1. Average deal size for the West region only:

    =AVERAGEIF(A2:A100, "West", C2:C100)

    Result8450

  2. Average of the deals over $1,000, ignoring the small ones:

    =AVERAGEIF(C2:C100, ">1000")

    Result4820

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.

Loading the editor…

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.