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

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

### Syntax

`.max()`

- Returns the largest numeric value in the Sequence or List.

`.max{expression}`

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

### Examples

- `[1, 2, 3].max()` returns `3`
- `[1, 2, 3].max{it * 3}` returns `9`
- `db.job.find{dept:engineering}.max{baseComp}` returns the highest base compensation in the Engineering department.

