Free standard deviation calculator. Paste numbers for the mean, variance, and both population (n) and sample (n-1) standard deviation, with worked steps.
Paste your numbers into the box — separated by commas, spaces or new lines, whichever way you happen to have them — and the results appear instantly. You get the count, the sum, the mean, the sum of squared deviations, both variances, and both standard deviations: population and sample, side by side, always. Below that is a step-by-step breakdown with a row for every value in your data set showing its deviation from the mean and that deviation squared, so you can check your own working against the calculator's line by line.
That last part is the point. Most standard deviation calculators hand you a single number and leave you to trust it. If you are checking homework, marking a lab report, or trying to work out why your answer differs from the textbook's, one number tells you nothing about where you went wrong. Seeing the mean, then each deviation, then each square, then the sum, then the two divisions, lets you find the exact step where your arithmetic and the calculator's parted ways.
Everything is computed in your browser. The numbers you paste — grades, salaries, patient measurements, test results — are never uploaded anywhere.
This is the one thing to get right, and it is where most wrong answers come from. There are two standard deviation formulas. They are identical except for the very last division:
Which one is correct has nothing to do with how many numbers you have and everything to do with what those numbers are.
Use the population formula when your numbers are the entire group you care about. Every student in one class, when the class is the thing you are describing. Every transaction last month, when last month is the question. Every one of the twelve machines on the factory floor. There is nothing outside your data set that you are trying to say anything about, so there is nothing to estimate — you can simply describe what you have.
Use the sample formula when your numbers are a subset drawn from a larger group, and you want to say something about that larger group. Forty customers surveyed out of thousands. Thirty widgets tested from a production run of ten thousand. A hundred people polled to describe a city. The data is a window onto something bigger, and you are estimating.
It is not an arbitrary fudge. When you compute deviations from the sample mean rather than the true population mean, the deviations come out systematically too small — the sample mean is, by construction, the point that minimises the sum of squared deviations for that particular sample. Dividing by n would therefore underestimate the population's spread every time, not occasionally. Dividing by n − 1 corrects that bias. This is Bessel's correction, and the intuition behind it is degrees of freedom: once you know the mean and n − 1 of the values, the last value is determined, so only n − 1 of the deviations are free to vary.
The correction matters most when n is small. With four values you are dividing by 3 instead of 4 — a substantial difference. With four hundred you are dividing by 399 instead of 400, and the two answers are nearly identical. That is why the mistake often goes unnoticed in large data sets and produces visibly wrong homework answers in small ones.
When you genuinely cannot tell which applies, the sample formula is the safer default. Most real-world statistics, and nearly every spreadsheet formula people reach for by habit, is sample-based. It is also the conservative choice: it always gives the larger number, so you are not understating uncertainty. That said, if a textbook question says "the heights of all five children in the family", it means all five, and it wants σ.
| Formula | Excel / Google Sheets | Divides by | Use when |
|---|---|---|---|
| Population σ | STDEV.P (older: STDEVP) | n | Your data is the whole group |
| Sample s | STDEV.S (older: STDEV) | n − 1 | Your data is a sample of a larger group |
| Population variance σ² | VAR.P | n | As above, before the square root |
| Sample variance s² | VAR.S | n − 1 | As above, before the square root |
Note the trap in the old names: plain STDEV is the sample version, and STDEVP is the population one. People reasonably assume the unadorned name is the plain, obvious, divide-by-n formula. It is not. If your spreadsheet answer disagrees with this calculator, check which of the two you called before you check anything else — and note that this page shows both, so one of them will match.
Take the classic small data set: 2, 4, 4, 4, 5, 5, 7, 9. There are eight values, so n = 8.
Step 1 — find the mean. Add the values and divide by the count.
Σx = 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40
x̄ = 40 / 8 = 5
Step 2 — subtract the mean from each value, then square the result. The squaring is what stops the positive and negative deviations cancelling out; without it, the deviations from the mean always sum to exactly zero, which is why "average deviation" as a naive quantity is useless.
| x | x − x̄ | (x − x̄)² |
|---|---|---|
| 2 | −3 | 9 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
Step 3 — add up the squared deviations.
Σ(x − x̄)² = 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32
Step 4 — divide. This is where the two formulas split.
Population: σ² = 32 / 8 = 4
Sample: s² = 32 / 7 = 4.5714
Step 5 — take the square root.
Population: σ = √4 = 2
Sample: s = √4.5714 = 2.1381
Same eight numbers, two defensible answers, and they differ by roughly seven per cent. Enter this data set into the calculator (it is one of the example buttons) and every one of those intermediate figures appears on screen, in that order.
The set 4, 8, 15, 16, 23, 42 has n = 6 and sums to 108, so the mean is 18. The deviations are −14, −10, −3, −2, 5 and 24; squared, they are 196, 100, 9, 4, 25 and 576, which total 910.
910 / 6 = 151.6667, so σ = 12.3153910 / 5 = 182, so s = 13.4907Notice how one value does most of the work: the 42 alone contributes 576 of the 910, well over half the total spread, from a single observation out of six.
Variance is the average squared deviation. Standard deviation is its square root. They are two views of one quantity, and the calculator shows both because different courses and different fields ask for different ones.
Variance is the more convenient quantity mathematically — variances of independent things add together, standard deviations do not — which is why it appears throughout statistical theory, in ANOVA, in regression, in error propagation. But it is in squared units, and squared units are close to meaningless to a reader. A variance of 4 "square marks" or 25 "square dollars" describes nothing anyone can picture.
Standard deviation converts back to the original units, which is why it is what gets reported. If exam scores have a standard deviation of 12 marks, that is 12 marks — directly comparable to the scores themselves and to the mean. When you are writing up a result, report the standard deviation; when you are doing algebra, work with the variance.
Standard deviation measures spread: how far, typically, the values sit from their mean. A small value means the data clusters tightly; a large one means it is scattered. Two data sets can share an identical mean and describe completely different realities — a class where everyone scored around 70 and a class where half scored 40 and half scored 100 both average 70, and only the standard deviation separates them.
Because deviations are squared, a value far from the mean contributes disproportionately. Doubling how far a point sits from the mean quadruples what it adds to the total. This makes standard deviation genuinely sensitive to outliers, which is worth demonstrating rather than asserting.
Take the tightly clustered set 9, 10, 11, 10, 9, 11, 10. It has n = 7, sums to 70, mean 10, and the squared deviations total just 4. The population standard deviation is √(4/7) = 0.7559 and the sample standard deviation is √(4/6) = 0.8165. Tight, as expected.
Now add a single value of 40. The set becomes eight values summing to 110, and the mean jumps from 10 to 13.75. The squared deviations now total 791.5, giving a population standard deviation of 9.9467 and a sample standard deviation of 10.6335 — more than thirteen times the original. One observation out of eight did that.
The lesson is not that standard deviation is broken. It is that you should look at your data before you summarise it, and check whether an extreme value is a genuine observation or a typo, a unit mix-up, or a sensor glitch. If it is real and you still want a spread measure that shrugs it off, the interquartile range is the usual alternative. If it is a data-entry error, fix it — and here the calculator's per-value table earns its place, because the row with the enormous squared deviation points straight at the culprit.
If you are checking a homework answer and the number does not match, work down the step list: is your mean right, are your deviations right, is your sum of squares right, and did you divide by n or by n − 1? In practice, the answer is that last one far more often than any of the others.
They use different divisors. Population standard deviation divides the sum of squared deviations by N (the total count) and is used when your data is the entire group you care about. Sample standard deviation divides by n − 1 (Bessel's correction) and is used when your data is a sample meant to estimate a larger population. The n − 1 version is slightly larger and is the more common choice in real-world statistics.
Five steps: (1) find the mean of your values; (2) subtract the mean from each value and square the result; (3) add up those squared deviations; (4) divide by N for the population or by n − 1 for a sample to get the variance; (5) take the square root of the variance. This calculator shows all five steps with your actual numbers.
It tells you how spread out the data is around the average. A low standard deviation means most values are close to the mean; a high one means they are widely scattered. For data that follows a normal distribution, about 68% of values fall within one standard deviation of the mean, 95% within two, and 99.7% within three.
Standard deviation is simply the square root of the variance. Variance is the average squared distance from the mean and is expressed in squared units, which is hard to interpret. Taking the square root returns the spread to the original units of your data, which is why standard deviation is usually reported instead of variance.
It can be zero — that happens only when every value in the data set is identical, so there is no spread at all. It can never be negative, because it is a square root of an average of squared (non-negative) numbers. The smallest possible standard deviation is zero.