Skip to content

How to Calculate Standard Deviation Step by Step

Learn how to calculate standard deviation step by step with clear formulas and 3 worked examples — a simple guide for students plus a free statistics solver.

If a set of numbers has ever left you wondering “how spread out are these, really?”, then standard deviation is the tool you have been looking for. It is one of the most useful ideas in all of statistics, and it shows up everywhere from science labs and sports stats to test scores and weather reports. The good news is that the math behind it is just a sequence of small, friendly steps you already know how to do.

In this guide you will learn exactly how to calculate standard deviation by hand, what each symbol in the formula means, and how to tell the difference between a population and a sample. We will walk through three fully worked examples, point out the mistakes that trip students up most often, and finish with a quick reference you can keep nearby. If you want to check your answers as you practice, our free statistics solver shows the full solution instantly.

By the end, you will be able to look at any list of numbers and confidently report how much they vary around the average. Let’s start with the big idea.

What Is Standard Deviation?

Standard deviation is a single number that measures how spread out a set of data is. It tells you, on average, how far each value sits from the mean (the average) of the data set.

  • A small standard deviation means the values are clustered tightly around the mean. The data is consistent and predictable.
  • A large standard deviation means the values are scattered widely. The data is more variable.

Imagine two students who both average 80 percent on their quizzes. One scores 78, 80, 82 every time, while the other scores 60, 80, 100. They have the same mean, but the second student is far less consistent. Standard deviation captures that difference in a single value, which is why it is so powerful.

Key idea

The mean tells you where the center of your data is. The standard deviation tells you how tightly the data is packed around that center.

Standard Deviation vs. Variance

Standard deviation has a close cousin called variance. Variance is the average of the squared distances from the mean, and standard deviation is simply the square root of the variance.

So why have both? Variance is useful in many formulas, but its units are squared (for example, “points squared”), which is hard to interpret. Taking the square root brings the measure back to the original units, so standard deviation is usually the number we report. In short: find the variance first, then square-root it to get the standard deviation.

Population vs. Sample Standard Deviation

Before you calculate anything, you must answer one question: Am I working with the whole population or just a sample of it? This single decision changes one number in the formula.

  • A population includes every member of the group you care about — for example, the test scores of all students in one class.
  • A sample is a smaller selection taken from a larger population — for example, 30 students chosen to represent an entire school.

When you have a sample, you divide by \( n - 1 \) instead of \( n \). This adjustment is called Bessel’s correction, and it makes the sample standard deviation a better estimate of the true population value. Here are the two formulas side by side.

TypeSymbolFormulaDivide by
Population\( \sigma \)\( \sigma = \sqrt{\dfrac{\sum (x_i - \mu)^2}{N}} \)\( N \)
Sample\( s \)\( s = \sqrt{\dfrac{\sum (x_i - \bar{x})^2}{n - 1}} \)\( n - 1 \)

Quick rule

If your data is all the values that exist, use the population formula (divide by \( N \)). If your data is a subset used to estimate a bigger group, use the sample formula (divide by \( n - 1 \)). When a homework problem does not specify, schools most often expect the sample version.

The Standard Deviation Formula Explained

The formulas above can look intimidating, but every symbol has a plain-English meaning. Here is what each part stands for.

SymbolMeaning
\( x_i \)Each individual value in the data set
\( \mu \)The population mean (average)
\( \bar{x} \)The sample mean (average)
\( N \)The number of values in a population
\( n \)The number of values in a sample
\( \sum \)“Add up all of these” (the sum)
\( \sigma,\ s \)Population and sample standard deviation

Read the population formula out loud and it almost explains itself: “Take each value, subtract the mean, square the result, add all those squares together, divide by how many values there are, and take the square root.” That sentence is the method.

How to Calculate Standard Deviation Step by Step

No matter which formula you use, the procedure is the same. Here is exactly how to calculate standard deviation in six clear steps.

  1. Find the mean. Add all the values and divide by how many there are.
  2. Find each deviation. Subtract the mean from every single value.
  3. Square each deviation. Multiply each result from Step 2 by itself. This removes the negative signs.
  4. Add up the squared deviations. This sum is sometimes called the “sum of squares.”
  5. Divide to get the variance. Divide by \( N \) for a population, or by \( n - 1 \) for a sample.
  6. Take the square root. The square root of the variance is your standard deviation.

Study tip

Build a small table with columns for the value, the deviation, and the squared deviation. Filling in the table keeps every number organized and makes arithmetic mistakes far less likely.

Now let’s put these steps to work with real numbers.

Worked Example 1: Population Standard Deviation

Suppose you record the number of hours a single machine ran each day this week, and this is the entire data set you care about (a population):

\( 2,\ 4,\ 4,\ 4,\ 5,\ 5,\ 7,\ 9 \)

Step 1 — Find the mean. There are \( N = 8 \) values.

$$ \mu = \frac{2 + 4 + 4 + 4 + 5 + 5 + 7 + 9}{8} = \frac{40}{8} = 5 $$

Step 2 and Step 3 — Find each deviation and square it.

Value \( x_i \)Deviation \( x_i - \mu \)Squared \( (x_i - \mu)^2 \)
2-39
4-11
4-11
4-11
500
500
724
9416

Step 4 — Add the squared deviations.

$$ \sum (x_i - \mu)^2 = 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32 $$

Step 5 — Divide by \( N \) to get the variance.

$$ \sigma^2 = \frac{32}{8} = 4 $$

Step 6 — Take the square root.

$$ \sigma = \sqrt{4} = 2 $$
AnswerThe population standard deviation is \( \sigma = 2 \) hours.

On average, each day’s run time sits about 2 hours away from the weekly average of 5 hours.

Worked Example 2: Sample Standard Deviation (Test Scores)

Now imagine you pick 5 students from a large class to estimate how varied everyone’s scores are. Because these 5 are a sample of the whole class, you will divide by \( n - 1 \). The scores are:

\( 85,\ 90,\ 78,\ 92,\ 88 \)

Step 1 — Find the mean. Here \( n = 5 \).

$$ \bar{x} = \frac{85 + 90 + 78 + 92 + 88}{5} = \frac{433}{5} = 86.6 $$

Step 2 and Step 3 — Deviations and squared deviations.

Value \( x_i \)Deviation \( x_i - \bar{x} \)Squared \( (x_i - \bar{x})^2 \)
85-1.62.56
903.411.56
78-8.673.96
925.429.16
881.41.96

Step 4 — Add the squared deviations.

$$ \sum (x_i - \bar{x})^2 = 2.56 + 11.56 + 73.96 + 29.16 + 1.96 = 119.2 $$

Step 5 — Divide by \( n - 1 \) to get the sample variance.

$$ s^2 = \frac{119.2}{5 - 1} = \frac{119.2}{4} = 29.8 $$

Step 6 — Take the square root.

$$ s = \sqrt{29.8} \approx 5.46 $$
AnswerThe sample standard deviation is \( s \approx 5.46 \) points.

Want to skip the arithmetic?

Once you understand the steps, you can check any data set in seconds. Solve it instantly with our step-by-step statistics calculator and compare your work to the full solution.

Worked Example 3: Comparing Two Data Sets

Standard deviation is at its most useful when you compare groups. Suppose two basketball players each scored these points across five games, and we treat each player’s games as a complete population.

Player A: \( 10,\ 12,\ 11,\ 13,\ 14 \)    Player B: \( 5,\ 20,\ 8,\ 18,\ 9 \)

Notice that both players have the same total and the same mean.

$$ \mu_A = \frac{10 + 12 + 11 + 13 + 14}{5} = \frac{60}{5} = 12 \qquad \mu_B = \frac{5 + 20 + 8 + 18 + 9}{5} = \frac{60}{5} = 12 $$

Player A — squared deviations from 12:

$$ (-2)^2 + (0)^2 + (-1)^2 + (1)^2 + (2)^2 = 4 + 0 + 1 + 1 + 4 = 10 $$ $$ \sigma_A = \sqrt{\frac{10}{5}} = \sqrt{2} \approx 1.41 $$

Player B — squared deviations from 12:

$$ (-7)^2 + (8)^2 + (-4)^2 + (6)^2 + (-3)^2 = 49 + 64 + 16 + 36 + 9 = 174 $$ $$ \sigma_B = \sqrt{\frac{174}{5}} = \sqrt{34.8} \approx 5.90 $$
AnswerPlayer A: \( \sigma_A \approx 1.41 \). Player B: \( \sigma_B \approx 5.90 \).

Even though both players average 12 points per game, Player A is far more consistent because the standard deviation is much smaller. Player B’s scores swing wildly from game to game. This is exactly the kind of insight the mean alone could never give you.

Common Mistakes to Avoid

Standard deviation is not hard, but a few small slip-ups account for most wrong answers. Watch out for these.

Common mistake

Forgetting to square the deviations. If you skip the squaring step, the positive and negative deviations cancel out and the sum becomes zero every time. Squaring is what keeps the spread positive.

Common mistake

Using \( N \) when you should use \( n - 1 \). Mixing up the population and sample formulas is the number one error. Decide which one applies before you start dividing.

Common mistake

Stopping at the variance. The variance is only Step 5. Always remember the final square root, or your answer will be in squared units and far too large.

One more subtle point: standard deviation can never be negative. Because it is the square root of an average of squares, the smallest value it can ever take is zero, which happens only when every data point is identical. If you get a negative result, retrace your steps.

Tips for Calculating Standard Deviation Confidently

Here are a few habits that make the process smoother, whether you work by hand or with a calculator.

  • Always find the mean first and write it down. Every later step depends on it, so a wrong mean ruins everything.
  • Keep extra decimal places until the end. Rounding the mean early can throw off your final answer. Round only the last result.
  • Use a table. Columns for value, deviation, and squared deviation keep your work tidy and easy to check.
  • Sanity-check the size. The standard deviation should be smaller than the full range of your data. If it is larger, something went wrong.
  • Practice both formulas. Knowing when to use \( N \) versus \( n - 1 \) is half the battle.

If you are still building comfort with averages, it helps to review how to calculate mean, median, and mode first, since the mean is the foundation of every standard deviation calculation. From there, exploring more guides in our math learning blog will round out your statistics toolkit.

Quick Reference Summary

Keep this checklist handy whenever you tackle a standard deviation problem.

StepWhat you do
1Find the mean of the data
2Subtract the mean from each value (deviations)
3Square each deviation
4Add up all the squared deviations
5Divide by \( N \) (population) or \( n - 1 \) (sample) to get the variance
6Take the square root to get the standard deviation

Conclusion

Standard deviation turns a messy list of numbers into a single, meaningful measure of spread. Once you internalize the six-step routine — mean, deviations, squares, sum, divide, square root — you can handle any data set with confidence, and you will understand why the answer matters, not just how to get it. Remember to choose the right formula for a population or a sample, and never skip the final square root.

Ready to practice? Try a few problems on your own, then confirm your results with our free statistics solver, which lays out every step so you can spot exactly where to improve. For more clear, example-driven tutorials, browse the rest of our math guides and study resources. The more you practice, the more these calculations will feel like second nature.