To work out standard deviation in Excel, use the formula =STDEV.P(range) for an entire population or =STDEV.S(range) for a sample of a population. Simply type the formula into a cell, highlight the group of numbers you want to analyze, and press Enter.

Standard deviation is a mathematical measurement used to determine how spread out a set of numbers is from their average (the mean). A low standard deviation indicates that the data points tend to be very close to the mean, while a high standard deviation indicates that the data points are spread out over a wider range of values. This is essential for data analysis in finance, science, and business to understand volatility and consistency.

What You'll Need

  • A computer with Microsoft Excel installed (any modern version).
  • A dataset consisting of numerical values organized in a column or row.

Step-by-Step

  1. Prepare your data: Enter your numerical data into a single column or row. For example, place your numbers in cells A1 through A10. Ensure there are no text characters or symbols (like currency signs typed manually) inside the cells, as this can sometimes interfere with calculations.
  2. Choose the correct formula: Before typing, determine if your data represents a Population or a Sample.
    • Population (STDEV.P): Use this if you have data for every single member of the group you are studying (e.g., every student in one specific classroom).
    • Sample (STDEV.S): Use this if your data is a smaller subset of a larger group (e.g., 100 random customers out of a total of 10,000).
  3. Select the output cell: Click on the empty cell where you want the standard deviation result to appear.
  4. Enter the formula: Type =STDEV.S( or =STDEV.P( depending on your choice in step 2.
  5. Select your data range: While the formula is still open, click and drag your mouse over the cells containing your data (e.g., A1 to A10). The formula in the bar will now look like =STDEV.S(A1:A10).
  6. Complete the calculation: Type a closing parenthesis ) and press the Enter key on your keyboard.
  7. Format the result: If the resulting number has too many decimal places, use the Decrease Decimal button in the Home tab under the Number group to make the result more readable.

Common Mistakes

  • Mixing up .P and .S: Using STDEV.P when you only have a sample will result in an underestimated standard deviation. Always use STDEV.S unless you are certain you have the complete population.
  • Including the Average: Do not include the cell containing the mean/average of your data in the range you select for the standard deviation formula. This will skew the result.
  • Non-numeric data: Including cells with text, errors (like #VALUE!), or hidden characters within your range can lead to incorrect results or formula errors.
  • Manual Calculation errors: Trying to calculate standard deviation manually using a series of subtraction and squaring steps is prone to human error; using the built-in Excel functions is the most reliable method.

Tips

  • Named Ranges: If you frequently calculate SD for the same group of data, highlight the range, right-click, and select Define Name. You can then use a formula like =STDEV.S(SalesData) instead of cell coordinates.
  • Dynamic Arrays: If you add new data to your list frequently, convert your data range into an official Excel Table (select data and press Ctrl + T). When you use a table reference in your formula, the standard deviation will update automatically as you add new rows.
  • Quick Check: Use the Status Bar. While you cannot see SD there by default, you can right-click the bottom status bar of the Excel window and check "Minimum" and "Maximum" to get a quick sense of the data spread before running the formula.

Troubleshooting

If your formula is not working as expected, try these steps in order:

  1. Check for #VALUE! errors: This usually means there is a non-numeric value in your selected range. Scan your data for typos, spaces, or text.
  2. Check for #DIV/0! errors: This happens if your range contains only one number or is empty. Standard deviation requires at least two data points to calculate variance.
  3. Verify the range: Double-click the cell containing the formula. Excel will highlight the range it is calculating. Ensure it hasn't accidentally included header rows or empty cells at the bottom.
  4. Check for hidden rows: If you have filtered your data, STDEV.S still calculates the values in the hidden rows. If you only want to calculate the visible cells, you will need to use the SUBTOTAL function (specifically function number 7 or 8 depending on your version).

Frequently Asked Questions

What is the difference between STDEV and STDEV.S?

In older versions of Excel, STDEV was the standard formula. In newer versions, it has been replaced by STDEV.S (for samples) and STDEV.P (for populations) to be more explicit. STDEV and STDEV.S perform the exact same calculation.

Why is my standard deviation zero?

A standard deviation of zero means that every single number in your selected range is identical. There is no variance in the data.

Can I calculate standard deviation for multiple columns at once?

Yes. You can drag the fill handle (the small square at the bottom-right of the cell) across adjacent columns to apply the same formula to other data sets.

Does Excel calculate sample or population SD by default?

Excel does not have one single "default" button; you must choose the specific formula. However, most statistical analysis in business and science uses the sample formula (STDEV.S) because it is rare to have data for an entire population.

How do I find the variance instead of the standard deviation?

Variance is simply the square of the standard deviation. You can use the =VAR.S(range) or =VAR.P(range) formulas to get this value directly.