Quick Answer

STDEV Function

Sample standard deviation (n-1) of a set of numbers.

✓ Excel✓ Google SheetsExcel All versions

Syntax

STDEV
(number1, [number2], ...)

Parameters

ParameterDescriptionRequired
number1The first number, range, or reference in the sample.Required
number2Additional numbers, ranges, or references (optional, up to 255 total arguments).Optional

Basic Example

Sample standard deviation of five values

=STDEV(10,20,30,40,50)
Result15.8113883

The mean is 30; the sample variance is 250 (sum of squared deviations 1000 divided by 5-1) and its square root is 15.8113883.

Advanced Examples

Example 1: Sample from a range

Measuring spread of a production sample

Compute the standard deviation of weights recorded in A2:A11

=STDEV(A2:A11)
Result: Sample standard deviation of the 10 values
Uses the 10 sampled values with n-1 (that is, 9) in the denominator.

Example 2: Sample vs population

Comparing denominators

Same data, two different denominators

=STDEV(10,20,30,40,50) and =STDEVP(10,20,30,40,50)
Result: 15.8113883 and 14.14213562
STDEV divides by 4 (n-1) while STDEVP divides by 5 (n), so the population version is smaller.

How STDEV Works

STDEV computes the sample variance as the sum of squared deviations from the mean divided by (n-1), then takes the square root. The n-1 divisor (Bessel's correction) produces an unbiased estimate of the population standard deviation when only a sample is available. Text and logical values contained in ranged references are ignored.

1
Select sample
Gather the numeric sample values in cells or as arguments.
2
Enter formula
Type =STDEV(range or values).
3
Press Enter
The sample standard deviation is displayed.

Important Notes & Limitations

  • Assumes the data is a sample, not the entire population; use STDEVP for a whole population.

  • Ignores text and logical values inside ranged references, so the count of values may be smaller than the cell count.

  • Requires at least two numeric values, otherwise it returns #DIV/0!.

Common Errors & Fixes

#DIV/0!Fewer than two numeric values were supplied.

Fix: Provide at least two data points.

Result smaller than expectedThe data actually represents the full population but n-1 was used.

Fix: Use STDEVP (or STDEV.P) when you have the entire population.

Download Practice File

Practice STDEV with Real Data

Download a sample CSV file with pre-populated data and practice exercises for the STDEV function. Works in both Excel and Google Sheets.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Frequently Asked Questions

What is the difference between STDEV and STDEVP?
STDEV divides by n-1 (sample), STDEVP divides by n (population).
Is STDEV the same as STDEV.S?
Functionally yes; STDEV.S is the modern replacement for the legacy STDEV function.
Does STDEV include text in cells?
No. Use STDEVA if you want text counted as 0 and TRUE counted as 1.