To find the standard error of the mean in Excel, divide the sample standard deviation by the square root of the number of observations. If your numeric observations are in B2:B11, enter =STDEV.S(B2:B11)/SQRT(COUNT(B2:B11)) in an empty cell. The result estimates how much the sample mean would vary across repeated samples of the same size.
This guide uses Excel for Microsoft 365 on Windows. The formulas also work in current Excel for Mac and Excel for the web. You will need a set of numeric observations and a clear understanding of which cells contain them.
What You’ll Need
- A worksheet containing the observations you want to analyze, with each observation in its own cell.
- An empty cell for the standard error result.
- A decision about whether your observations are a sample or the entire population. For the usual standard error of a mean estimated from sample data, use the sample standard deviation.
Step-by-Step
- Arrange the observations in one column or row. Put one measured value in each cell, without including the column heading in the calculation. For example, enter five observations in B2:B6 and label B1 as Score. A single continuous range is easier to check than scattered cells. Keep other variables, notes, and totals in separate columns so they cannot accidentally become part of the calculation.
- Check what the values represent. The standard error of the mean describes uncertainty in an estimated mean, not the spread of individual observations. If the values are a sample taken from a larger group, the usual calculation uses the sample standard deviation, which Excel calculates with STDEV.S. If you have the whole group of interest, consider whether a sampling standard error is meaningful for your question; do not switch to STDEV.P just because the data looks complete without first defining the population and purpose.
- Count the numeric observations. COUNT includes numeric cells and ignores blank cells and text. For five observations in B2:B6, the count is five. Excel uses this count as the sample size, so confirm that the selected range includes all and only the observations you intend to analyze. A zero is a numeric observation and is counted; it is not treated as a blank.
- Enter the standard error formula. With the five sample observations in B2:B6, click an empty cell such as C2 and enter
=STDEV.S(B2:B6)/SQRT(COUNT(B2:B6)). Press Enter. STDEV.S estimates the sample standard deviation, COUNT finds the number of numeric values, and SQRT takes the square root of that count. Dividing the standard deviation by the square root of the sample size gives the standard error of the mean. - Check the result with a worked example. Suppose B2:B6 contains 8, 10, 12, 14, and 16. Their mean is 12, their sample standard deviation is about 3.1623, and the standard error is about 1.4142. So the formula in C2 should display approximately 1.4142, depending on the cell’s number format. This provides a quick way to spot a range or function error.
- Format the result appropriately. Select the result cell, then use Home > Number to choose a number format or adjust the decimal places. Formatting changes how many digits are displayed, not the underlying calculation. Keep enough decimal places for the analysis; rounding the result too early can affect later calculations or comparisons.
- Use a separate-cell setup if you want to inspect each part. With the sample values in B2:B6, enter
=STDEV.S(B2:B6)in C2 to show the sample standard deviation. With the same range, enter=COUNT(B2:B6)in C3 to show the sample size. With those intermediate results in C2 and C3, enter=C2/SQRT(C3)in C4 to calculate the standard error. For the worked example, C2 is about 3.1623, C3 is 5, and C4 is about 1.4142. This layout makes it easier to audit the calculation.
The one-cell formula is convenient when you need a result quickly. The separate-cell method is useful when you are preparing a report, sharing a workbook, or want someone else to verify how the answer was calculated. Both methods return the same value when they use the same observations.
Common Mistakes
- Using standard deviation as if it were standard error. Standard deviation describes variation among the individual observations. Standard error describes the estimated variation in the sample mean. The standard error is usually smaller as the sample size increases, because it divides the sample standard deviation by the square root of the count.
- Choosing the wrong standard deviation function. STDEV.S is the usual choice when your data is a sample and you are estimating the mean’s standard error. STDEV.P calculates the standard deviation for a full population. These functions answer different questions, so choose based on what the data represents rather than which result looks more familiar.
- Including a heading or unrelated cells. COUNT ignores text, but including a heading in a range can still make the formula harder to review. More importantly, extra numeric cells such as a subtotal or another group can change both the count and the standard deviation. Select only the observations for the group you are analyzing.
- Assuming blanks and zeros mean the same thing. COUNT skips blank cells but includes zero. If a blank means a missing measurement, leaving it blank is usually different from recording a measured value of zero. Check your source data and treat missing values consistently.
- Interpreting a small standard error as low variation in the data. A small standard error can result from a large sample even when individual values vary widely. Report or inspect the standard deviation as well if readers need to understand the spread of the observations.
Tips
- Keep the sample size visible. Showing the count beside the standard error makes the result easier to interpret. A standard error without its sample size can be difficult to compare with another result calculated from a different number of observations.
- Use clear labels. Label the column of measurements and the result cell, for example Sample values and Standard error. If the worksheet has several groups, label each group’s result and check that each formula points to the intended group.
- Use a table or a well-defined range as data grows. If you regularly add observations, a normal fixed range may not include new rows automatically. Excel Tables can expand as you add rows; verify the formula’s references after changing the data layout so the new observations are included.
- Retain useful precision. You can display four decimal places while Excel keeps the full calculated value. Avoid using rounding within the calculation unless your analysis specifically requires it.
- Consider whether the sample supports the conclusion. The formula produces a number, but it does not establish that a sample is representative or that observations are independent. Highly skewed data, outliers, clustered measurements, or a biased sampling method may make a simple standard error an incomplete summary.
Troubleshooting
The cell shows #DIV/0!. Excel may be finding fewer than two numeric observations, leaving no usable sample standard deviation. Check that the range includes at least two numbers and that numbers stored as text are converted to numeric values. A cell that looks like a number can sometimes be stored as text after an import.
The result is zero or unexpectedly small. Check whether all the included numbers are identical, which gives a sample standard deviation of zero. If they should differ, inspect the selected range for repeated references, copied values, or a mistaken column. Also confirm that the formula is not using a much larger range than the actual sample.
The result seems too large. Confirm that you used the standard error formula rather than just the standard deviation, and check that COUNT is counting the intended observations. Look for an accidentally included subtotal, outlier, or value from a second group. A genuine outlier can increase the standard deviation substantially, so do not delete it simply to make the answer smaller; investigate its source first.
The formula appears as text instead of calculating. Check that the cell is not formatted as Text, and that the formula begins with an equals sign. Change the cell format to General if needed, then re-enter the formula. In some regional settings, Excel uses a different list separator, such as a semicolon, instead of a comma; follow the separator used by your installation if Excel rejects the otherwise valid formula.
The number differs from a calculator or another worksheet. Compare the exact input cells, sample size, and standard deviation convention. Check whether one calculation includes a blank, a zero, or an extra observation, and compare unrounded values rather than only displayed digits. Excel’s displayed rounding can make correct results look slightly different.
Frequently Asked Questions
What is the standard error of the mean?
It is an estimate of how much a sample mean would vary from sample to sample if the same sampling process were repeated. It is not the range of the individual values and is not the same as the standard deviation.
Which Excel function should I use: STDEV.S or STDEV.P?
For the usual standard error calculated from a sample, use STDEV.S. STDEV.P is intended to calculate the standard deviation of a complete population. Decide what your observations represent before choosing the function.
Does Excel have a standard error function?
Excel does not need a separate standard-error-of-the-mean function for this calculation. Combine STDEV.S, SQRT, and COUNT in one formula, or calculate those parts in separate cells.
Should blanks be included in the sample size?
No. COUNT ignores blank cells, so they do not contribute to the sample size in the formula. A numeric zero is included. Make sure blanks genuinely represent missing observations and are not being used in place of measured zeros.
Can I use the formula for two different groups?
Yes. Calculate a separate standard error for each group using only that group’s observations. Compare the groups with care: the standard errors describe uncertainty in each mean, but the formula by itself does not test whether the group means differ significantly.
Does the formula work in Excel for Mac or the web?
Yes. STDEV.S, SQRT, and COUNT are available in current Excel for Mac and Excel for the web, and the formula is the same. A computer’s regional settings may affect whether Excel expects commas or semicolons between function arguments.
Related
- Insert a Square Checkbox in Word: Symbol or Clickable Box
- Insert a Personal Signature in Word for Mac: Steps & Tips
- Insert a Personal Signature in Word Online: Steps and Tips
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- COUNTIFS Formula Not Working? Fix Common ErrorsIf COUNTIFS is not working, first check that every criteria range is the same size and that each…
- Outlook Block Sender Not Working? Causes and FixesIf you couldn’t block a sender in Outlook, first make sure you selected an email in the correct…
- Excel Filter Dropdown Not Working? Fix Common CausesIf an Excel filter dropdown is missing, will not open, or shows the wrong results, first select a…
- Excel Copy Formula Down a Column Not Working? FixesIf copying a formula down an Excel column is not working, select the formula cell and the cells…
- Excel File Format and Extension Error: Causes and FixesThe Excel message “The file format and extension of [filename] don’t match” means Excel cannot confirm that the…
- Excel Error: Convert an Entire Column to Real NumbersTo fix Excel’s “number stored as text” error across a column, select the affected cells and choose the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.