---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/function-ref/ARR_AVG
  - ru/function-ref/ARR_AVG
  - href: en/function-ref/ARR_AVG.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/function-ref/ARR_AVG.html
editable: false
vcsPath: en/function-ref/ARR_AVG.md
---

# ARR_AVG



#### Syntax {#syntax}


```
ARR_AVG( array )
```

#### Description {#description}
Returns the average of elements in the `array`.

**Argument types:**
- `array` — `Array of fractional numbers | Array of integers`


**Return type**: `Fractional number`

{% note info %}

This function cannot work with arrays with `Nullable` items. To remove `NULL` items from the array, use [ARR_REMOVE](ARR_REMOVE.md) or [REPLACE](REPLACE_ARRAY.md).

{% endnote %}


#### Example {#examples}



| **[int_array]**   | **[float_array]**   | **ARR_AVG([int_array])**   | **ARR_AVG([float_array])**   |
|:------------------|:--------------------|:---------------------------|:-----------------------------|
| `'[21,12,0]'`     | `'[14.3,0.42,15]'`  | `11.00`                    | `9.91`                       |
| `'[-4,12,0]'`     | `'[0,-3,12]'`       | `2.67`                     | `3.00`                       |
| `'[5,7,9]'`       | `'[3.2,2.3,3.2]'`   | `7.00`                     | `2.90`                       |




#### Data source support {#data-source-support}

`ClickHouse 21.8`, `Files`, `Google Sheets`, `Yandex Documents`.
