# ArrayAvg()

Calculates the average of the values in an array.
All elements in the array must contain values that can be automatically converted to numeric.

```
ArrayAvg( array=array );
```

**Returns:** number

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| array | array | Yes | The array to calculate the average values from |  |

# Examples

```cfml
numbers  = [ 1, 2, 3, 4 ];
avgValue = ArrayAvg( numbers );
Echo( avgValue ); // outputs 2.5
```







# Categories

[Arrays](../../categories/array.md)

# See Also

[array.avg()](../objects/array/avg.md)