# How to calculate the standard error of the mean in Excel

Divide the sample standard deviation by the square root of the count: `=STDEV.S(B2:B9)/SQRT(COUNT(B2:B9))`.

**Excel:** `=STDEV.S(B2:B9)/SQRT(COUNT(B2:B9))` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D |
| --- | --- | --- | --- |
| Sample | Fill weight (g) |  | Standard error |
| 1 | 502.1 |  |  |
| 2 | 498.7 |  |  |
| 3 | 501.4 |  |  |
| 4 | 499.9 |  |  |
| 5 | 503.2 |  |  |
| 6 | 497.6 |  |  |
| 7 | 500.8 |  |  |
| 8 | 501.9 |  |  |

Formula in E1: `=STDEV.S(B2:B9)/SQRT(COUNT(B2:B9))`

Result: 0.660

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

## Other ways

- `=SQRT(VAR.S(B2:B9)/COUNT(B2:B9))`: 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.

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

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/standard-error-of-the-mean
