# How to Calculate Standard Deviation in Excel

Techwalla may earn compensation through affiliate links in this story.

The divisor in the standard deviation formula is different depending on whether you want the standard deviation for a data set that represents the entire population (divide by the number of data elements minus one), or if your data set is a sample of the population, and you want to calculate the standard deviation to generalize your results to the entire population (divide by the number of data elements). As a result, Excel provides the following four functions to calculate standard deviation based on whether you want to calculate the statistic for a population or a sample, and how you want to treat text and logical values in your data set:

• STDEV.P - Calculates the standard deviation for a population and ignores logical and text values.
• STDEV.S - Calculates the standard deviation for a sample and ignores logical and text values.
• STDEVPA - Calculates the standard deviation for a population and converts "False" and logical False to zero and "True" and logical True to 1.
• STDEVA - Calculates the standard deviation for a sample and converts "False" and logical False to zero and "True" and logical True to 1.

#### Tip

The standard deviation represents the distribution of values around the mean, or average value. To provide the relevant context to properly interpret the standard deviation, you should always calculate and display the mean when you calculate the standard deviation.

## Step 1

Launch Excel and either open a workbook that has the data for which you want to calculate statistics or type the data into the blank workbook. For an example, consider a workbook with test scores for a population of 10 students that does not include any text or logical data. The workbook also contains an area in columns D and E to display the calculated statistics.

Image Credit: Steve McDonnell/Demand Media

## Step 2

Click in the cell that will display the mean value for the population and then choose the function selector, fx.

Image Credit: Steve McDonnell/Demand Media

## Step 3

Change the category selection box to Statistical. Scroll through the list of functions, choose AVERAGE and then select OK.

Image Credit: Steve McDonnell/Demand Media

## Step 4

Click the cell selector button to choose the cells that contain your data.

Image Credit: Steve McDonnell/Demand Media

## Step 5

Use your mouse to highlight the range of data cells or type the range into the Function Arguments box, for example, B2:B11. Choose OK to place the calculation in your workbook.

Image Credit: Steve McDonnell/Demand Media

## Step 1

Click the cell that will display the standard deviation and click the function selector, fx.

Image Credit: Steve McDonnell/Demand Media

## Step 2

Choose the STDEV.P formula to calculate the standard deviation for the entire population and to ignore text and logical values. The category selection box defaults to Statistical based on your previous selection. Choose OK to continue.

Image Credit: Steve McDonnell/Demand Media

#### Tip

If you had a large data set of test scores and you selected a random sample to use when calculating the standard deviation as an approximation for the entire data set, you would select the STDEV.S function here instead.

## Step 3

Click the cell selector button to select the range of values.

Image Credit: Steve McDonnell/Demand Media

## Step 4

Select the range of data cells or type the range in the Function Arguments box and choose OK.

Image Credit: Steve McDonnell/Demand Media

## Step 5

Right-click in the cell that displays the standard deviation and choose Format Cells... from the menu.

Image Credit: Steve McDonnell/Demand Media

## Step 6

Select the number of decimal places you want to display and choose a format for negative numbers.

Image Credit: Steve McDonnell/Demand Media

## Step 7

Review the results to ensure they look reasonable given the data set.

Image Credit: Steve McDonnell/Demand Media

#### Tip

Some data sets contain variables that are either True or False, and these variables might use a zero to represent False and a one to represent True. Excel also enables you to indicate True or False with .T. and .F. When you're calculating the standard deviation for these types of variables, use the STDEVPA function for a population or the STDEVA function for a sample of the population to include these values in the calculation.