Going Stellar

Home/Google Sheets reference

Google Sheets function · Statistical

AVERAGE in Google Sheets: syntax and examples

AVERAGE adds up all numeric values in its arguments and divides by how many there are. Empty cells and text inside a range are ignored, but a zero is a real value and lowers the result.

Syntax

AVERAGE(value1, [value2, ...])

Arguments

ArgumentTypeRequiredWhat it does
value1numberyesA number, a cell or a range to average.
value2, ...numbernoMore numbers or ranges. All numeric values are pooled before dividing.

Examples

The examples use this table, starting in A1:

NameJanFebMar
Ana102030
Bob4060
Cris5n/a15
Dan000
=AVERAGE(B2:D2)

Result: 20

Average of one row: (10 + 20 + 30) / 3.

Run in a Google Sheet (English US locale) on .

=AVERAGE(C2:C4)

Result: 20

The empty cell and the text n/a are skipped, so only 20 is averaged.

Run in a Google Sheet (English US locale) on .

=AVERAGE(B2:B5)

Result: 13.75

A zero counts as a value: (10 + 40 + 5 + 0) / 4.

Run in a Google Sheet (English US locale) on .

=AVERAGE(B2:B4, 100)

Result: 38.75

A range and a loose number in one call.

Run in a Google Sheet (English US locale) on .

=ROUND(AVERAGE(B2:D4), 2)

Result: 25.71

Average of a whole block, rounded to two decimals. Blanks and text are not counted.

Run in a Google Sheet (English US locale) on .

Common errors

  • If no argument holds a number, AVERAGE returns #DIV/0!. Wrap it in IFERROR when a range can be empty.
  • Zeros are counted and blanks are not. A column with 0 for no data gives a lower mean than the same column left empty.
  • Text typed straight into the formula, such as AVERAGE("abc"), returns #VALUE!. The same text inside a cell range is skipped.
  • An error value in any argument is passed to the result, so one #DIV/0! cell breaks the whole average.

Compared with Excel

Same syntax as Excel AVERAGE.

Questions and answers

How do I average only some rows?

Use AVERAGEIF or AVERAGEIFS for conditions, or AVERAGE(FILTER(...)) when the rule is more complex.

Sources

  1. AVERAGE (Docs Editors Help)

Markdown version · All functions