# STD_DEV

Calculates the standard deviation of a numeric field.

## Syntax

`STD_DEV(number)`

### Parameters

#### number

A numeric field for which the standard deviation is calculated.

## Examples

Calculate the standard deviation of a field

```esql
FROM employees
| STATS STD_DEV(height)
```

Calculate the standard deviation of the `height` field.

Use inline functions with STD_DEV

```esql
FROM employees
| STATS stddev_salary_change = STD_DEV(MV_MAX(salary_change))
```

Calculate the standard deviation of each employee’s maximum salary changes by first applying the `MV_MAX` function to determine the maximum salary change per row, and then using `STD_DEV` on the result.
