Introduction

In this article, we'll learn how to calculate standard deviation "by hand".
Interestingly, in the real world no statistician would ever calculate standard deviation by hand. The calculations involved are somewhat complex, and the risk of making a mistake is high. Also, calculating by hand is slow. Very slow. This is why statisticians rely on spreadsheets and computer programs to crunch their numbers.
So what's the point of this article? Why are we taking time to learn a process statisticians don't actually use? The answer is that learning to do the calculations by hand will give us insight into how standard deviation really works. This insight is valuable. Instead of viewing standard deviation as some magical number our spreadsheet or computer program gives us, we'll be able to explain where that number comes from.

Overview of how to calculate standard deviation

The formula for standard deviation (SD) is
SD=xx¯2n\Large\text{SD} = \sqrt{\dfrac{\sum\limits_{}^{}{{\lvert x-\bar{x}\rvert^2}}}{n}}
where sum means "sum of", x is a value in the data set, x¯\bar{x} is the mean of the data set, and n is the number of data points.
The formula may look confusing, but it will make sense after we break it down. In the coming sections, we'll walk through a step-by-step interactive example. Here's a quick preview of the steps we're about to follow:
Step 1: Find the mean.
Step 2: For each data point, find the square of its distance to the mean.
Step 3: Sum the values from Step 2.
Step 4: Divide by the number of data points.
Step 5: Take the square root.

Step-by-step interactive example for calculating standard deviation

First, we need a data set to work with. Let's pick something small so we don't get overwhelmed by the number of data points. Here's a good one:
6, comma, 2, comma, 3, comma, 1

Step 1: Finding x¯\goldD{\bar{x}} in xx¯2n\sqrt{\dfrac{\sum\limits_{}^{}{{\lvert x-\goldD{\bar{x}}\rvert^2}}}{n}}

In this step, we find the mean of the data set, which is represented by the variable x¯\bar{x}.
Fill in the blank.
x¯=\bar{x} =
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i

x¯=6+2+3+14=124=3\bar{x} = \dfrac{6+2 + 3 + 1}{4} = \dfrac{12}{4} = \blueD3

Step 2: Finding xx¯2\goldD{\lvert x - \bar{x} \rvert^2} in xx¯2n\sqrt{\dfrac{\sum\limits_{}^{}{\goldD{{\lvert x-\bar{x}}\rvert^2}}}{n}}

In this step, we find the distance from each data point to the mean (i.e., the deviations) and square each of those distances.
For example, the first data point is 6 and the mean is 3, so the distance between them is 3. Squaring this distance gives us 9.
Complete the table below.
Data point xSquare of the distance from the mean xx¯2\lvert x - \bar{x} \rvert^2
69
2
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i
3
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i
1
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i

Data point xDistance from the mean squared xx¯2\lvert x - \bar{x} \rvert^2
6open vertical bar, 6, minus, start color blueD, 3, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 3, start superscript, 2, end superscript, equals, 9
2open vertical bar, 2, minus, start color blueD, 3, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 1, start superscript, 2, end superscript, equals, 1
3open vertical bar, 3, minus, start color blueD, 3, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 0, start superscript, 2, end superscript, equals, 0
1open vertical bar, 1, minus, start color blueD, 3, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 2, start superscript, 2, end superscript, equals, 4

Step 3: Finding xx¯2\goldD{\sum\lvert x - \bar{x} \rvert^2} in xx¯2n\sqrt{\dfrac{\goldD{\sum\limits_{}^{}{{\lvert x-\bar{x}}\rvert^2}}}{n}}

The symbol sum means "sum", so in this step we add up the four values we found in Step 2.
Fill in the blank.
xx¯2=\sum\lvert x - \bar{x} \rvert^2 =
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i

Add up all of the squared distances from the data points to the mean from Step 2:
xx¯2=9+1+0+4=14\sum\lvert x - \bar{x} \rvert^2 = 9 + 1 + 0 + 4 = 14

Step 4: Finding xx¯2n\goldD{\dfrac{\sum\lvert x - \bar{x} \rvert^2}{n}} in xx¯2n\sqrt{\goldD{\dfrac{\sum\limits_{}^{}{{\lvert x-\bar{x}}\rvert^2}}{n}}}

In this step, we divide our result from Step 3 by the variable n, which is the number of data points.
Fill in the blank.
xx¯2n=\dfrac{\sum\lvert x - \bar{x} \rvert^2}{n} =
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i

Divide the sum from Step 3 by the number of data points left parenthesis, n, equals, 4, right parenthesis:
xx¯2n=144=3.5\dfrac{\sum\lvert x - \bar{x} \rvert^2}{n} =\dfrac{{14}}4 = {3.5}

Step 5: Finding the standard deviation xx¯2n\sqrt{\dfrac{\sum\limits_{}^{}{{\lvert x-\bar{x}\rvert^2}}}{n}}

We're almost finished! Just take the square root of the answer from Step 4 and we're done.
Fill in the blank.
Round your answer to the nearest hundredth.
SD=xx¯2n\text{SD} = \sqrt{\dfrac{\sum\limits_{}^{}{{\lvert x-\bar{x}\rvert^2}}}{n}} \approx
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i

Take the square root of the number we found in Step 4:
xx¯2n=3.51.87\sqrt{\dfrac{\sum\limits_{}^{}{{\lvert x-\bar{x}\rvert^2}}}{n}} = \sqrt{{3.5}} \approx 1.87
The standard deviation is 1, point, 87.
Yes! We did it! We successfully calculated the standard deviation of a small data set.

Summary of what we did

We broke down the formula into five steps:
Step 1: Find the mean x¯\bar{x}.
x¯=6+2+3+14=124=3\bar{x} = \dfrac{6+2 + 3 + 1}{4} = \dfrac{12}{4} = \blueD3
Step 2: Find the square of the distance from each data point to the mean xx¯2\lvert x-\bar{x}\rvert^2.
xxx¯2\lvert x - \bar{x} \rvert^2
6open vertical bar, 6, minus, start color blueD, 3, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 3, start superscript, 2, end superscript, equals, 9
2open vertical bar, 2, minus, start color blueD, 3, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 1, start superscript, 2, end superscript, equals, 1
3open vertical bar, 3, minus, start color blueD, 3, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 0, start superscript, 2, end superscript, equals, 0
1open vertical bar, 1, minus, start color blueD, 3, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 2, start superscript, 2, end superscript, equals, 4
Steps 3, 4, and 5:
SD=xx¯2n=9+1+0+44=144        Sum the squares of the distances (Step 3).=3.5        Divide by the number of data points (Step 4).1.87        Take the square root (Step 5).\begin{aligned} \text{SD} &= \sqrt{\dfrac{\sum\limits_{}^{}{{\lvert x-\bar{x}\rvert^2}}}{n}}\\\\\\\\ &= \sqrt{\dfrac{9 + 1 + 0 + 4}{4}} \\\\\\\\ &= \sqrt{\dfrac{{14}}{4}} ~~~~~~~~\small \text{Sum the squares of the distances (Step 3).} \\\\\\\\ &= \sqrt{{3.5}} ~~~~~~~~\small \text{Divide by the number of data points (Step 4).} \\\\\\\\ &\approx 1.87 ~~~~~~~~\small \text{Take the square root (Step 5).} \end{aligned}

Try it yourself

Here's a reminder of the formula:
SD=xx¯2n\Large\text{SD} = \sqrt{\dfrac{\sum\limits_{}^{}{{\lvert x-\bar{x}\rvert^2}}}{n}}
And here's a data set:
1, comma, 4, comma, 7, comma, 2, comma, 6
Find the standard deviation of the data set.
Round your answer to the nearest hundredth.
S, D, equals
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3, slash, 5
  • a simplified improper fraction, like 7, slash, 4
  • a mixed number, like 1, space, 3, slash, 4
  • an exact decimal, like 0, point, 75
  • a multiple of pi, like 12, space, p, i or 2, slash, 3, space, p, i

Find the mean

x¯=1+4+7+2+65=205=4\bar{x} = \dfrac{1 + 4 + 7 + 2 + 6}{5} = \dfrac{20}{5} = \blueD4

Find the square of the distances from each of the data points to the mean

xxx¯2\lvert x - \bar{x} \rvert^2
1open vertical bar, 1, minus, start color blueD, 4, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 3, start superscript, 2, end superscript, equals, 9
4open vertical bar, 4, minus, start color blueD, 4, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 0, start superscript, 2, end superscript, equals, 0
7open vertical bar, 7, minus, start color blueD, 4, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 3, start superscript, 2, end superscript, equals, 9
2open vertical bar, 2, minus, start color blueD, 4, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 2, start superscript, 2, end superscript, equals, 4
6open vertical bar, 6, minus, start color blueD, 4, end color blueD, close vertical bar, start superscript, 2, end superscript, equals, 2, start superscript, 2, end superscript, equals, 4

Apply the formula

SD=xx¯2n=9+0+9+4+45=265=5.22.28\begin{aligned} \text{SD} &= \sqrt{\dfrac{\sum\limits_{}^{}{{\lvert x-\bar{x}\rvert^2}}}{n}} \\\\\\\\ &= \sqrt{\dfrac{9 + 0 + 9 + 4 + 4}{5}} \\\\\\\\ &= \sqrt{\dfrac{26}{5}}\\\\\\\\ &= \sqrt{5.2}\\\\\\\\ &\approx 2.28\end{aligned}

The answer

The standard deviation is approximately 2, point, 28.