Standard deviation is the most important measure of spread in statistics. It tells you how far data typically falls from the mean — and it's the foundation of the normal distribution, z-scores, and hypothesis testing.
Here's how to calculate it, step by step.
The Two Formulas
Population Standard Deviation:
σ = √[Σ(x − μ)² / n]
Sample Standard Deviation:
s = √[Σ(x − μ)² / (n − 1)]
The only difference: population divides by n, sample divides by n−1.
Step-by-Step Calculation
Example: Test scores 72, 85, 90, 65, 78
Step 1: Find the mean
μ = (72 + 85 + 90 + 65 + 78) / 5 = 390 / 5 = 78
Step 2: Find deviations from the mean
| Score (x) | x − μ | (x − μ)² | |-----------|-------|----------| | 72 | −6 | 36 | | 85 | +7 | 49 | | 90 | +12 | 144 | | 65 | −13 | 169 | | 78 | 0 | 0 |
Step 3: Sum the squared deviations
Σ(x − μ)² = 36 + 49 + 144 + 169 + 0 = 398
Step 4: Divide and take square root
- Population: σ = √(398/5) = √79.6 = 8.92
- Sample: s = √(398/4) = √99.5 = 9.97
When to Use Population vs. Sample
| Situation | Use This | Divide By | |-----------|----------|----------| | You have ALL data (entire class of 30) | Population (σ) | n = 30 | | You have a SAMPLE (30 out of 500) | Sample (s) | n−1 = 29 | | You're describing a dataset | Population | n | | You're estimating from a sample | Sample | n−1 |
Default rule: If in doubt, use the sample standard deviation. Most real-world data is sampled, not a complete population.
Why n−1? (Bessel's Correction)
Samples tend to underestimate population variance because the sample mean is closer to the sample values than the true population mean. Dividing by n−1 instead of n compensates:
- Dividing by n: biased (underestimates on average)
- Dividing by n−1: unbiased (correct on average)
The difference matters most for small samples. With n = 100, dividing by 100 vs 99 barely changes the result. With n = 5, it matters a lot.
Quick Mental Estimate
For roughly normal data:
σ ≈ Range / 4
Example: Data ranges from 20 to 60 → σ ≈ 40/4 = 10
This is a rough estimate — use it for sanity checks, not final answers.
The Trench Truth: The most common standard deviation mistake on exams: calculating the mean incorrectly. If your mean is wrong, every deviation is wrong, and the entire standard deviation is wrong. Always verify the mean first — it takes 10 seconds and saves the whole problem.
Calculate standard deviation instantly with our standard deviation calculator.
Related: Statistics Calculator · Derivative Calculator · Square Root Calculator
Discussion
Loading comments...