The standard error of the mean (SEM) is calculated as SEM = s / √n, where s is the sample standard deviation and n is the sample size. That one line is the whole formula. The rest of this guide shows you how to get s and n correctly, plug them in without rounding errors, and interpret the result so it actually means something.
What You'll Need
- Your raw sample data (a list of numbers), or the sample standard deviation and sample size if someone already computed them for you.
- A calculator with a square-root key, or a spreadsheet app such as Excel, Google Sheets, or Numbers.
- A way to tell whether your standard deviation was computed with n or n−1 in the denominator — this matters for small samples.
Step-by-Step
- Count your sample size. Tally how many valid observations you have. Call this n. Exclude blanks, text entries, and values you have deliberately removed as outliers — but note in your records what you excluded, because silently dropping data changes the answer.
- Compute the sample mean. Add all values and divide by n. In a spreadsheet,
=AVERAGE(range). You need the mean to compute the standard deviation in the next step, even though it does not appear in the SEM formula itself. - Compute the sample standard deviation. Use the sample version, which divides by n−1, not the population version. In Excel or Google Sheets,
=STDEV.S(range)gives the sample standard deviation;=STDEV.P(range)gives the population version and will understate your SEM. Call the sample value s. - Take the square root of n. On a calculator, enter n and press √. In a spreadsheet,
=SQRT(n). - Divide s by √n. In a spreadsheet with the data in cells A2:A51, the whole thing is
=STDEV.S(A2:A51)/SQRT(COUNT(A2:A51)). That single formula is the cleanest way to avoid transcription errors. - Round only at the end. Keep full precision through the calculation, then round the final SEM to two or three significant figures. Rounding s or √n early is the most common source of a wrong answer.
- Interpret it. The SEM estimates how much the sample mean would vary from sample to sample. A smaller SEM means your sample mean is a more precise estimate of the population mean. For a rough 95% confidence interval, use mean ± 1.96 × SEM for large samples; for small samples, use the t-distribution instead.
Common Mistakes
- Using the population standard deviation. Dividing by n instead of n−1 biases s downward, especially for small samples, and your SEM comes out too small.
- Confusing SEM with standard deviation. SD describes spread of individual values; SEM describes spread of the mean. SEM is always smaller than SD for n > 1.
- Dividing by n instead of √n. The formula is s/√n, not s/n. The two differ substantially.
- Mixing up the sample and the population. If your data is a sample from a larger group, use the sample formula. Using population formulas on sample data is a subtle but real error.
- Reporting SEM without stating n. The SEM is meaningless on its own; readers need to know the sample size to judge precision.
Tips
- Build the formula once in a spreadsheet and reuse it; that eliminates manual arithmetic slips.
- Double-check n after cleaning data — deleting a row changes both s and n.
- For very small samples (say, under 30), report the t-based confidence interval rather than 1.96 × SEM.
- If you only have the SD and n, you can compute SEM directly: SEM = SD / √n. No raw data needed.
- State the formula you used (sample vs. population) in your write-up so your numbers can be reproduced.
Troubleshooting
- Your spreadsheet returns an error. Usually a text value or blank in the range. Use
=STDEV.Sand=COUNTrather than=STDEV.Pand=COUNTA; the latter counts text and blanks. - SEM looks impossibly small. Check whether you used the population SD, divided by n instead of √n, or accidentally included a huge number of duplicate rows.
- SEM looks too large. Confirm you did not include outliers or units mismatched with the rest of the data (e.g., one value in seconds among values in minutes).
- Result differs from a colleague's. Compare which SD function each of you used, whether you cleaned data identically, and whether either of you rounded intermediate values.
- You only have a published SD and n. Use SEM = SD / √n directly; just confirm the published SD is the sample version.
Frequently Asked Questions
What is the difference between standard deviation and standard error?
Standard deviation measures how spread out individual observations are. Standard error measures how much the sample mean would vary across repeated samples. For the mean, SEM = s / √n.
Can the SEM be larger than the standard deviation?
No, not for n greater than 1, because you divide by √n, which is greater than 1. SEM is always smaller than the sample SD.
What sample size do I need for the SEM to be reliable?
The formula works at any n greater than 1, but the estimate becomes more stable as n grows. For small samples, use the t-distribution for confidence intervals rather than assuming normality.
Does the SEM formula use n or n−1?
The SEM formula itself uses n under the square root. The n−1 appears only in computing the sample standard deviation s. Both matter: use the sample SD and divide by √n.
How do I calculate SEM in Excel?
Use =STDEV.S(range)/SQRT(COUNT(range)). That single formula computes the sample SD and divides by the square root of the count.
Is the standard error the same as the margin of error?
No. The margin of error is typically a multiple of the SEM (for a 95% interval, about 1.96 × SEM for large samples). SEM is the base quantity; the margin of error adds the confidence multiplier.