Back to functions
Statistical2026-03-181 related article

AVERAGEIF Function in Excel

Return the average of values that meet one condition.

Syntax

AVERAGEIF(range, criteria, [average_range])

Arguments

range

Required

One or more cells to average, including numbers or names, arrays, or references that contain numbers.

criteria

Required

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_range

Optional

The actual set of cells to average. If omitted, range is used.

What it returns

Returns the average of the cells that meet the supplied condition.

What AVERAGEIF does

AVERAGEIF calculates an average only for the values that match one condition. It is useful when a single summary number should ignore rows that do not meet your rule.

Practical examples

Average sales for one region

=AVERAGEIF(B2:B20,"West",C2:C20)

This averages the values in column C only for rows where column B equals West.

Average values above a threshold

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

When average_range is omitted, Excel averages the cells in the tested range itself.

Common mistakes and notes

Criteria with operators need quotes

Expressions such as ">=1000" or "<50" must be entered as text. Without quotes, Excel will not interpret the condition correctly.

range and average_range should align

If the criteria range and the values to average do not line up row for row, the result can be misleading.

Blank and text values are ignored in the average

AVERAGEIF only averages numeric cells from the matching records. Text labels in the average range do not contribute to the result.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use AVERAGEIF.

Official documentation