# How to Calculate Standard Deviation: 12 Steps

The standard deviation calculation tells you how spread out the numbers are in your data sample. Once you know which numbers and equations to use, calculating the standard deviation is easy!

## Steps

### Part 1 of 3: Finding the Mean

#### Step 1. Look at your data set

This is an important step in any type of statistical calculation, even if it is a simple figure, such as the mean or median.

• Determine how many numbers are in the sample.
• Do the numbers vary over a wide range? Or are the differences between the numbers small, like only a few decimal places?
• Know the type of data you are looking at. What do the numbers in your sample represent? This could be something like test scores, heart rate readings, heights, weights, etc.
• For example, a set of test scores would be 10, 8, 10, 8, 8, and 4.

#### Step 2. Gather all the data

You will need all the numbers in the sample to find the mean.

• The mean is the average of all your data points.
• This is calculated by adding all the numbers in the sample and then dividing this number by the number of numbers in the sample (n).
• In the sample of grades (10, 8, 10, 8, 8, 4) there are 6 numbers. Therefore, n = 6.

#### Step 3. Add the numbers in the sample

This is the first part of calculating a mathematical mean or average.

• For example, use the data set for grades 10, 8, 10, 8, 8, and 4.
• 10 + 8 + 10 + 8 + 8 + 4 = 48. This is the sum of all the numbers in the data set or sample.

#### Step 4. Divide the sum by how many numbers are in the sample (n)

This will give you the average or mean of the data.

• In the sample of grades (10, 8, 10, 8, 8 and 4) there are 6 numbers, so n = 6.
• The sum of the scores in the example was 48. So divide 48 by n to get the mean.
• 48 / 6 = 8
• The mean of the scores in the sample is 8.

### Part 2 of 3: Finding the Variance in Your Sample

#### Step 1. Find the variance

The variance is a figure that represents the distance at which the data in your sample are clustered around the mean.

• This figure will give you an idea of how spread out the data is.
• Samples with low variance have data that is clustered very closely around the mean.
• Samples with high variance have data that is clustered far from the mean.
• The variance is often used to compare the distribution of two sets of data.

#### Step 2. Subtract the mean from each of the numbers in the sample

This will give you a figure indicating how much each data point differs from the mean.

• For example, in our sample of grades (10, 8, 10, 8, 8, and 4), the math mean or average was 8.
• 10 - 8 = 2, 8 - 8 = 0, 10 - 8 = 2, 8 - 8 = 0, 8 - 8 = 0 and 4 - 8 = -4.
• Do this procedure again to check each answer. It is very important that each of these figures is correct as you will need them for the next step.

#### Step 3. Square each of the subtraction results you just completed

You will need each of these figures to find the variance in the sample.

• Remember: in our sample we subtracted the mean (8) of each of the numbers in the sample (10, 8, 10, 8, 8 and 4) and obtained the following: 2, 0, 2, 0, 0 and -4.
• To perform the following calculation in the process of finding the variance, you will do the following: 22, 02, 22, 02, 02 and (-4)2 = 4, 0, 4, 0, 0 and 16.
• Review the answers before proceeding to the next step.

#### Step 4. Add the squared numbers

This figure is called the sum of the squares.

• In our example of ratings, the squares were as follows: 4, 0, 4, 0, 0, and 16.
• Remember: in the grades example, we start by subtracting the mean of each of the grades and squaring this answer: (10-8) ^ 2 + (8-8) ^ 2 + (10-2) ^ 2 + (8-8) ^ 2 + (8-8) ^ 2 + (4-8) ^ 2.
• 4 + 0 + 4 + 0 + 0 + 16 = 24.
• The sum of the squares is 24.

#### Step 5. Divide the sum of the squares by (n - 1)

Remember: n is how many numbers are in your sample. This step will give you the variance. The reason for using n-1 is to have irregular sample and population variance.

• In our sample of grades (10, 8, 10, 8, 8, and 4) there are 6 numbers. Therefore, n = 6.
• n - 1 = 5.
• Remember: the sum of the squares for this sample was 24.
• 24 / 5 = 4, 8
• Therefore, the variance for this sample is 4.8.

### Part 3 of 3: Calculate the standard deviation

#### Step 1. Find the variance

You will need this to find the standard deviation of your sample.

• Remember: the variance is how scattered the data is with respect to the mathematical mean or average.
• The standard deviation is a similar number that represents how spread out the data is in your sample.
• In our sample ratings sample, the variance was 4.8.

#### Step 2. Find the square root of the variance

This figure is the standard deviation.

• Generally, at least 68% of all samples will be within one standard deviation of the mean.
• Remember: in our sample of ratings, the variance was 4.8.
• √4, 8 = 2, 19. Therefore, the standard deviation in our sample of grades is 2, 19.
• 5 of 6 digits (83%) in the sample of grades (10, 8, 10, 8, 8 and 4) is within one standard deviation (2, 19) of the mean (8).