# STDEV in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/stdev/

STDEV measures how far values spread around their mean, treating the data as a sample of a larger population. It divides by n-1, which is why it needs at least two numbers.

## Syntax

```
STDEV(value1, [value2, ...])
```

## Arguments

- `value1` (range, required: yes): The first number or range of the sample.
- `value2, ...` (range, required: no): More numbers or ranges to include.

## Examples

The examples use this table, starting in A1:

| 2 | 4 | 4 | 4 |
|---|---|---|---|
| 5 | 5 | 7 | 9 |

```
=STDEV(A1:D2)
```

Result: `2.138089935`

Sample standard deviation of eight values. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ROUND(STDEV(A1:D2), 2)
```

Result: `2.14`

Rounded to two decimals for a report. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=STDEV(2, 4, 9)
```

Result: `3.605551275`

Plain numbers as arguments. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=STDEV(A1:D1, A2:D2)
```

Result: `2.138089935`

Two ranges are pooled into one sample. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=STDEV(A1:D2) / AVERAGE(A1:D2)
```

Result: `0.4276179871`

Coefficient of variation: spread relative to the mean. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- With a single number STDEV returns #DIV/0!. A sample needs at least two values.
- STDEV treats the data as a sample (divides by n-1). If the range is the whole population, use STDEVP: the two results differ.
- Text typed directly as an argument returns #VALUE!, while text inside a range is ignored.
- STDEV is the older name. STDEV.S gives the same result and states the intent more clearly.

## Compared with Excel

Same syntax in Excel.

## Related functions

- [AVERAGE](https://goingstellar.ro/reference/sheets/average/)
- [MEDIAN](https://goingstellar.ro/reference/sheets/median/)
- [PERCENTILE](https://goingstellar.ro/reference/sheets/percentile/)

## Sources

- [STDEV (Docs Editors Help)](https://support.google.com/docs/answer/3094054)

