What STDEV.S does
STDEV.S estimates how spread out values are around their mean when your observations are a sample of a larger population. Use it, for example, when you time a few orders to estimate variation in packing times across all orders.
The result uses the same units as your data. STDEV.S divides the sum of squared differences from the mean by n − 1, then takes the square root. Here, n is the number of numeric observations.
Practical examples
Measure variation in sampled packing times
Enter these four sampled packing times in A2:A5:
| Cell | Minutes |
|---|---|
| A2 | 2 |
| A3 | 4 |
| A4 | 6 |
| A5 | 8 |
In C2, enter:
=STDEV.S(A2:A5)FormulaThe result is approximately 2.581988897 minutes. The mean is 5, and the squared differences total 20. Dividing 20 by 3 and taking the square root gives the sample standard deviation.
Compare a second sample
Suppose a second sample of packing times contains 1, 2, 3, and 4 minutes, entered in B2:B5 respectively. In D2, enter:
=STDEV.S(B2:B5)FormulaThe result is approximately 1.290994449 minutes. These values have a mean of 2.5 and squared differences totaling 5, so the calculation is the square root of 5 ÷ 3. This sample has less spread than the first one.
Common mistakes and notes
Choose the function for the group you're describing
Use STDEV.P when your values cover the entire population you want to describe. Having every row from an export doesn't settle the choice: those rows may still be a sample of a larger group. See standard deviation in Excel for the two calculations on the same data.
Check which values count
In a referenced range, STDEV.S ignores empty cells, text, numbers stored as text, and logical values. Zero counts. Use COUNT to check how many numeric cells your range contains. You need at least two numeric observations for a sample standard deviation; fewer produce #DIV/0!.
Direct arguments behave differently: =STDEV.S(2,4,"8") counts the quoted 8, and =STDEV.S(2,4,TRUE) counts TRUE as 1. Text that cannot be converted to a number causes an error. If you need to include text and logical values from references, investigate STDEVA's counting rules before substituting it.
Fix source errors before interpreting the result
A documented Excel for Mac check returned #N/A when a referenced range contained =NA(). Don't assume STDEV.S will skip an error cell. Inspect the source error; replacing it with zero changes the observations.
The Microsoft reference currently says errors in arrays or references are ignored, which conflicts with that observed result. The error-propagation note here is based on the Excel check, not that documentation wording.