How to Calculate Standard Error in Excel
(SEM Formula)
The standard error of the mean (SEM) tells you how precisely a sample mean estimates the true population mean. To calculate it, divide the sample standard deviation by the square root of the sample size: SE = s / √n.
In Excel, that’s one formula:
=STDEV.S(B3:B10)/SQRT(COUNT(B3:B10))
Replace B3:B10 with the range that holds your sample data. Here’s the quick version:
- Calculate the sample standard deviation with STDEV.S.
- Count the values with COUNT and take the square root with SQRT.
- Divide the standard deviation by that square root.
Below, I’ll walk you through it step by step. You’ll also learn the difference between standard error and standard deviation, when to use STDEV.S or STDEV.P, how to report the result and how to add standard error bars to a chart 🧮
Get your free practice workbook for this guide and follow along.
What is standard error?
The standard error (SE) is a measure of how much a sample statistic varies from one sample to the next. Most of the time, people mean the standard error of the mean (SEM): how far your sample mean is likely to be from the true population mean.
A small standard error means the sample mean is a precise estimate of the population mean. A large standard error means it’s less precise 📨
Standard error formula
The formula for the standard error of the mean is:
In words:
Here, s is the standard deviation of the sample and n is the number of values in the sample (the sample size). So you calculate the standard deviation of the sample and divide it by the square root of the sample size.
If you already know the standard deviation, that’s all you need. For example, a standard deviation of 10 with 25 values gives a standard error of 10 / √25 = 10 / 5 = 2.
Why is standard error important?
You rarely have data for an entire population. Instead, you take a sample and use it to draw conclusions about the population.
Say you want the average height of men in a town. You can’t measure every man, so you measure a sample of them 📝
But the sample might not be an actual representation of the entire population. Your sample mean might come out at 5.7 feet, while the true population mean is a bit different. Another sample would give yet another mean.
The standard error tells you how much those sample means typically vary. In other words, how much you can rely on your sample mean as an estimate of the population mean.
How to calculate standard error in Excel
Excel doesn’t have a single built-in function for the standard error of the mean. But it has a function for every part of the formula, so it only takes a minute 💻
Here I have a sample of the heights of men from Town XYZ.

The population is every man in the town. We only have heights for 8 of them, so this is sample data.
To calculate the standard error for these heights:
Step 1) Type the STDEV.S function:

Step 2) Select the cell range that contains the sample data and close the parenthesis:

The standard deviation of the sample is 0.432.
Step 3) Count the values in the sample with the COUNT function:

This gives us the sample size (the n in the formula), which is 8. COUNT only counts cells that contain numbers, so empty cells and text labels in the range don’t change n.
Step 4) Take the square root of n with the SQRT function:

Now we have all the pieces.
Step 5) Divide the standard deviation by the square root of n:

And there you have it: a standard error of 0.15.
Once you understand the steps, you can skip the helper cells and calculate the standard error in a single formula ⏭

That’s the formula to copy into your own workbook. Just change B3:B10 to your own data range.
Standard error vs standard deviation
They’re easy to mix up, but they answer different questions:
- Standard deviation (STDEV.S) measures how spread out the individual values are. In our example, individual heights vary by about 0.43 feet around the mean.
- Standard error (standard deviation / √n) measures how precise the sample mean is. In our example, the mean of the 8 heights is likely to be off by about 0.15 feet.
With more than one value, the standard error is always smaller than the standard deviation, and it keeps shrinking as you add more data. The standard deviation doesn’t shrink just because you collect more data. It settles around the true spread in the population.
Use the standard deviation to describe your data. Use the standard error when you talk about how precise an average is, for example in error bars on a chart of means or in a confidence interval.
Here’s my full guide on how to calculate standard deviation in Excel.
STDEV.S or STDEV.P for standard error?
Use STDEV.S in the standard error formula. You calculate a standard error because you have a sample and want to say something about the population. STDEV.S treats your data as a sample and uses the “n-1” method.
STDEV.P treats your data as the entire population and uses the “n” method. If you really have the whole population, there’s no sampling error to estimate in the first place.
For large samples, the two return almost the same result. For small samples like ours, STDEV.P returns a smaller value (0.404 instead of 0.432), which makes the standard error look smaller than it should.
You may also see older formulas with STDEV (without .S). It also treats the data as a sample and is still available for compatibility with older versions of Excel, but Microsoft suggests the newer STDEV.S.
How to interpret and report standard error
A standard error on its own is hard to read. You need it next to the mean 💭
So what does a standard error of 0.15 mean? First, find the mean of the sample dataset.
Step 1) Use the AVERAGE function to find the mean of the sample:

The mean height in our sample is 5.76 feet.
To report it, write the mean together with the standard error: 5.76 ± 0.15 feet (mean ± SE).
That tells the reader that the sample mean is 5.76 feet, and that the mean of a sample this size typically varies by about 0.15 feet from the true population mean 🙌
Always say that the number after ± is the standard error and not the standard deviation, so readers know which one you report.
How to add standard error bars to a chart
To show the standard error on an Excel chart:
- Click anywhere in the chart.
- Click the Chart Elements button (the plus sign) next to the chart and check Error Bars.
- Click the arrow next to Error Bars and choose Standard Error.
Be careful with the built-in Standard Error option. Excel calculates one error amount from the plotted values, so every point in the series gets the same error bar.
If each bar shows the mean of its own sample (for example, one mean per group), calculate the standard error of each group with the formula above. Then click the arrow next to Error Bars, choose More Options, select Custom and click Specify Value. Select the cells with your standard errors as both the positive and the negative error values.
Here’s my full tutorial on error bars in Excel.
Conclusion
You now know how to calculate the standard error of the mean in Excel, step by step and in a single formula, and how to report it next to the mean.
Standard error goes hand in hand with other statistics in Excel. Keep going with these tutorials:
Frequently asked questions
How do I calculate the standard error of the mean in Excel?
Use =STDEV.S(range)/SQRT(COUNT(range)), for example =STDEV.S(B3:B10)/SQRT(COUNT(B3:B10)). STDEV.S returns the sample standard deviation, COUNT returns the sample size and SQRT takes its square root.
Is there a standard error function in Excel?
Not for the standard error of the mean. You combine STDEV.S, SQRT and COUNT as shown above. Excel’s STEYX function returns the standard error of the predicted y-value in a regression, which is a different statistic.
How do I calculate standard error from standard deviation?
Divide the standard deviation by the square root of the sample size. If the standard deviation is in B12 and you have 8 values, use =B12/SQRT(8).
How do I calculate standard error by hand?
Find the mean of your values. Subtract the mean from each value, square the differences and add them up. Divide that sum by n minus 1 and take the square root to get the sample standard deviation. Finally, divide the standard deviation by the square root of n.
What does the standard error tell you?
The standard error tells you how precise your sample mean is as an estimate of the population mean. A smaller standard error means a more precise estimate. Report it next to the mean, like 5.76 ± 0.15.
Should I use STDEV.S or STDEV.P to calculate standard error?
Use STDEV.S. The standard error is about estimating a population from a sample, and STDEV.S is the sample standard deviation. STDEV.P assumes you already have the entire population.
