The formulas
Sample: s = √( Σ(x − x̄)² / (n − 1) )
Both start the same way: find the mean, square each value's distance from it, and sum. The only difference is the divisor — the population version divides by N, while the sample version divides by n − 1 (Bessel's correction), which compensates for the fact that a sample's own mean sits slightly too close to its data.
Worked example
For 4, 8, 6, 5, 3, 7 — the mean is 5.5. Squared deviations: 2.25, 6.25, 0.25, 0.25, 6.25, 2.25; their sum is 17.5. Population variance = 17.5 ÷ 6 = 2.917 → σ ≈ 1.708. Sample variance = 17.5 ÷ 5 = 3.5 → s ≈ 1.871.
Sample or population — which one?
Ask: does my data include every member of the group I'm describing? Grading one class and describing that class → population. Measuring 50 customers to describe all customers → sample (n − 1). In research and quality control, the sample version is what you want almost every time — it's also what spreadsheet STDEV/STDEV.S functions return.
Reading the number: the 68–95–99.7 rule
For roughly bell-shaped data, about 68% of values fall within 1 standard deviation of the mean, 95% within 2, and 99.7% within 3. If adult heights average 170 cm with σ = 7 cm, about 95% of people are between 156 and 184 cm. Values beyond 2–3 deviations are rare enough to deserve a second look — that's the basis of most outlier checks.
Frequently asked questions
What does standard deviation actually tell me?
The typical distance between a data point and the mean. Test scores with mean 75 and SD 3 cluster tightly (most scores 72–78); the same mean with SD 15 means wildly mixed results. Same average, very different stories.
Why divide by n − 1 for a sample?
A sample's deviations are measured from the sample's own mean, which by construction sits closer to the data than the true population mean. Dividing by n − 1 instead of n inflates the result just enough to remove that bias.
What's the relationship between variance and standard deviation?
Variance is the average squared deviation; standard deviation is its square root. Variance is mathematically convenient but lives in squared units (dollars², cm²); the standard deviation returns to the original units, which is why it's the number people quote.
Can standard deviation be zero or negative?
Never negative. It's zero only when every value is identical — no spread at all. Anything else produces a positive number.
Is a high standard deviation bad?
It's context. In manufacturing, high SD means inconsistency — bad. In an investment portfolio it means volatility — risk to manage. In creative ratings it may just mean polarizing work. SD describes spread; you supply the judgment.