> ## 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.

# Add

# \$add

The `$add` operator adds two numeric values together.

## Input

* An array containing exactly two numeric values to add

## Output

* The sum of the two input values

## Examples

### Basic Addition

```json theme={null}
{
  "$add": [
    5,
    3
  ]
}
```

Result: `8`

### Field Value Addition

```json theme={null}
{
  "$add": [
    {
      "$input": "base_salary"
    },
    {
      "$input": "bonus"
    }
  ]
}
```

Result: The sum of base\_salary and bonus fields

### Mixed Number Types

```json theme={null}
{
  "$add": [
    10.5,
    2.3
  ]
}
```

Result: `12.8`
