Standard deviation measures how spread out a set of numbers is from its average — a small standard deviation means values cluster tightly around the mean, while a large one means values are scattered widely. It’s one of the most widely used measures of variability in statistics, and once you work through the calculation by hand a few times, the formula stops feeling abstract.
Table of Contents
ToggleWhy We Need Standard Deviation
Two datasets can have exactly the same mean, but look completely different in terms of spread:
Dataset A: 48, 49, 50, 51, 52 (mean = 50)
Dataset B: 10, 30, 50, 70, 90 (mean = 50)
Both datasets average to 50, but Dataset A is tightly clustered while Dataset B is widely scattered. The mean alone can’t capture this difference — that’s exactly what standard deviation is designed to measure.
The Step-by-Step Process
Let’s calculate the standard deviation of Dataset B: 10, 30, 50, 70, 90
Step 1: Calculate the mean
Mean = (10 + 30 + 50 + 70 + 90) ÷ 5 = 250 ÷ 5 = 50
Step 2: Find each value’s deviation from the mean
Subtract the mean from each data point:
10 - 50 = -40
30 - 50 = -20
50 - 50 = 0
70 - 50 = 20
90 - 50 = 40
Step 3: Square each deviation
Squaring removes negative signs (since a negative deviation is just as much “spread” as a positive one) and emphasizes larger deviations more than smaller ones:
(-40)² = 1600
(-20)² = 400
(0)² = 0
(20)² = 400
(40)² = 1600
Step 4: Calculate the average of the squared deviations (this is the variance)
Variance = (1600 + 400 + 0 + 400 + 1600) ÷ 5 = 4000 ÷ 5 = 800
Step 5: Take the square root of the variance
Standard Deviation = √800 ≈ 28.28
So Dataset B has a standard deviation of approximately 28.28.
For comparison, running the same steps on Dataset A (48, 49, 50, 51, 52) gives a standard deviation of about 1.41 — a much smaller number, correctly reflecting that those values are tightly clustered around the mean.
Why We Square the Deviations Instead of Just Averaging Them
A natural question: why not just average the deviations directly, without squaring? The problem is that deviations from the mean always sum to zero — the negative deviations (values below the mean) exactly cancel out the positive deviations (values above the mean), regardless of how spread out the data actually is.
-40 + -20 + 0 + 20 + 40 = 0
Squaring removes the negative signs (since squaring any negative number produces a positive result), letting deviations accumulate meaningfully instead of canceling out. Taking the square root at the end brings the measure back to the same units as the original data (since squaring temporarily changed the units).
Population vs Sample Standard Deviation
This is a common point of confusion: there are actually two slightly different formulas, depending on whether your data represents an entire population or a sample drawn from a larger population.
Population standard deviation — used when your data includes every member of the group you care about:
σ = √( Σ(x - μ)² / N )
Sample standard deviation — used when your data is a sample meant to estimate a larger population’s spread:
s = √( Σ(x - x̄)² / (n - 1) )
The only difference is the denominator: population divides by N (the full count), while sample divides by n – 1 (one less than the sample size). This adjustment, called Bessel’s correction, compensates for the fact that a sample tends to slightly underestimate the true population variability, so dividing by a smaller number (n-1 instead of n) slightly inflates the result to correct for that bias.
| Population | Sample | |
|---|---|---|
| Symbol | σ (sigma) | s |
| Denominator | N | n – 1 |
| Used when | You have data for the entire group of interest | Your data is a subset representing a larger population |
In most real research (surveys, experiments, studies), you’re working with a sample, so the sample standard deviation formula (dividing by n-1) is more commonly used.
What Standard Deviation Actually Tells You
For data that roughly follows a normal (bell-curve) distribution, standard deviation has a useful practical interpretation, sometimes called the empirical rule or 68-95-99.7 rule:
- About 68% of values fall within 1 standard deviation of the mean
- About 95% of values fall within 2 standard deviations of the mean
- About 99.7% of values fall within 3 standard deviations of the mean
So if a dataset has a mean of 100 and a standard deviation of 15, roughly 68% of values would typically fall between 85 and 115.
Common Student Mistakes
- Forgetting to square the deviations — leads to a sum of zero every time, since positive and negative deviations always cancel out
- Using the wrong denominator (N vs n-1) — mixing up population and sample formulas is one of the most frequent errors, and most real-world data analysis uses the sample formula
- Forgetting the final square root step — stopping at variance instead of completing the calculation to standard deviation, which is in different (squared) units
- Assuming standard deviation alone tells you if data is “normal” — the empirical rule (68-95-99.7) only applies to data that’s roughly normally distributed; for skewed data, these percentages don’t hold
Frequently Asked Questions
What’s the difference between variance and standard deviation? Variance is the average of the squared deviations from the mean; standard deviation is the square root of variance. Standard deviation is more commonly reported because it’s in the same units as the original data, while variance is in squared units.
When should I use n-1 instead of n in the formula? Use n-1 (sample standard deviation) whenever your data is a sample intended to represent a larger population — which is the case in most research and surveys. Use N (population standard deviation) only when your data genuinely includes every member of the group you’re studying.
What does a standard deviation of 0 mean? It means every value in the dataset is identical — there’s no variation at all.
Can standard deviation be negative? No — since it’s calculated from squared deviations and a square root, standard deviation is always zero or positive.