# mean

Computes the mean of all grouped values.

```tql
mean(xs:list) -> float
```

## Description

The `mean` function returns the average of all numeric values in `xs`.

### `xs: list`

The values to average.

## Examples

### Compute the mean value

```tql
from {x: 1}, {x: 2}, {x: 3}
summarize avg=mean(x)
```

```tql
{avg: 2.0}
```

## See Also

* [`max`](https://preview.docs.tenzir.com/375/375/reference/functions/max.md)
* [`median`](https://preview.docs.tenzir.com/375/375/reference/functions/median.md)
* [`min`](https://preview.docs.tenzir.com/375/375/reference/functions/min.md)
* [`quantile`](https://preview.docs.tenzir.com/375/375/reference/functions/quantile.md)
* [`stddev`](https://preview.docs.tenzir.com/375/375/reference/functions/stddev.md)
* [`sum`](https://preview.docs.tenzir.com/375/375/reference/functions/sum.md)
* [`variance`](https://preview.docs.tenzir.com/375/375/reference/functions/variance.md)
* [Aggregate event streams](https://preview.docs.tenzir.com/375/375/guides/analytics/aggregate-event-streams.md)
* [Plot data with charts](https://preview.docs.tenzir.com/375/375/tutorials/plot-data-with-charts.md)
* [Learn idiomatic TQL](https://preview.docs.tenzir.com/375/375/tutorials/learn-idiomatic-tql.md)