Standard deviation measures how spread out your data is from the average, and Excel offers two main functions for this: STDEV.S for sample data and STDEV.P for population data. You can calculate it by typing STDEV.S(range) or STDEV.P(range) directly into a cell, or by using the Statistical category in the Formulas tab.
What You'll Need
- A computer running Microsoft Excel (2010 or later for the most modern function names).
- A dataset of numbers in a single column or row, or a range of cells containing your values.
- A basic understanding of the difference between a sample and a population, which dictates which formula to use.
Step-by-Step
- Organize your data. Enter your data points into a single column of cells (e.g., A1 through A20) or a single row (e.g., B1 through B1). It is best practice to label the column header (e.g., "Sales," "Height," "Scores") in the cell immediately above or to the left of your numbers so the data is self-explanatory.
- Select the cell where you want the result to appear. Click on an empty cell in your spreadsheet. This is where the standard deviation number will be displayed. You typically place this cell below your data or in a separate summary section.
- Determine if you have a sample or a population. This is the most critical step before typing a formula. If your data represents a subset of a larger group (a sample) and you want to estimate the standard deviation for the whole group, use the sample formula. If your data includes every single member of the group you are studying (the population), use the population formula. In most real-world business or research scenarios, you are working with a sample.
- Open the formula bar. Click on the formula bar located at the top of the Excel window, just to the right of the "fx" symbol. This is where you will type your function. Alternatively, you can simply start typing the function name directly into the selected result cell.
- Type the function name. Type STDEV.S if you are using a sample, or STDEV.P if you are using a population. These are the modern, preferred function names in Excel. Older versions of Excel may use STDEV for samples and STDEVP for populations; however, the modern functions are backward compatible.
- Open the parentheses. Type an opening parenthesis
(after the function name. This tells Excel that a range of cells follows. - Select your data range. Click and drag your mouse over the cells that contain your numbers. You can also type the range manually, for example,
A1:A20, if you know the exact cell addresses. Ensure you do not include the column header in your range. - Close the parentheses. Type a closing parenthesis
)to complete the function syntax. - Press Enter. Press the Enter key on your keyboard or click the green checkmark button in the formula bar. Excel will instantly calculate the standard deviation and display the result in the selected cell.
- Verify the result. Look at the result cell. If the number is a long decimal, you may want to format it. Click on the cell, go to the Home tab, and use the Decrease Decimal button to round the number to a more readable format, such as two decimal places.
Common Mistakes
One of the most frequent errors is using the wrong formula, STDEV.P when you should have used STDEV.S. This happens when users confuse the terms "population" and "sample." A population includes every single data point you are interested in. A sample is just a part of that group. Using the population formula when you have a sample will result in a standard deviation that is artificially smaller than it should be. Conversely, using the sample formula on a full population is usually acceptable, but it is technically less accurate for that specific data set.
Another common mistake is including non-numeric data, such as text labels or empty cells, within the selected range. Excel will usually ignore text, but if you have a cell that contains an error (like #DIV/0!) or a blank string, the entire standard deviation calculation may return an error. Always double-check your highlighted range to ensure it contains only numbers.
Users often forget to close the parentheses ) at the end of the function. This will result in a syntax error message. Excel provides a warning if you forget to close a parenthesis, but it is easy to miss in long formulas or when typing manually. If you see a #NAME? error, it is often because you typed the function name incorrectly or left the parentheses open.
Tips
For a quick overview of your data's spread, you can calculate the mean (average) and the standard deviation simultaneously. This gives you a sense of the central tendency and the variability. The mean tells you the center, while the standard deviation tells you how far, on average, the data points tend to be from that center.
When you have a very large dataset, typing the range manually can be tedious. Instead, use the mouse to select the data range while the cursor is inside the parentheses. Excel will automatically insert the range reference for you. This reduces the risk of typos in the cell addresses.
It is helpful to understand what the standard deviation means in the context of your data. A low standard deviation indicates that the data points tend to be very close to the mean. A high standard deviation indicates that the data points are spread out over a wider range of values. This information is crucial for interpreting the reliability and consistency of your data.
Troubleshooting
If the result cell displays a #DIV/0! error, it means your standard deviation calculation is dividing by zero. This typically happens if you selected a range of cells that are all empty or contain text. Standard deviation requires at least one number to calculate. Ensure you have entered at least one data point in your selected range.
If you see a #VALUE! error, it means there is an issue with the data types in your range. This can occur if you have accidentally included a text string or a date that is not formatted correctly as a number in a cell that is part of the range. Check your data to ensure all cells in the range contain valid numeric values.
If the result seems incorrect, verify that you are not including the header row in your data range. It is a common habit to include the label (e.g., "Revenue") in the first row of data, but Excel will treat this text as a number, which will skew your results. Make sure your range starts with the first actual data point.
If Excel is not recognizing your function, ensure you are using the correct syntax. The function name must be typed in all capital letters (STDEV.S), and it must be followed by an opening parenthesis. If you are using a very old version of Excel that does not support the STDEV.S function, you can use the older STDEV function, which works the same way for samples.
Frequently Asked Questions
Should I use STDEV.S or STDEV.P?
Use STDEV.S if you are working with a sample of data and want to estimate the standard deviation for the entire population. Use STDEV.P if you have data for every single member of the group you are analyzing. In almost all practical situations involving business or research data, you are using a sample, so STDEV.S is the appropriate choice.
What does the standard deviation number actually tell me?
The standard deviation is a measure of volatility or dispersion. A low number means the data is consistent and predictable. A high number means the data is volatile and has a wide range of values. It tells you how much variation exists from the average (mean) value.
Why is my standard deviation different from another calculator?
Excel calculates standard deviation using a specific formula (N-1 for samples). If you are comparing your result to another tool, ensure that tool is also using the "sample" method (N-1) and not the "population" method (N). Using the wrong method is the most common reason for discrepancies.
Can I calculate standard deviation for multiple columns at once?
Yes, you can. You can select a range that spans multiple columns and rows (e.g., A1:B20) and feed that entire range into the STDEV.S function. Excel will include all numeric values within that rectangular area in the calculation.
What is the difference between sample and population standard deviation?
The difference lies in how the data is treated. Population standard deviation uses all data points (N). Sample standard deviation uses all data points but divides by (N-1) to correct for bias, giving a slightly more accurate estimate of the true population standard deviation.