Formualizer Docs

AVERAGE

Returns the arithmetic mean of numeric values across scalars and ranges.

AVERAGE sums numeric inputs and divides by the count of numeric values that participated.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=AVERAGE(number1, [number2], ...)

Arguments

ArgumentTypeRequiredDefault
number1number (range)Required—
number2number (range)Optional—

Accepts a variable number of arguments. Minimum: 1.

Return type

Number

Differences from Excel

Formualizer ignores unparseable text supplied directly. Excel returns #VALUE!. If there are no numbers to average, Formualizer returns #DIV/0!.

Remarks

  • Errors in any scalar argument or referenced range propagate immediately.
  • In ranges, only numeric/date-time serial values are included; text and blanks are ignored.
  • Scalar arguments use lenient number coercion with locale support.

Error cases

  • If no numeric values are found, AVERAGE returns #DIV/0!.

Examples

Find the arithmetic mean of 4, 8 and 12.

Formula =AVERAGE(4,8,12)

Expected result 8

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Pass one three-element array to compute the arithmetic mean.

Formula =AVERAGE({4,8,12})

Expected result 8

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The average of the lone observation is 7.

Formula =AVERAGE(7)

Expected result 7

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

A division error among 4 and 12 prevents computing the arithmetic mean.

Formula =AVERAGE(4,1/0,12)

Expected result #DIV/0!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Average of scalar values

Formula =AVERAGE(10, 20, 5)

Expected result 11.6666666666667

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Average over a mixed range

Formula =AVERAGE(A1:A3)

Input cells
A
110
2"x"
320

Expected result 15

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

When does AVERAGE return #DIV/0!?

It returns #DIV/0! when no numeric values are found after filtering/coercion.

Do text cells in ranges affect the denominator?

No. Only numeric values are counted toward the divisor.

Implementation

Engine source

On this page