> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# stddev,stddev_pop,std

> Returns the population standard deviation of the expr expression.

Returns the population standard deviation of the expr expression. Since v2.5.10, this function can also be used as a window function.

## Syntax

```Haskell theme={null}
STDDEV(expr)
```

## Parameters

`expr`: the expression. If it is a table column, it must evaluate to TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE, or DECIMAL.

## Return value

Returns a DOUBLE value. The formula is as follows, where `n` represents the row count of the table:

![image](https://mintcdn.com/mirrorship-docs/8FakUMFrFjmoxRt5/documents/images/e9abc96e61e7f8fbdf504e35.png?fit=max\&auto=format\&n=8FakUMFrFjmoxRt5\&q=85\&s=4e7a50472b1a43af049ce366548c79f1)

## Examples

```plaintext theme={null}
mysql> SELECT stddev(lo_quantity), stddev_pop(lo_quantity) from lineorder;
+---------------------+-------------------------+
| stddev(lo_quantity) | stddev_pop(lo_quantity) |
+---------------------+-------------------------+
|   14.43100708360797 |       14.43100708360797 |
+---------------------+-------------------------+
```

## See also

[stddev\_samp](/documents/4.2/sql-reference/sql-functions/aggregate-functions/stddev_samp.md)

## keyword

STDDEV,STDDEV\_POP,POP


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.