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

# Sqrt

# \$sqrt

The `$sqrt` operator returns the square root of a number.

## Input

* A single numeric value (must be non-negative)

## Output

* The square root of the input value

## Examples

### Perfect Square

```json theme={null}
{
  "$sqrt": [
    16
  ]
}
```

Result: `4`

### Non-integer Result

```json theme={null}
{
  "$sqrt": [
    2
  ]
}
```

Result: `1.4142135623730951`

### Field Value

```json theme={null}
{
  "$sqrt": [
    {
      "$input": "area"
    }
  ]
}
```

Result: The square root of the area field

### Negative Number Error

```json theme={null}
{
  "$sqrt": [
    -4
  ]
}
```

Result: Error (cannot take square root of negative number)
