How to calculate the standard error of the mean in Excel
Formula (Excel and Google Sheets)
=STDEV.S(B2:B9)/SQRT(COUNT(B2:B9))Divide the sample standard deviation by the square root of the count: =STDEV.S(B2:B9)/SQRT(COUNT(B2:B9)).
- Result on the example
- 0.660 in
E1 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in E1. Change any input and the result updates, or edit the formula to experiment.
How it works
The standard deviation (about 1.87 g) describes how much single samples vary. The standard error describes how precisely the average (500.7 g) is known, and it shrinks as you take more samples: dividing by the square root of 8 gives about 0.66 g.
=STDEV.S(B2:B9)/SQRT(COUNT(B2:B9))Result0.6600865744
B2:B98 rows × 1 col: 502.1, 498.7, 501.4, 499.9, …A range: 8 cells in one column.
STDEV.S(B2:B9)1.867006772STDEV: Sample standard deviation (same as STDEV.S).- number1
B2:B98 rows × 1 col: 502.1, 498.7, 501.4, 499.9, …
- number1
COUNT(B2:B9)8COUNT: Counts cells that contain numbers.- value1
B2:B98 rows × 1 col: 502.1, 498.7, 501.4, 499.9, …
- value1
SQRT(COUNT(B2:B9))2.828427125SQRT: Square root.- number
COUNT(B2:B9)8
- number
STDEV.S(B2:B9)/SQRT(COUNT(B2:B9))0.6600865744The / operator divides.
In Google Sheets
The same formula works in Google Sheets: =STDEV.S(B2:B9)/SQRT(COUNT(B2:B9)). We ran it in Google Sheets mode on the same data and it returns 0.660.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =SQRT(VAR.S(B2:B9)/COUNT(B2:B9)) | 0.660 | The same value from the variance. |
Common mistakes
- Using COUNTA counts text and labels, and ROWS counts blanks. COUNT counts only the numbers that STDEV.S used.
- STDEV.P in place of STDEV.S understates the standard error for a sample.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Calculate the standard error of the mean
E1, calculate the standard error of the mean fill weight for the samples in B2:B9.Questions
How do I calculate a 95% confidence interval?
For larger samples use the mean ± 1.96 × SE; for small samples, =CONFIDENCE.T(0.05,STDEV.S(B2:B9),COUNT(B2:B9)) gives the margin.
Is there a STDERR function?
Not for the mean. STEYX is the standard error of a regression prediction, which is different.
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.