average

returns the arithmetic mean of a list of numbers.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

average(numbersList)

# Params

- numbersList : A comma-separated list of numbers, or an expression that evaluates to such a list, or an array containing only numbers.

# Examples

average(4,36,45,50,75) -- returns 42

put average(importedList) into field "Arithmetic Mean"

put average(replaceText(field "Values",return,comma)) into avgValue

# Description

Use the average function to find the value that best represents a group of values.

The average of a list of numbers is the sum of the items in the list or elements in the array, divided by the number of items or elements.

The average function can also be written like this:

sum(numbersList)/the number of items in numbersList

If the numbersList is empty, the average function returns zero.

If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information.

# Tags

# See

- **control structure:** function - **glossary:** return, value, math operation - **function:** min, geometricMean, statRound, harmonicMean, variance, round, value, max, median, standardDeviation