---
schema_version: "1"
id: 6ed2028d42980dbcce51b27c9074241e96c0c4e0141f266dce295f8d1f26ef84
title: stddev()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/concept/bi-saql-fn-agg-stdev.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-fn-agg-stdev.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7250a8efc75d331982678aa0aa296cfaa28a79048b6427b7aa7855c84149d9de
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# stddev()

Returns the standard deviation of the values in a field. Accepts measure fields (but not expressions) as input.

## Example - Look at Variability in Amount

Use `stddev()` to get a feel for the amount of spread, or dispersion, in the size of your deals.

```nolang
q = load "DTCOpps";
q = group q by all;
q = foreach q generate stddev('Amount') as 'stddev_Amount';
```

## Should I Use stddev() or stddevp()?

Use `stddev()` when the values in your field are a partial sample of the entire set of values (that is, a partial sampling of the whole population). Use `stddevp()` when your field contains the complete set of values (that is, the entire population of values).

**See Also**

- [stddevp()](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-fn-agg-stdevp.md)
