What the standard deviation calculator does
The standard deviation calculator turns a list of numbers into a set of figures that describe how spread out your data is. Paste in any set of values — test scores, measurements, prices, returns, anything numeric — choose whether they’re a sample or a population, and the calculator returns the count, sum, mean, variance and standard deviation, plus the standard error of the mean.
You don’t have to pick one interpretation and lose the other: both the sample standard deviation (s) and the population standard deviation (σ) are always shown, side by side, however you set the switch. The switch only decides which one becomes the highlighted, headline figure — useful, because mixing the two up is the single most common mistake people make with this statistic.
Turn on “show calculation steps” and you get a row-by-row table of every value, its deviation from the mean, and that deviation squared — the same arithmetic the calculator does internally, laid out so you can check it or use it as a worked example.
How to use the calculator
- Enter your data. Type or paste your numbers into the values field, separated by spaces, commas, semicolons, or new lines — for example
2, 4, 4, 4, 5, 5, 7, 9. Blank entries are ignored automatically. - Choose sample or population. Pick “sample” if your numbers are a subset of a bigger group you’re trying to draw conclusions about (a survey, a test batch, a handful of measurements). Pick “population” if your numbers are the entire group you care about (every student in one class, every unit produced this week).
- Read the result. The headline standard deviation follows whichever mode you picked, and both the sample and population figures are shown underneath it, along with variance, mean, sum, count, and the standard error of the mean.
- Optional: show the calculation steps. Open “show calculation steps” to see each value’s deviation from the mean and its square, plus the totals — handy for checking the arithmetic or following along by hand.
How standard deviation is calculated: sample vs. population
Every calculation starts the same way, whichever mode you pick:
- Count the values (n) and add them up (sum).
- Divide the sum by n to get the mean.
- For each value, subtract the mean to get its deviation, then square that deviation.
- Add up all the squared deviations to get the sum of squares.
From there, the two modes divide by a different number:
Population standard deviation (σ) — use this when your data is the complete group you’re interested in:
σ² = (sum of squares) ÷ n, and σ = √σ²
Sample standard deviation (s) — use this when your data is a sample drawn from a larger population you’re estimating:
s² = (sum of squares) ÷ (n − 1), and s = √s²
That n − 1 is Bessel’s correction. A sample’s own mean is, by construction, the value that minimises the spread within that specific sample — so measuring deviations from it and dividing by n would systematically understate the true population variance. Dividing by n − 1 instead corrects that bias. It’s why the sample standard deviation is always a little larger than the population standard deviation for the same data — and why you need at least 2 values for it to be defined at all (with n = 1, n − 1 = 0, and dividing by zero has no answer).
Step-by-step example
Take the classic data set 2, 4, 4, 4, 5, 5, 7, 9 (n = 8):
- Sum = 2+4+4+4+5+5+7+9 = 40. Mean = 40 ÷ 8 = 5.
- Deviations from the mean: −3, −1, −1, −1, 0, 0, 2, 4.
- Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16.
- Sum of squares = 32.
- Population variance = 32 ÷ 8 = 4; population standard deviation = √4 = 2.
- Sample variance = 32 ÷ 7 ≈ 4.5714; sample standard deviation = √4.5714 ≈ 2.1381.
- Standard error of the mean = 2.1381 ÷ √8 ≈ 0.7559.
So for the same eight numbers, the population standard deviation is exactly 2, the sample standard deviation is about 2.1381, and both appear on the calculator at once — labelled so you always know which is which.
A quick note on why the calculator computes the mean first and the deviations second, rather than a one-step “sum of squares” shortcut some textbooks show: with values that are all close to a huge common number (say, everything near 1,000,000,010), the shortcut formula subtracts two enormous, nearly identical numbers and can lose so much precision that it produces a negative variance — which is mathematically impossible. Computing the mean first and then squaring the deviations from it avoids that trap entirely and always gives a correct, non-negative result.
Reading the result: variance, mean, and standard error (SEM)
Variance is standard deviation squared — the same measure of spread, in squared units. It’s mathematically central (it’s what the two-pass calculation actually produces before the square root), but it’s harder to interpret directly because its units don’t match your data: if your values are in kilograms, variance is in kilograms squared. Standard deviation, being back in the original units, is the one most people read and compare.
Mean and sum are just your data’s average and total — context for the spread figures, not a measure of spread themselves.
Standard error of the mean (SEM) is a different question altogether: not “how spread out is my data?” but “how precisely does my sample’s mean estimate the true mean of the whole population?” It’s calculated as the sample standard deviation divided by the square root of n. For the example above, SEM = 2.1381 ÷ √8 ≈ 0.7559 — noticeably smaller than the standard deviation itself, and that gap grows with larger samples. That’s exactly why SEM shouldn’t be swapped in for standard deviation when describing how varied your data is: doing so makes the data look artificially tighter than it really is. Use standard deviation to describe your data’s spread, and SEM only when you’re talking about the precision of an estimated mean.