Standard Deviation Calculator
Enter a data set to get its standard deviation and variance — as both a sample and a population — plus the mean, count, and sum.
The formulas
Standard deviation = √variance
1) Find the mean. 2) Subtract it from each value and square the result. 3) Average those squares (dividing by N for population, N−1 for sample). 4) Take the square root. The N−1 for samples corrects for the fact that a sample slightly underestimates the true spread.
Fund A's annual returns over 4 years: 6%, 8%, 8%, 10% — mean = 32 ÷ 4 = 8%. Squared deviations from the mean: 4, 0, 0, 4 → sum = 8. Sample variance = 8 ÷ 3 = 2.67, so sample standard deviation = √2.67 ≈ 1.63%.
Fund B's annual returns: 0%, 4%, 12%, 16% — same mean, 8%. Squared deviations: 64, 16, 16, 64 → sum = 160. Sample variance = 160 ÷ 3 = 53.3, so sample standard deviation = √53.3 ≈ 7.30%. Both funds averaged the same 8% return, but Fund B's returns are roughly 4.5× more volatile year to year — meaningfully higher risk for the same expected payoff.
Reading the result
Standard deviation is the standard measure of spread — how consistent or variable your data is. For roughly bell-shaped data, the empirical rule says ~68% of values lie within one standard deviation of the mean, ~95% within two, and ~99.7% within three. That makes it central to risk (a volatile investment has a high standard deviation of returns), quality control, and grading on a curve. Use sample (N−1) when your numbers are a sample of something larger — the usual case — and population (N) only when you have every member of the group. Pair with the average calculator for the mean and median.
What different standard deviation sizes mean
| Relative to the mean | Interpretation |
|---|---|
| Std dev < 10% of mean | Low variability — data clusters tightly, e.g. a stable dividend stock |
| Std dev 10%–30% of mean | Moderate variability — typical for a diversified stock portfolio |
| Std dev > 30% of mean | High variability — common for individual growth stocks or crypto assets |
Common standard deviation mistakes
- Using the population formula (÷N) on sample data. Most real-world data sets — like the fund returns above — are samples of a longer history, so the sample formula (÷N−1) is almost always the correct one to report.
- Comparing standard deviations across data sets with very different means. A standard deviation of 5 is huge for a mean of 10 but tiny for a mean of 10,000 — compare the coefficient of variation (std dev ÷ mean) instead when the scales differ.
- Treating a low standard deviation as automatically "better." Lower spread means more consistency, not necessarily a better outcome — a fund with steady 2% returns has low standard deviation but may underperform a volatile fund that averages 10%.
Frequently asked questions
What is standard deviation?
A measure of how spread out numbers are around the mean — the square root of variance.
Sample vs. population?
Population divides by N (whole group); sample divides by N−1 (a subset) — sample is more common.
What does it tell you?
For normal data, ~68% of values fall within 1 SD, 95% within 2, 99.7% within 3.
How is standard deviation used to compare investment risk?
It measures how much returns swing around the average — a higher standard deviation means a more volatile, riskier investment even with an identical average return.
Why divide by N−1 instead of N for a sample?
Dividing by N alone underestimates the true population spread since the sample mean fits the sample too well. N−1 (Bessel's correction) fixes that bias.
Related calculators
Last reviewed: September 2026.