STDEV.S vs STDEV.P, with the exact formulas and a worked example
Quick answer: Use =STDEV.S(range) for a sample and =STDEV.P(range) for a whole population. For example, =STDEV.S(A2:A11) returns the sample standard deviation of the values in cells A2 through A11.
Excel has two main functions. STDEV.S calculates the sample standard deviation (dividing by n − 1) and is the right choice when your data is a sample from a larger population — the most common case. STDEV.P calculates the population standard deviation (dividing by n) and is used only when your data covers the entire group. The older STDEV and STDEVP functions still work and are equivalent to STDEV.S and STDEV.P respectively.
Suppose the values 5, 7, 3, 7, 8, 5, 9, 6, 4, 6 are in cells A2:A11.
Sample standard deviation: =STDEV.S(A2:A11) → about 1.83.
Population standard deviation: =STDEV.P(A2:A11) → about 1.73.
The mean, for reference: =AVERAGE(A2:A11) → 6.
The most frequent error is choosing the wrong function — using STDEV.P on sample data understates the spread. Other pitfalls: including header cells or blank cells in the range, letting text values silently drop out of the calculation, and confusing standard deviation with variance (use VAR.S or VAR.P for variance, which is the square of the standard deviation). Google Sheets uses the same function names, so these formulas work there too.
To verify a spreadsheet result, paste the same numbers into the standard deviation calculator, which reports both the sample and population values along with a step-by-step breakdown.
STDEV.S for a sample or STDEV.P for a full population.=STDEV.S(A2:A11), adjusting the range to your data.=AVERAGE(A2:A11) to see the mean alongside it.STDEV.S divides by n − 1 and is for samples; STDEV.P divides by n and is for an entire population.
Yes. The legacy STDEV function is equivalent to STDEV.S, and STDEVP is equivalent to STDEV.P.
Yes. Google Sheets supports the same STDEV.S and STDEV.P functions with identical syntax.