To work out standard deviation in Excel, use =STDEV.S(range) for a sample of data or =STDEV.P(range) for an entire population. For example, if your numbers are in cells A2 to A11, type =STDEV.S(A2:A11) into an empty cell and press Enter. That single formula returns the standard deviation, which tells you how spread out the values are around the average. This guide covers the exact steps, how to choose between the two functions, and how to avoid the most common errors.

What You'll Need

  • Excel 2010 or later (the STDEV.S and STDEV.P functions were introduced in Excel 2010; older versions use STDEV and STDEVP).
  • Your data entered in a single column or row, with no blank cells inside the range.
  • A basic understanding of whether your data is a sample or a population.

Step-by-Step

  1. Enter your data. Type your numbers into a column, for example A2 through A11. Leave the header row (A1) as text if you have one. Do not leave blank cells inside the range; if you must skip a value, leave it out of the range entirely rather than leaving a gap.
  2. Click an empty cell where you want the result to appear, such as B2.
  3. Type the formula. For a sample, type =STDEV.S(. For a population, type =STDEV.P(. Excel will show a tooltip listing the arguments.
  4. Select your range. Click the first cell of your data and drag to the last, or type the range manually, e.g. A2:A11. Close the bracket so the formula reads =STDEV.S(A2:A11).
  5. Press Enter. The cell displays the standard deviation as a number. If your data is in a row instead of a column, use a row range such as A2:J2.
  6. Format the result if needed. Select the result cell, then use the Number Format dropdown on the Home tab to show more decimal places. Standard deviation is often shown to two or three decimal places.
  7. Check your work. Compare the result with the average: select your data and look at the status bar at the bottom of the window, which shows Average and Count when cells are selected. A standard deviation much larger than the average suggests highly variable data; a very small one suggests the values cluster tightly.

Menu labels and function names can differ slightly by Excel version and region. In Excel for the web the formulas are the same, but the status bar summary may look different.

Common Mistakes

  • Using the wrong function. STDEV.S is for a sample (a subset of a larger group); STDEV.P is for a population (every value you care about). Using the population formula on sample data understates the spread.
  • Including text or blank cells in the range. STDEV.S and STDEV.P ignore text and empty cells, but if your range includes a header row with text, the count of numbers is still correct—however, it is cleaner to exclude headers.
  • Including the total row. If your column ends with a sum or average row, that number will be treated as data and distort the result. Select only the raw values.
  • Forgetting that older Excel versions lack STDEV.S. In Excel 2007 and earlier, use =STDEV(range) for a sample and =STDEVP(range) for a population. These still work in newer versions for compatibility but are not recommended for new work.
  • Typing the range with a space instead of a colon. A2 A11 is invalid; use A2:A11.

Tips

  • Use named ranges to make formulas readable: select your data, type a name in the Name Box (left of the formula bar), then write =STDEV.S(MyData).
  • To see standard deviation alongside the mean, use =AVERAGE(range) in one cell and =STDEV.S(range) in another, then format both consistently.
  • If you need to ignore errors in the range, wrap the function in IFERROR, e.g. =IFERROR(STDEV.S(A2:A11),"").
  • For a quick visual check, create a chart of your data; a wide spread of points usually corresponds to a larger standard deviation.
  • Remember that standard deviation is in the same units as your data, so label it clearly (e.g. "SD (minutes)").

Troubleshooting

  • #DIV/0! error: The range contains fewer than two numeric values. STDEV.S needs at least two numbers; STDEV.P needs at least one. Check for blank cells or text-only entries.
  • #VALUE! error: The range reference is malformed, or you typed text inside the parentheses without quotes. Re-select the range using the mouse.
  • #NAME? error: The function name is misspelled or your Excel version does not support it. Check for a typo such as STDEV.SS, or use the legacy STDEV function in very old versions.
  • Result looks too small or too large: Confirm you used the correct sample vs population function and that the range excludes totals, headers, and any outlier you meant to omit.
  • Formula shows as text: The cell may be formatted as Text. Select the cell, set the format to General or Number, then re-enter the formula and press Enter.
  • If that did not work: Close and reopen the workbook, then try the formula in a brand-new sheet with a few test numbers (e.g. 1, 2, 3, 4, 5) to confirm the function works. If it does, the issue is in your original range.

Frequently Asked Questions

What is the difference between STDEV.S and STDEV.P?

STDEV.S calculates the standard deviation for a sample, dividing by n−1 (Bessel's correction). STDEV.P calculates it for an entire population, dividing by n. Use STDEV.S when your data is a subset of a larger group; use STDEV.P when you have every value.

Can I calculate standard deviation for multiple columns at once?

Yes. Enter a separate formula for each column, or use =STDEV.S(A2:A11) in one cell and drag the fill handle across to apply it to adjacent columns. Each column is treated independently.

Does Excel ignore blank cells in the range?

Yes, STDEV.S and STDEV.P ignore empty cells, text, and logical values in a referenced range. However, if the range contains fewer than two numeric values, STDEV.S returns #DIV/0!.

How do I show standard deviation on a chart?

Excel does not add standard deviation automatically. Calculate it in a helper cell, then add error bars to a chart via Chart Design > Add Chart Element > Error Bars > More Error Bars Options, and choose Custom to enter your calculated value. Labels vary by Excel version.

Why does my result differ from a calculator?

Most likely you used the sample formula on population data or vice versa, or your range includes an extra value such as a total. Double-check the function and the exact cells selected.

Can I use standard deviation on filtered data?

STDEV.S includes hidden rows in a filtered range. To calculate only visible cells, use =SUBTOTAL(7,range) for the standard deviation of visible cells—but note SUBTOTAL's function number 7 corresponds to STDEV.S behavior in modern Excel; verify in your version.