Going Stellar

Home/Google Sheets reference

Google Sheets function · Statistical

STDEV in Google Sheets: syntax and examples

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

ArgumentTypeRequiredWhat it does
value1rangeyesThe first number or range of the sample.
value2, ...rangenoMore numbers or ranges to include.

Examples

The examples use this table, starting in A1:

2444
5579
=STDEV(A1:D2)

Result: 2.138089935

Sample standard deviation of eight values.

Run in a Google Sheet (English US locale) on .

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

Result: 2.14

Rounded to two decimals for a report.

Run in a Google Sheet (English US locale) on .

=STDEV(2, 4, 9)

Result: 3.605551275

Plain numbers as arguments.

Run in a Google Sheet (English US locale) on .

=STDEV(A1:D1, A2:D2)

Result: 2.138089935

Two ranges are pooled into one sample.

Run in a Google Sheet (English US locale) on .

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

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.

Sources

  1. STDEV (Docs Editors Help)

Markdown version · All functions