How To Calculate Standard Error in Excel
Dec 17, 2024
Do you want to calculate standard error in Excel?
Standard error is a fundamental statistical concept often used in research, data analysis, and decision-making. Excel, being the powerhouse tool it is, makes this process surprisingly simple if you know where to look. This post will break down what standard error means, why it’s important, and how to calculate it step-by-step in Excel.
Quick answer
Excel has no built-in standard error function. Calculate it with one formula: =STDEV.S(range)/SQRT(COUNT(range)). That divides the sample standard deviation by the square root of the sample size. For the data 10, 12, 15, 20, 25 the standard error is 2.73. The same formula gives you SEM, the standard error of the mean.
Last updated: August 20, 2026
Get our free Excel formulas cheat sheet
Plus new tutorials and template drops. Enter your email and we'll send it over.
Table of Contents
- What is standard error in Excel?
- Why does standard error matter?
- How to calculate standard error in Excel
- Should you use STDEV.S or STDEV.P?
- Is standard error the same as SEM?
- Why is your standard error formula not working?
- Using Excel's Data Analysis Toolpak
- Adding standard error bars to charts
- Frequently asked questions
What Is Standard Error in Excel?
Standard Error (SE) measures the precision of a sample mean as an estimate of the population mean. In simple terms, it shows how much the sample mean is likely to vary from the true population mean.
The formula for standard error is:
SE = s ÷ √n
In words, the standard error is the sample standard deviation divided by the square root of the sample size.
Where:
- s is the sample standard deviation, which Excel gives you with
=STDEV.S(range) - n is the sample size, which Excel gives you with
=COUNT(range) - √n is the square root of the sample size, which Excel gives you with
=SQRT()
If you happen to know the standard deviation of the whole population rather than a sample, the same structure applies using the population figure, written σ ÷ √n. In practice you almost always have a sample, so s is what you want.
The smaller the standard error, the more reliable the sample mean is as an estimate of the population mean. Additionally, it is crucial to distinguish standard error from standard deviation. While standard deviation measures data variability, standard error measures the accuracy of the mean.
The rule: standard error always falls as the sample grows, because n sits under a square root in the denominator. Quadrupling your sample size halves the standard error.
The Importance of Standard Error
To put it simply, the standard error calculation is important because it helps you judge the confidence and precision of your results. See its importance in detail below:
-
Measures accuracy: It shows how accurate a sample mean is in estimating the actual population mean.
-
Indicates variability: A smaller standard error means more reliable results, while a larger one indicates greater variability.
-
Supports confidence: It’s crucial for calculating confidence intervals, which help determine the range within which the true mean lies.
-
Guides decision-making: In research and business, precise standard error values ensure informed and trustworthy decisions.
-
Essential for comparisons: It allows you to compare sample means across groups or experiments to see if differences are significant.
How To Calculate Standard Error in Excel
Microsoft Excel doesn’t have a built-in function specifically for standard error, but there's a way to go about it. You can calculate the standard error of your sample data easily using the following steps:
1. Calculate the sample standard deviation.
Click on an empty cell where you want the result. Type the formula =STDEV.S(range), replacing range with the cells containing your data set. Excel will return the sample standard deviation, which measures the spread of your data points.
2. Determine the sample size.
Click on another empty cell. Type the formula =COUNT(range), again replacing range with the same set of data cells. This will give you the total number of data points in your sample.
3. Combine both to calculate the standard error.
In a new cell, divide the first result by the square root of the second. If your standard deviation is in B1 and your sample size is in B2, the formula is:
=B1/SQRT(B2)
Press Enter. Excel will return the standard error of your sample data. You can also skip the two helper cells entirely and put the whole thing in one formula: =STDEV.S(range)/SQRT(COUNT(range)).
Example.
Let’s assume you have the following dataset: 10, 12, 15, 20, 25.
Here’s how you calculate the standard error:
-
Enter the data into Excel (e.g., in cells A1:A5).

-
In a blank cell, calculate the standard deviation with the formula: =STDEV.S(A1:A5)
Output: 6.11

-
In another cell, calculate the sample size: =COUNT(A1:A5)
Output: 5

-
Finally, calculate the standard error: =STDEV.S(A1:A5)/SQRT(COUNT(A1:A5))
Output: 2.73
This is your standard error for the sample data.

You can check the arithmetic by hand. The mean of those five numbers is 16.4, the sample standard deviation is 6.107, and 6.107 divided by the square root of 5 is 2.731.
Should you use STDEV.S or STDEV.P?
This is the question that most often produces a slightly wrong answer, because both functions run without complaint.
=STDEV.S(range)treats your numbers as a sample drawn from a larger group. It divides by n minus 1.=STDEV.P(range)treats your numbers as the entire population. It divides by n.
Standard error is a statement about how well a sample estimates a population, so if you are calculating standard error at all, you have a sample. Use STDEV.S.
Using STDEV.P on sample data returns a number that is slightly too small, and the gap widens the smaller your sample is. On five data points the difference is around 11 per cent, which is enough to change a conclusion.
The older =STDEV() function still works and behaves the same as STDEV.S. It is kept for backwards compatibility, and STDEV.S is the current name.
Is standard error the same as SEM?
Yes. SEM stands for standard error of the mean, and it is exactly the quantity this page calculates. The formula is identical:
=STDEV.S(range)/SQRT(COUNT(range))
The abbreviation turns up most often in lab reports, dissertations and journal figure captions, where results are written as "mean ± SEM". If your assignment, template or supervisor asks for SEM, that formula is what they want. There is no separate SEM function to look for.
Three distinctions are worth keeping straight, because they are the ones that get marked wrong:
| Measure | What it tells you | Excel formula |
|---|---|---|
| Standard deviation (sample) | How spread out the individual values are. | =STDEV.S(range) |
| Standard deviation (population) | The same spread, when your data is the entire population rather than a sample. | =STDEV.P(range) |
| Standard error, also called SEM or standard error of the mean | How precisely your sample mean estimates the population mean. | =STDEV.S(range)/SQRT(COUNT(range)) |
| Standard error of the estimate | A different statistic entirely. It measures how far actual values fall from a regression line. | =STEYX(known_ys, known_xs) |
The rule: mean ± SD describes how spread out your data is. Mean ± SEM describes how confident you are about where the mean sits. SEM is always the smaller of the two, and unlike SD it keeps shrinking as you collect more data.
Why is your standard error formula not working?
| Symptom | Cause | Fix |
|---|---|---|
#DIV/0! |
COUNT returned 0, so you are dividing by the square root of zero. The range holds no numbers. | Run =COUNT(range) on its own. If it returns 0 but the cells look full, the values are stored as text. |
| The answer is slightly smaller than expected | You used STDEV.P on sample data. | Switch to STDEV.S. See the section above. |
| Some values are silently ignored | Numbers stored as text. Both STDEV.S and COUNT skip them without warning. | Compare =COUNT(range) with =COUNTA(range). If the two differ, some cells are text. Convert them with Text to Columns. |
#DIV/0! with exactly one data point |
STDEV.S divides by n minus 1, which is zero when n is 1. | Standard error is undefined for a single observation. You need at least two. |
| The result does not update when you add rows | The range is fixed and stops above your new data. | Select the data and press Ctrl + T to make it an Excel Table, then reference the table column. It expands on its own. |
#VALUE! |
A cell inside the range holds an error value, which propagates. | Find the offending cell and fix it at source rather than hiding it with IFERROR, which would change your n. |
Using Excel’s Data Analysis Toolpak
Excel’s Data Analysis Toolpak can also calculate the standard error along with other descriptive statistics. Here’s how to use it:
-
Go to File > Options > Add-Ins and enable the “Analysis Toolpak.”
-
Under the “Data” tab, click Data Analysis > Descriptive Statistics.
-
Select your data range and check the “Summary statistics” box.
-
Excel will display the standard error along with the mean, standard deviation, and more.
The Toolpak labels the figure Standard Error in its output block, and it is the same sample-based calculation as the formula above. The difference is that the Toolpak writes a static value, so it will not recalculate when your data changes. Use the formula if the numbers are still moving, and the Toolpak if you want a one-off summary of everything at once.
Adding Standard Error Bars to Charts in Excel
Standard error bars visually represent variability in your data and are particularly useful when presenting data in reports. Here’s how you can add them:
-
Create a chart (e.g., column chart) with your data.
-
Click on the chart to activate it, then click on Chart Elements (the “+” sign).
-
Select Error Bars > More Options.
-
Choose Custom Error Bars and enter your standard error values in the dialog box.
Excel also offers a built-in Standard Error option in that menu. Be careful with it: it calculates the standard error of the plotted series itself, which is not the same as the per-group standard error you have calculated for each bar. For figure captions that read "mean ± SEM", use Custom and point it at your own SEM cells.
Final Thoughts
By following this guide, you’ll be equipped to confidently compute and interpret the standard error. Here’s a quick recap:
-
Use =STDEV.S(range) for standard deviation, not STDEV.P
-
Use =COUNT(range) for sample size
-
Combine both using =STDEV.S(range)/SQRT(COUNT(range))
-
That same formula is SEM, the standard error of the mean
Now, grab your data, fire up Excel, and start calculating!
Visit Simple Sheets for more easy-to-follow guides and examples, and remember to read the related articles section of this blog post.
For the most straightforward Excel video tutorials, subscribe to Simple Sheets on YouTube!
FAQ
1. What is the difference between standard error and standard deviation?
Standard deviation measures the variability of individual data points, while standard error measures how precise the sample mean is as an estimate of the population mean. Standard error decreases as the sample size increases.
2. Does Excel have a direct function for standard error?
No, Excel doesn’t have a built-in function for standard error, but you can calculate it using =STDEV.S(range)/SQRT(COUNT(range)). This combines the standard deviation and sample size into one formula.
3. When should I use standard error in data analysis?
Use standard error to estimate the accuracy of a sample mean or build confidence intervals around the mean. It’s particularly helpful in research, finance, and any field relying on inferential statistics.
4. How do you calculate SEM in Excel?
SEM stands for standard error of the mean, and it is the same figure as standard error. Use =STDEV.S(range)/SQRT(COUNT(range)). There is no separate SEM function in Excel.
5. Should I use STDEV.S or STDEV.P for standard error?
STDEV.S. It treats your numbers as a sample drawn from a larger population, which is the assumption standard error is built on. STDEV.P treats the data as the entire population and returns a slightly smaller figure.
6. What is the standard error formula?
Standard error is the sample standard deviation divided by the square root of the sample size, written SE = s divided by the square root of n. In Excel that is =STDEV.S(range)/SQRT(COUNT(range)).
Related Articles
How to Add Error Bars in Excel
Want to Make Excel Work for You? Try out 5 Amazing Excel Templates & 5 Unique Lessons
We hate SPAM. We will never sell your information, for any reason.
