Standard Deviation Calculator

Paste a list of numbers to get the population and sample standard deviation, with every step of the formula shown: mean, deviations, squared deviations, sum of squares, variance, and the final square root. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the population standard deviation is exactly 2 — a classic reference example you can check by hand.

2

Population standard deviation (σ) of 8 values

Mean: 5

Sum of squared deviations: 32

Population variance (σ²): 4 · Population SD (σ): 2

Sample variance (s²): 4.5714 · Sample SD (s): 2.1381

Show the formula, step by step
Step 1 — Sum: 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40
Step 2 — Mean: 40 ÷ 8 = 5
Step 3 — Deviations from the mean (x − mean): -3, -1, -1, -1, 0, 0, 2, 4
Step 4 — Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16
Step 5 — Sum of squared deviations: 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32
Step 6a — Population variance (σ²) = sum of squares ÷ n = 32 ÷ 8 = 4
Step 6b — Population standard deviation (σ) = √4 = 2
Step 7a — Sample variance (s²) = sum of squares ÷ (n − 1) = 32 ÷ 7 = 4.5714
Step 7b — Sample standard deviation (s) = √4.5714 = 2.1381
Show per-value deviations table
xx − mean(x − mean)²
2-39
4-11
4-11
4-11
500
500
724
9416

Population divides by n; sample divides by n − 1 (Bessel's correction). How we calculate →

The standard deviation formula, step by step

Standard deviation measures how spread out a data set is around its mean. For the data set 2, 4, 4, 4, 5, 5, 7, 9 (n = 8): Step 1 — sum the values: 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40. Step 2 — divide by n to get the mean: 40 ÷ 8 = 5.

Step 3 — subtract the mean from each value (the "deviations"): -3, -1, -1, -1, 0, 0, 2, 4. Step 4 — square each deviation (this makes every value positive and weights larger gaps more heavily): 9, 1, 1, 1, 0, 0, 4, 16. Step 5 — add the squared deviations together: 32.

Step 6 — divide by n (population) or n − 1 (sample) to get the variance, then step 7 — take the square root to get back to the original units. Population variance = 32 ÷ 8 = 4, so population standard deviation = √4 = 2.

Population vs. sample standard deviation — which divisor to use

The only difference between the population and sample formulas is the divisor in step 6: population divides by n, sample divides by n − 1 (called Bessel's correction). For the same data set above: sample variance = 32 ÷ (8 − 1) = 32 ÷ 7 = 4.5714, giving a sample standard deviation of √4.5714 = 2.1381 — noticeably higher than the population figure of 2.

Use population standard deviation when your numbers ARE the entire group you care about. Use sample standard deviation when your numbers are a smaller sample meant to estimate a larger population — dividing by n − 1 instead of n corrects for the fact that a sample systematically understates the true spread of the population it came from.

Why square the deviations instead of just averaging the distances?

A simpler-looking approach — average the raw deviations from the mean — always comes out to zero, because the mean is defined as the balancing point of the data (deviations above and below always cancel out exactly). Squaring each deviation before averaging fixes this: every squared value is positive, so the average (the variance) is a genuine, non-zero measure of spread. Taking the square root at the end (the standard deviation) brings the units back to the same scale as the original data — variance alone is in "squared units," which isn't directly interpretable.

What counts as a "low" or "high" standard deviation?

There's no universal cutoff — it depends entirely on the scale and context of your data. A standard deviation is "low" relative to the mean when values cluster tightly around it, and "high" when they're spread widely. A common way to compare across different data sets is the coefficient of variation (standard deviation ÷ mean × 100): for the example above, 2 ÷ 5 × 100 = 40% — a relative measure that lets you compare spread between data sets with very different means.

Frequently asked questions

What is the formula for standard deviation?

Population: σ = √(Σ(x − mean)² ÷ n). Sample: s = √(Σ(x − mean)² ÷ (n − 1)). Both start by finding the mean, then the squared deviations from it, then average those squared deviations (the variance), then take the square root.

How do I calculate standard deviation step by step?

1) Find the mean. 2) Subtract the mean from each value. 3) Square each of those deviations. 4) Add the squared deviations together. 5) Divide by n (population) or n − 1 (sample) to get the variance. 6) Take the square root of the variance. For 2, 4, 4, 4, 5, 5, 7, 9, that's mean = 5, sum of squares = 32, population variance = 4, population sd = 2.

What is the difference between population and sample standard deviation?

Population standard deviation divides the sum of squared deviations by n (the full count); sample standard deviation divides by n − 1 instead, which corrects for a sample tending to underestimate the true population spread. For the reference data set above, population sd is 2 but sample sd is 2.1381 — always a bit higher.

Why do we square the deviations from the mean?

Because the raw deviations from the mean always sum to zero (positive and negative differences cancel out exactly, by definition of the mean). Squaring makes every value positive before averaging, so the result is a real, non-zero measure of spread.

What does a standard deviation of 0 mean?

A standard deviation of 0 means every value in the data set is identical — there's no spread at all. Any data set with at least two different values will have a standard deviation greater than 0.

What is variance, and how is it different from standard deviation?

Variance is the average of the squared deviations from the mean — it's the number you get right before the final square root step. Standard deviation is the square root of variance, which converts the units back to the original scale of the data (variance is in "squared units" and isn't directly comparable to your raw numbers).

Can standard deviation be negative?

No. Standard deviation is a square root of an average of squared (always non-negative) numbers, so it's always zero or positive. A negative number reported as a "standard deviation" always indicates a calculation error.

Researched & verified by the Calcuris Data & Research Team. How we build and check our tools →