Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less
Estimates standard deviation based on a sample. The standard deviation is a measure of how widely values are dispersed from the average value (the mean).
Important: This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. Although this function is still available for backward compatibility, you should consider using the new functions from now on, because this function may not be available in future versions of Excel.
For more information about the new function, see STDEV.S function.
Syntax
STDEV(number1,[number2],…)
The STDEV function syntax has the following arguments:
-
Number1 Required. The first number argument corresponding to a sample of a population.
-
Number2, … Optional. Number arguments 2 to 255 corresponding to a sample of a population. You can also use a single array or a reference to an array instead of arguments separated by commas.
Remarks
-
STDEV assumes that its arguments are a sample of the population. If your data represents the entire population, then compute the standard deviation using STDEVP.
-
The standard deviation is calculated using the «n-1» method.
-
Arguments can either be numbers or names, arrays, or references that contain numbers.
-
Logical values and text representations of numbers that you type directly into the list of arguments are counted.
-
If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells, logical values, text, or error values in the array or reference are ignored.
-
Arguments that are error values or text that cannot be translated into numbers cause errors.
-
If you want to include logical values and text representations of numbers in a reference as part of the calculation, use the STDEVA function.
-
STDEV uses the following formula:
where x is the sample mean AVERAGE(number1,number2,…) and n is the sample size.
Example
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.
Data |
||
---|---|---|
Strength |
||
1345 |
||
1301 |
||
1368 |
||
1322 |
||
1310 |
||
1370 |
||
1318 |
||
1350 |
||
1303 |
||
1299 |
||
Formula |
Description (Result) |
Result |
=STDEV(A3:A12) |
Standard deviation of breaking strength (27.46392) |
27.46392 |
Need more help?
Excel is used extensively for statistics and data analysis. Standard deviation is something that is used quite often in statistical calculations.
In this tutorial, I will show you how to calculate the standard deviation in Excel (using simple formulas)
But before getting into, let me quickly give you a brief overview of what standard deviation is and how it’s used.
What is Standard Deviation?
A standard deviation value would tell you how much the data set deviates from the mean of the data set.
For example, suppose you have a group of 50 people, and you are recording their weight (in kgs).
In this data set, the average weight is 60 kg, and the standard deviation is 4 kg. It means that most of the people’s weight is within 4 kg of the average weight (which would be 56-64 kg).
Now let’s interpret the standard deviation value:
- A lower value indicates that the data points tend to be closer to the average (mean) value.
- A higher value indicates that there is widespread variation in the data points. This can also be a case when there are many outliers in the data set.
Calculating Standard Deviation in Excel
While it’s easy to calculate the standard deviation, you need to know which formula to use in Excel.
There are six standard deviation formulas in Excel (eight if you consider database functions as well).
These six formulas can be divided into two groups:
- Calculating the sample standard deviation: The formulas in this category are STDEV.S, STDEVA, and STDEV
- Calculating the standard deviation for an entire population: The formulas in this category are STDEV.P, STDEVPA, and STDEVP
In almost all of the cases, you will use standard deviation for a sample.
Again in layman terms, you use the term ‘population’ when you want to consider all the datasets in the entire population. On the other hand, you use term ‘sample’ when using a population is not possible (or it’s unrealistic to do so). In such a case, you pick a sample from the population.
You can use the sample data to calculate the standard deviation and infer for the entire population. You can read a great explanation of it here (read the first response).
So. this narrows down the number of formulas to three (STDEV.S, STDEVA, and STDEV function)
Now let’s understand these three formulas:
- STDEV.S – Use this when your data is numeric. It ignores the text and logical values.
- STDEVA – Use this when you want to include text and logical values in the calculation (along with numbers). Text and FALSE are taken as 0 and TRUE is taken as 1.
- STDEV – STDEV.S was introduced in Excel 2010. Before it, the STDEV function was used. It is still included for compatibility with prior versions.
So, you can safely assume that in most of the cases, you would have to use STDEV.S function (or STDEV function if you’re using Excel 2007 or prior versions).
So now let’s see how to use it in Excel.
Using STDEV.S Function in Excel
As mentioned, STDEV.S function uses numerical values but ignores the text and logical values.
Here is the syntax of STDEV.S function:
STDEV.S(number1,[number2],…)
- Number1 – This is a mandatory argument in the formula. The first number argument corresponds to the first element of the sample of a population. You can also use a named range, single array, or a reference to an array instead of arguments separated by commas.
- Number2, … [Optional argument in the formula] You can use up to 254 additional arguments. These can refer to a data point, a named range, a single array, or a reference to an array.
Now, let’s have a look at a simple example where we calculate the standard deviation.
Example – Calculating the Standard Deviation for Weight Data
Suppose you have a data set as shown below:
To calculate the standard deviation using this data set, use the following formula:
=STDEV.S(A2:A10)
In case you’re using Excel 2007 or prior versions, you will not have the STDEV.S function. In that case, you can use the below formula:
=STDEV(D2:D10)
The above formula returns the value of 2.81, which indicates that most of the people in the group would be within the weight range 69.2-2.81 and 69.2+2.81.
Note that when I say ‘most of the people’, it refers to the normal distribution of the sample (that is 68% of the sample population is within one standard deviation from the mean).
Also, note that this is a very small sample set. In reality, you may have to do this for a bigger sample data set where you can observe normal distribution better.
Hope you found this Excel tutorial useful.
You May Also Like the Following Excel Tutorials:
- Calculating Weighted Average in Excel.
- Calculating CAGR in Excel.
- Calculate and Format Percentages in Excel.
- Calculate Age in Excel using Formulas.
- Creating a Bell Curve in Excel.
- Calculating Compound Interest in Excel.
- How to Calculate Square Root in Excel
- Calculate the Coefficient of Variation (CV) in Excel
- How to Calculate Correlation Coefficient in Excel
- How to Get Descriptive Statistics in Excel?
Download Article
Step-by-step tutorial for the STDEV functions
Download Article
This wikiHow shows you how to find the standard deviation of a dataset in Microsoft Excel. Whether you’re studying for statistics, analyzing data at work, or just researching something for fun, calculating a standard deviation is essential. And, it’s pretty easy to do in Excel! There are built-in functions for calculating the standard deviation.
Things You Should Know
- There are four functions for calculating standard deviation.
- STDEV.P and STDEV.S cover most situations. Use STDEV.P for populations and STDEV.S for samples.
- The function will calculate the standard deviation for a selected range of cells.
Steps
-
1
Enter the values you want to use. Pick a column in which you want to enter your data, then type each data value into individual cells in that column. Using Excel is a great way to organize and analyze your data.
- For example, if you select column «A» as the area in which to enter your data, you might type a number into cell A1, cell A2, cell A3, and so on.
- If needed, you can move columns in your spreadsheet to organize your data.
-
2
Note this information about the different functions. There are four functions in Excel for calculating standard deviation. The functions differ in two ways:[1]
- The selected function will either calculate the standard deviation for a sample (using n — 1) or a population (using n), where n is the sample size.
- The selected function will include or exclude logical values (TRUE and FALSE) and text (numbers represented as text). TRUE is interpreted as a 1, while FALSE is 0.
Advertisement
-
3
Choose a standard deviation function. Here are the four options for calculating standard deviation:
- STDEV.P — Finds the standard deviation of a population. This function doesn’t include logical values or text.[2]
- STDEV.S — Finds the standard deviation of a sample. This function doesn’t include logical values or text.[3]
- STDEVA — Finds the standard deviation of a sample. This function does include logical values or text.[4]
- STDEVPA — Finds the standard deviation of a population. This function does include logical values or text.[5]
- There are also two outdated functions that have been replaced by the above functions. They are still present in Excel for backward compatibility reasons, but may be phased out in future versions.
- STDEV — This function was replaced by STDEV.S. Finds the standard deviation of a sample. This function doesn’t include logical values or text.[6]
- STDEVP — This function was replaced by STDEV.P. Finds the standard deviation of a population. This function doesn’t include logical values or text.[7]
- STDEV — This function was replaced by STDEV.S. Finds the standard deviation of a sample. This function doesn’t include logical values or text.[6]
- STDEV.P — Finds the standard deviation of a population. This function doesn’t include logical values or text.[2]
-
4
Click a blank cell. This should be the cell in which you want to display the standard deviation value. Doing so selects the cell.
-
5
Type in the standard deviation function. In the cell you selected, enter the standard deviation function you want to use. Here is STDEV.S() as an example:
- =STDEV.S()
-
6
Add your value range. To do so:
- In between the parentheses, type the letter and number of the cell containing your first data value.
- Type a colon (:)
- Type the letter and number of the last cell.
- For example, if you entered your data in column «A» from rows 1 through 10, you would have =STDEV.S(A1:A10) typed here.
- If you just want to display the standard deviation of the value of a few scattered cells such as A1, B3, and C5, you can type the cell names separated by commas (e.g., =STDEV.S(A1,B3,C5)).
-
7
Press ↵ Enter. This will prompt Excel to run the formula, displaying the standard deviation of the selected cells in the formula’s cell.
- If you want to check your work, you can calculate the standard deviation by hand.
Advertisement
Add New Question
-
Question
How do I use Excel to calculate 2 standard deviations?
Use =STDEV(), and put your range of values in the parentheses. This can be 2 cells or 2 values (numbers).
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
Thanks for submitting a tip for review!
Advertisement
-
The old =STDEV( ) formula doesn’t work in versions of Excel older than 2007.
Advertisement
References
About This Article
Thanks to all authors for creating a page that has been read 443,657 times.
Is this article up to date?
wikiHow Tech Help Pro:
Level up your tech skills and stay ahead of the curve
Let’s go!
What is Standard Deviation? | STDEV.P | STDEV.S | Variance
This page explains how to calculate the standard deviation based on the entire population using the STDEV.P function in Excel and how to estimate the standard deviation based on a sample using the STDEV.S function in Excel.
What is Standard Deviation?
Standard deviation is a number that tells you how far numbers are from their mean.
1. For example, the numbers below have a mean (average) of 10.
Explanation: the numbers are all the same which means there’s no variation. As a result, the numbers have a standard deviation of zero. The STDEV function is an old function. Microsoft Excel recommends using the new STEDV.S function which produces the exact same result.
2. The numbers below also have a mean (average) of 10.
Explanation: the numbers are close to the mean. As a result, the numbers have a low standard deviation.
3. The numbers below also have a mean (average) of 10.
Explanation: the numbers are spread out. As a result, the numbers have a high standard deviation.
STDEV.P
The STDEV.P function (the P stands for Population) in Excel calculates the standard deviation based on the entire population. For example, you’re teaching a group of 5 students. You have the test scores of all students. The entire population consists of 5 data points. The STDEV.P function uses the following formula:
In this example, x1 = 5, x2 = 1, x3 = 4, x4 = 6, x5 = 9, μ = 5 (mean), N = 5 (number of data points).
1. Calculate the mean (μ).
2. For each number, calculate the distance to the mean.
3. For each number, square this distance.
4. Sum (∑) these values.
5. Divide by the number of data points (N = 5).
6. Take the square root.
7. Fortunately, the STDEV.P function in Excel can execute all these steps for you.
STDEV.S
The STDEV.S function (the S stands for Sample) in Excel estimates the standard deviation based on a sample. For example, you’re teaching a large group of students. You only have the test scores of 5 students. The sample size equals 5. The STDEV.S function uses the following formula:
In this example, x1=5, x2=1, x3=4, x4=6, x5=9 (same numbers as above), x̄=5 (sample mean), n=5 (sample size).
1. Repeat steps 1-5 above but at step 5 divide by n-1 instead of N.
2. Take the square root.
3. Fortunately, the STDEV.S function in Excel can execute all these steps for you.
Note: why do we divide by n — 1 instead of by n when we estimate the standard deviation based on a sample? Bessel’s correction states that dividing by n-1 instead of by n gives a better estimation of the standard deviation.
Variance
Variance is the square of the standard deviation. It’s that simple. Sometimes it’s easier to use the variance when solving statistical problems.
1. The VAR.P function below calculates the variance based on the entire population.
Note: you already knew this answer (see step 5 under STDEV.P). Take the square root of this result to find the standard deviation based on the entire population.
2. The VAR.S function below estimates the variance based on a sample.
Note: you already knew this answer (see step 1 under STDEV.S). Take the square root of this result to find the standard deviation based on a sample.
3. VAR and VAR.S produce the exact same result.
Note: Microsoft Excel recommends using the new VAR.S function.
The standard deviation shows the variability of the data values from the mean (average). In Excel, the STDEV and STDEV.S calculate sample standard deviation while STDEVP and STDEV.P calculate population standard deviation. STDEV is available in Excel 2007 and the previous versions. However, STDEV.P and STDEV.S are only available in Excel 2010 and subsequent versions.
Table of contents
- What is Standard Deviation in Excel?
- Standard Deviation Formulas in Excel
- The Syntax of STDEV.S Function
- The Population vs. Sample
- The STDEV.S and STDEVA Functions
- Calculating Standard Deviation in Excel
- #1 – Calculate Population Standard Deviation in Excel
- #2– Calculate Sample Standard Deviation in Excel
- Frequently Asked Questions
- Recommended Articles
- Standard Deviation Formulas in Excel
Standard Deviation Formulas in Excel
In excel, there are eight formulas to calculate the standard deviation. These are grouped under sample and population.
The functions STDEV.S, STDEVA, STDEV, DSTDEV are under sample and STDEV.P, STDEVP, STDEVPA, DSTDEVP are under population.
The Syntax of STDEV.S Function
The syntax of the function is stated as follows:
The function accepts the following arguments:
- Number 1: This is the first value of the sample data. It can be expressed as a range.
- Number 2: This is the second value of the sample data.
“Number 1” is mandatory and “number 2” is an optional argument.
Note 1: If the entire sample data is entered as a range, the “number 2” argument becomes optional.
Note 2: The sample standard deviation formula works correctly when the supplied arguments contain at least two numeric values. Otherwise, it returns the “#DIV/0!” error.
The Population vs. Sample
The population and sample are defined as follows:
- The population refers to the whole data set.
- A sample is a subset of the data set. A sample of the population is taken when it is difficult to use the complete data set.
Note: The sample standard deviation helps make conclusions for the population.
The STDEV.S and STDEVA Functions
The two functions are explained as follows:
- The STDEV.S function calculates the standard deviationStandard deviation (SD) is a popular statistical tool represented by the Greek letter ‘σ’ to measure the variation or dispersion of a set of data values relative to its mean (average), thus interpreting the data’s reliability.read more using the numerical values. It ignores the text values. The “S” of the function represents the sample data set.
- The STDEVA function calculates the standard deviation by counting the text values as zero. The logical value “false” is counted as 0 and “true” is counted as 1.
Note: The STDEV.S is available in Excel 2010 and the subsequent versions.
Calculating Standard Deviation in Excel
#1 – Calculate Population Standard Deviation in Excel
Let us consider an example to understand the concept of standard deviation in Excel.
The following are the employee scores of an organization. They indicate the skill levels of the employees.
We want to calculate the standard deviation of the given data set.
The steps to calculate standard deviation in Excel are listed as follows:
- Calculate the mean (average) of the data.
The output 55.2 signifies the average employee score.
- Calculate the population variance. It is the difference of each score from the mean. The results are summed as shown in the following image.
Variance =
Variance =The population variance is 3.36.
- Calculate the standard deviation. It is the square root of the variance.
Conclusion: The standard deviation is 1.83. This indicates that the employee scores range from 53.37 to 57.03.
#2– Calculate Sample Standard Deviation in Excel
Let us consider an example to understand the working of the STDEV.S function.
The following table shows the heights of different goats. The height is measured from the shoulder level and is denoted in millimeters.
You can download this Standard Deviation Excel Template here – Standard Deviation Excel Template
Step 1: Calculate the mean of the given data. The output is 394.
Step 2: Apply STDEV.S to the range B2:B6. The output is 165.
Conclusion: The standard deviation of the height of the goats is 165. This indicates that the usual heights are within the range of 229 and 559 millimeters.
In other words, the heights are on either side of the mean, i.e., 394–165=229 and 394+165=559.
Frequently Asked Questions
1. What is standard deviation in Excel?
The standard deviation measures the dispersion of a given set of values from the mean. It shows the fluctuation of data values. A low standard deviation indicates lower variability and greater accuracy of the mean. On the other hand, a high standard deviation indicates higher variation and lesser reliability of the mean.
While investing, the standard deviation of the returns is evaluated to assess the volatility of a stock. In Excel, the STDEV and STDEV.S calculate sample standard deviation while STDEVP and STDEV.P calculate population standard deviation.
2. Which standard deviation formula should be used in Excel?
To select the appropriate standard deviation formula, the following points must be considered:
• The standard deviation is being calculated for a population or sample.
• The type of values of the data set. These values can be numerical, logical or textual.
• The version of MS Excel which is being used currently.
3. How to create a standard deviation graph in Excel?
The steps to create a standard deviation graph in Excel are listed as follows:
• Create a usual Excel chart with the help of the “charts” group under the Insert tab.
• Select the chart and click the plus (+) sign on the top-right corner.
• In “chart elements,” click the arrow of “error bars,” and select “standard deviation.”
The standard deviation bars for the data points are inserted within the chart.
- STDEV calculates the standard deviation of the sample data supplied as an argument.
- The standard deviation shows the variability of the data values from the mean (average).
- The lower the standard deviation, the closer the data points to the mean.
- The higher the standard deviation, the more scattered the data points from the mean.
- The population refers to the entire data set while a sample is a subset of this data.
- The STDEV.S function calculates the standard deviation using the numerical values only.
- The STDEV.S function accepts two arguments–“number 1” and “number 2” representing the first and the second value of the sample data respectively.
Recommended Articles
This has been a guide to standard deviation in Excel. Here we discuss how to calculate standard deviation in excel using formula and examples. You may also look at these useful functions in Excel –
- Quartile DeviationQuartile deviation is based on the difference between the first quartile and the third quartile in the frequency distribution and the difference is also known as the interquartile range, the difference divided by two is known as quartile deviation or semi interquartile range.read more
- Sample Standard Deviation FormulaSample standard deviation refers to the statistical metric that is used to measure the extent by which a random variable diverges from the mean of the sample.read more
- Standard Deviation Graph in ExcelThe standard deviation is a metric that calculates how values change when compared to or in relation to the mean or average value. Both deviations are represented in a standard deviation graph, with one being positive on the right and the other being negative on the left.read more
- QUARTILE Function in Excel