Excel AVERAGEIF Function

AVERAGEIF averages values that match one condition.

Use it for one-condition averages, such as average order value for one region, average score above a threshold, or average time for one task type.

1
Choose a test range These cells are checked
2
Apply a criterion Excel finds matching rows
3
Average matching values The related cells are averaged

AVERAGEIF syntax & arguments

Syntax

=AVERAGEIF(range, criteria, [average_range])
Required Optional
  1. 1

    range

    Required

    The cells to test against the criterion.

  2. 2

    criteria

    Required

    The condition that decides which rows or cells are included. It can be a number, text, cell reference, expression such as ">80", or wildcard pattern.

  3. 3

    average_range

    Optional

    The cells to average when the matching cell in range meets the criterion. If omitted, Excel averages the matching cells in range.

Example

=AVERAGEIF(B2:B50, "East", D2:D50)

Average values in D2:D50 where the matching cell in B2:B50 is East.

AVERAGEIF caveats

  • Range alignment matters

    range and average_range should cover the same rows or columns so the tested cells line up with the values being averaged.

  • Operators usually need quotes

    Criteria such as ">80" or "<>Cancelled" must be written as text.

  • It only handles one condition

    Use AVERAGEIFS instead when the average depends on multiple criteria, such as region and month.

  • Only numeric average cells count

    Blank or text cells inside average_range are skipped, so the denominator is the count of matching numeric values.

Need a conditional total? Use SUMIF when matching cells should drive values that are added instead of averaged.

Intro AVERAGEIF practice problems

No intro AVERAGEIF problems are currently available.

Advanced AVERAGEIF practice problems

Use AVERAGEIF alongside other Excel functions in realistic, less-prescriptive challenges.