iTutorzz
Back to Blog
Learning Tips Aug 15, 2026 8 min read

How to Calculate Standard Deviation (Step by Step)

Standard deviation measures how spread out data is. Here's the formula, the population vs sample difference, and a fully worked example.

Standard deviation measures how spread out a set of data is around its mean. To calculate it: find the mean, subtract it from each value and square the result, average those squared differences (that's the variance), then take the square root. A small standard deviation means the data is tightly clustered; a large one means it's widely spread.

This guide walks through the formula, the all-important population-versus-sample distinction, and a complete worked example you can follow with any dataset.

The formula

For a whole population, standard deviation (the Greek letter σ, 'sigma') is the square root of the average squared distance from the mean μ:

σ
=√(Σ(x − μ)2n)
Σ means 'add up', x is each value, μ is the mean, and n is how many values there are.

Population vs sample: the one difference that matters

There are two versions, and they differ in a single step - what you divide by. Use the population version when your data is the entire group; use the sample version when it's a sample of a bigger population:

Population (σ)Sample (s)
Divide the squared deviations bynn − 1
Use whenyou have every data pointyou have a sample of a larger group
Symbolσ (sigma)s
Dividing by n − 1 for a sample nudges the estimate slightly larger to account for only seeing part of the whole.

A worked example, step by step

Take five test scores: 14, 18, 20, 22 and 26. First, find the mean by adding them and dividing by how many there are:

μ
=14 + 18 + 20 + 22 + 265
=1005 = 20
The mean score is 20.

Next, subtract the mean from each score to get the deviations (−6, −2, 0, 2, 6), square them, add them up, and divide by n = 5 to get the variance - then square-root it:

σ2
=(−6)2 + (−2)2 + 02 + 22 + 625
=36 + 4 + 0 + 4 + 365 = 805 = 16
σ
=√16 = 4
The population standard deviation is 4 - scores typically sit about 4 points from the mean of 20.

If those five scores were only a sample of a larger class, you'd divide by n − 1 = 4 instead, which gives a slightly larger result:

s
=√(804)
=√20 ≈ 4.47
Same data, sample formula: divide by 4 instead of 5, giving s ≈ 4.47.

What the number actually tells you

Standard deviation is in the same units as your data, so here it's 4 points. It says the 'typical' distance of a score from the average is about 4. For data shaped like a normal (bell) curve, roughly 68% of values fall within one standard deviation of the mean and about 95% within two - which is why standard deviation, not just the average, is what tells you how consistent or variable a set of results really is.

Common mistakes (and how to avoid them)

  • Stopping at the variance - remember the final square root; the variance alone is in squared units.
  • Using n when you should use n − 1 (or vice versa) - decide first whether you have a population or a sample.
  • Forgetting to square the deviations, so positives and negatives cancel to zero.
  • Rounding the mean or deviations too early, which throws off the final answer.
  • Mixing up standard deviation and variance when reporting - state which one you mean.

How a tutor makes statistics click

Statistics rewards understanding what a number means, not just cranking a formula. A tutor can tie standard deviation back to the picture - spread around the mean - work examples with you live, and clear up the population-versus-sample confusion that trips up almost everyone. Our online statistics tutoring pairs you with a specialist who makes the reasoning behind the formulas make sense.

Because the mean and standard deviation underpin so much of statistics - from z-scores to confidence intervals - getting them solid early pays off across the whole course. Your first trial lesson is free.

The bottom line

Standard deviation is the square root of the average squared distance from the mean. Find the mean, square the deviations, average them (dividing by n for a population or n − 1 for a sample), and take the square root. The result tells you, in the data's own units, how spread out the values really are.

Frequently asked questions

How do you calculate standard deviation?+

Five steps: (1) find the mean of the data, (2) subtract the mean from each value to get its deviation, (3) square each deviation, (4) average the squared deviations - that's the variance, and (5) take the square root of the variance. The result is the standard deviation, which measures the typical distance of the values from the mean.

What is the difference between population and sample standard deviation?+

They differ in one step: population standard deviation (σ) divides the sum of squared deviations by n, the number of values, and is used when you have every member of the group. Sample standard deviation (s) divides by n − 1 instead, and is used when your data is a sample drawn from a larger population. Dividing by n − 1 makes the sample estimate slightly larger to correct for only seeing part of the whole.

What is the formula for standard deviation?+

For a population it is σ = √( Σ(x − μ)² / n ): the square root of the average squared distance from the mean μ. For a sample, replace μ with the sample mean and divide by n − 1 instead of n. Variance is the same expression without the square root.

What does standard deviation tell you?+

It tells you how spread out the data is around the mean. A small standard deviation means the values cluster tightly near the average; a large one means they're widely scattered. For data that follows a normal (bell-shaped) distribution, about 68% of values fall within one standard deviation of the mean and about 95% within two.

Is standard deviation the same as variance?+

They're closely related: variance is the average of the squared deviations, and standard deviation is the square root of the variance. Standard deviation is usually more useful to report because it's in the same units as the original data, whereas variance is in squared units.

Can a tutor help me with statistics?+

Yes - a tutor can connect the formula to what it means (spread around the mean), work examples with you step by step, and clear up the population-vs-sample confusion that trips up most students. Because so much of statistics builds on the mean and standard deviation, getting them solid early makes the rest of the course far easier.

Ready to put this into practice?

Work 1-on-1 with a vetted iTutorzz tutor - your first trial lesson is free.

Turn insight into real progress

Put these ideas to work with a tutor who personalizes every lesson - your first trial lesson is free.