> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metrics-man.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Round

# \$round

The `$round` operator rounds the first number to the specified number of decimal places.

## Input

* An array containing exactly two numeric values: the number to round and the number of decimal places

## Output

* The first value rounded to the specified number of decimal places

## Examples

### Round to Integer

```json theme={null}
{
  "$round": [
    3.7,
    0
  ]
}
```

Result: `4`

### Round to One Decimal Place

```json theme={null}
{
  "$round": [
    3.14159,
    2
  ]
}
```

Result: `3.14`

### Round to Two Decimal Places

```json theme={null}
{
  "$round": [
    123.456789,
    2
  ]
}
```

Result: `123.46`

### Field Value

```json theme={null}
{
  "$round": [
    {
      "$input": "price"
    },
    2
  ]
}
```

Result: The price field rounded to 2 decimal places
