How to Calculate Standard Error in Excel: Formula and Examples

shape
shape
shape
shape
shape
shape
shape
shape
How to Calculate Standard Error in Excel: Formula and Examples - featured image

The standard error tells you how much a sample average is likely to differ from the true average of the whole population. It is one of the most useful numbers in statistics, because it shows how reliable your average is. Excel has no single function called standard error, but you can calculate it in one formula by dividing the sample standard deviation by the square root of the number of values. This guide explains what the standard error means, how it differs from the standard deviation, gives the formula and a worked example with five numbers, shows how sample size changes the result, covers the standard error of a proportion, and lists the common mistakes with ready to copy formulas.

Updated November 2026

In this guide

  1. What is the standard error?
  2. Standard error versus standard deviation
  3. The formula
  4. Worked example with five numbers
  5. Step by step in Excel
  6. Sample or population standard deviation?
  7. How sample size changes the standard error
  8. Using a formula for the standard error of a range
  9. Standard error of a proportion
  10. Use the standard error for a confidence interval
  11. Show the standard error as error bars
  12. Data Analysis ToolPak
  13. Common mistakes
  14. Practice problems
  15. Quick recap
  16. Real-world examples

What is the standard error?

If you took many samples from the same population and calculated the average of each one, the averages would vary a little. The standard error of the mean is the standard deviation of those averages. A small standard error means that the sample average is probably close to the true average. A large one means that the estimate is less certain. It is used to build confidence intervals and to run tests such as the t-test.

Standard error versus standard deviation

These two terms are often confused. The standard deviation describes how spread out the individual values are in your data. The standard error describes how precise the sample average is. The standard error is always smaller than the standard deviation for a sample with more than one value, because it is the standard deviation divided by the square root of n. Add more data and the standard deviation stays about the same, while the standard error gets smaller. Our standard deviation guide covers the first measure in detail.

The formula

The standard error of the mean is SE = s / √n, where s is the sample standard deviation and n is the number of values. In Excel, with data in A2:A6, the formula is =STDEV.S(A2:A6)/SQRT(COUNT(A2:A6)). STDEV.S is used because you are working with a sample. COUNT gives the number of numeric values, and SQRT takes the square root.

Worked example with five numbers

Take the values 4, 8, 6, 5 and 7. The mean is 30 divided by 5, which is 6. The deviations from the mean are minus 2, 2, 0, minus 1 and 1. Their squares are 4, 4, 0, 1 and 1, which add up to 10. The sample variance is 10 divided by 4, which is 2.5, and the sample standard deviation is the square root of 2.5, which is 1.5811. The standard error is 1.5811 divided by the square root of 5, which is 1.5811 divided by 2.2361, so 0.7071. In Excel, =STDEV.S(A2:A6)/SQRT(COUNT(A2:A6)) returns 0.7071.

Step by step in Excel

Enter the five values in cells A2 to A6. In B1 type =AVERAGE(A2:A6) to get the mean of 6. In B2 type =STDEV.S(A2:A6) to get 1.5811. In B3 type =COUNT(A2:A6) to get 5. In B4 type =B2/SQRT(B3) to get 0.7071. Putting each step in its own cell makes the work easy to check and to explain to a client or a teacher. You can then report the result as 6 plus or minus 0.71.

Sample or population standard deviation?

For the standard error of a sample mean, use STDEV.S, which divides by n minus 1. STDEV.P divides by n and is for the case where you have the entire population. For the same five values, STDEV.P gives 1.4142, and the result divided by the square root of 5 gives 0.6325, which is smaller than the correct 0.7071. Using the population version for a sample therefore understates the error.

How sample size changes the standard error

Suppose the standard deviation is 15. With 25 values the standard error is 15 divided by 5, which is 3. With 64 values it is 15 divided by 8, which is 1.875. With 100 values it is 1.5, and with 400 values it is 0.75.

Sample size (n)Standard deviationStandard error
25153
64151.875
100151.5
400150.75

To cut the standard error in half, you need four times as many observations. This is why very large samples give only small gains in precision.

Using a formula for the standard error of a range

You can write one formula that works on any range and fills down for many columns. For data in columns B to F, put =STDEV.S(B2:B100)/SQRT(COUNT(B2:B100)) in the first column and copy it to the right. COUNT ignores blank cells and text, so the result stays correct when some rows are empty. If you use COUNTA, the count includes text cells, and the answer will be wrong. Our COUNTIF guide shows other ways to count with conditions.

Standard error of a proportion

When your data is a share, such as the percentage of customers who answered yes, the formula is the square root of p times 1 minus p, divided by n. For p equal to 0.4 and n equal to 200, the standard error is the square root of 0.24 divided by 200, which is the square root of 0.0012, or 0.0346. In Excel, =SQRT(0.4*0.6/200) returns 0.0346. A 95 percent margin is about 1.96 times this, or 6.8 percentage points.

Use the standard error for a confidence interval

The standard error is the base of the confidence interval. The 95 percent margin for a large sample is 1.96 times the standard error. With a mean of 6 and a standard error of 0.7071, the normal margin would be 1.386, but for only five values you should use the t value of 2.776, so the margin is 1.963 and the interval is 4.04 to 7.96. See our confidence interval guide for the full method.

Show the standard error as error bars

In a column chart of group averages, you can show the standard error as error bars. Click the chart, choose Chart Elements, Error Bars, More Options, then Custom, and select the cells that hold the standard errors. The bars show how reliable each average is. If the bars of two groups do not overlap, the difference is likely to be real. This is a clear way to present results to people who do not want to read a table of statistics.

Data Analysis ToolPak

The Analysis ToolPak can produce the standard error with other statistics. Enable it from Options, Add-ins, and then choose Data Analysis, Descriptive Statistics. Tick Summary statistics and Excel returns the mean, the standard error, the median, the mode, the standard deviation, the variance and more in one table. The standard error in this table is the same as the one from the formula, so it is a good way to check your work.

Common mistakes

The first mistake is to report the standard deviation when the standard error is needed, or the other way around. The second is to use STDEV.P for a sample. The third is to divide by n and not by the square root of n. The fourth is to use COUNTA, which counts text cells, in place of COUNT. The fifth is to forget that the standard error assumes random sampling, so a biased sample gives a misleading result even with a small error. The sixth is to apply the formula to very small samples without a t value.

Practice problems

Try these. Problem 1: a sample of 36 values with a standard deviation of 12 has a standard error of 2. Problem 2: a sample of 81 values with a standard deviation of 18 has a standard error of 2. Problem 3: how many values do you need to get a standard error of 1 when the standard deviation is 15? The answer is 15 squared, which is 225. Problem 4: find the standard error of 10, 12, 14 and 16 by hand and check it with Excel.

Quick recap

The standard error of the mean equals the sample standard deviation divided by the square root of n. In Excel use =STDEV.S(range)/SQRT(COUNT(range)). It gets smaller as the sample gets larger, it is not the same as the standard deviation, and it is the base for confidence intervals and tests. For a proportion use the square root of p times 1 minus p, divided by n. Always use the sample version of the standard deviation for a sample.

Real-world examples

A teacher who tests 30 students can report the average score with its standard error to show how much the class average could change with another group. A factory that measures the weight of 50 packs can use the standard error to decide whether the machine is on target. A marketer who runs a survey can report the percentage of satisfied customers with its standard error. In each case, the standard error turns a single number into an honest estimate, which builds trust in the report that you deliver.

Frequently asked questions

How do I calculate standard error in Excel?

Use =STDEV.S(range)/SQRT(COUNT(range)).

Is there a standard error function in Excel?

No, but you can build it from STDEV.S, COUNT and SQRT, or use the Data Analysis ToolPak.

What is the difference between standard error and standard deviation?

Standard deviation describes the spread of the data, while standard error describes the precision of the mean.

Should I use STDEV.S or STDEV.P?

Use STDEV.S for a sample.

How can I reduce the standard error?

Increase the sample size.

Related guides and free tools

Leave a Reply

Your email address will not be published. Required fields are marked *