---
title: .mean()
slug: yOFs-mean
docTags: 
createdAt: 2021-09-14T18:35:53.000Z
---

Returns the mean average value of a [Sequence](docId\:JG4itlQWafzLpArttFo67) or [List](docId\:xWH_cUkHj9waqaEfb7H71), optionally evaluating an expression.

### Syntax

`.mean()`

- Returns the mean average numeric value in the Sequence or List.

`.mean{expression}`

- Returns the mean average, after evaluating the Carrot expression on each element of the Sequence or List.

### Examples

- `[1, 2, 3, 4].mean()` returns `2.5`
- `[1, 2, 3, 4].mean{it * 3}` returns `7.5`
- `db.job.find{dept:engineering}.mean{baseComp}` returns the mean average base compensation in the Engineering department.

