Standard Deviation Calculator

Paste or type a list of numbers and get the full descriptive-stats summary: count, sum, mean, median, min, max, range, variance and standard deviation. Sample and population versions are shown side by side, with the working laid out so you can audit every step.

Explain like I'm 5 (what even is this calculator?)

Standard deviation is one number that tells you how spread out a list of numbers is. A small standard deviation means the numbers are bunched together near the average. A large one means they are scattered. This page takes your numbers, works out the average, then measures how far each number sits from that average, and gives you a single tidy answer for the spread.

Calculate

Browser-only. The numbers you paste are processed in your browser. Nothing is uploaded.

Mix delimiters freely. Pasting a column from a spreadsheet works.

Treat the numbers as

Sample is the right default unless your numbers are every member of the group with no exceptions. Both values are shown either way; this toggle only changes which is highlighted.

Paste some numbers and press Calculate.

Prove it

Method: Welford's online algorithm for the running mean and the sum of squared deviations (M2). Population variance σ² = M2 / n; sample variance s² = M2 / (n − 1). Standard deviation is the square root of variance. Welford's avoids the precision loss that hits a naive Σx² − (Σx)²/n implementation when values are large and close together.

Useful? Save this calculator: press Ctrl + D to bookmark it.

What standard deviation actually tells you

The mean tells you where the centre of a dataset sits. The standard deviation tells you how tightly the rest of the data hugs that centre. Two groups can share the same mean and look completely different: a class where every pupil scored 70 has the same average as a class where half scored 50 and half scored 90, but the spread is wildly different. Standard deviation is the single number that captures that difference.

Mathematically it is the square root of the variance, which is itself the average squared distance of each data point from the mean. The squaring matters: it stops positive and negative deviations cancelling out, and it punishes outliers more than small wobbles. The square root at the end brings you back to the original units, so a standard deviation on test marks is itself a number of marks, not a number of marks-squared.

Sample versus population: the part most people get wrong

This is the bit that catches people out, and it is worth being explicit about. Population standard deviation, written as σ (sigma), divides the sum of squared deviations by n. Sample standard deviation, written as s, divides by n − 1. The substitution of n − 1 for n is called Bessel's correction, and there is a real reason for it.

When you compute a standard deviation, you need a mean to compare against. If your numbers are the entire population, you can compute the true mean and the true spread directly: divide by n. But if your numbers are a sample, the mean you have is itself an estimate from the data, and that estimate is, by construction, the value that minimises the sum of squared deviations for the sample. Using it as your reference mean makes the deviations slightly too small. To correct for that, you divide by n − 1 instead. The result is an unbiased estimate of the population variance.

The practical rule is simple. If your data is every member of the group, with no one left out, that is a population: use σ. Heights of every player on a single football team is a population if you only care about that team. If your data is a sample drawn from a larger group you cannot fully measure, that is a sample: use s. Heights of 30 randomly chosen Year 9 pupils, used to estimate the spread of all Year 9 pupils in the country, is a sample. Almost every real-world analysis is the second case, which is why s is the sensible default unless you can prove otherwise.

Common mistakes the calculator helps you avoid

Picking the wrong divisor. Old textbooks, and some basic calculators, only show population SD. If you are doing real statistical work on a sample, that result is biased low. This page always shows both, so you can see the size of the gap and pick the right one for the job.

Forgetting to square root the variance. Variance is in squared units, which makes it useless for talking about spread in plain English. The standard deviation is the square root of the variance, and that is the number you usually want to report.

Treating SD as a confidence interval. Standard deviation describes spread, not certainty. The standard error (SD divided by the square root of n) is a different thing, and confidence intervals are a third thing again. They are related, but not interchangeable.

Computing it the naive way on large numbers. If you have ever seen a stats library return a tiny negative variance and crash on the square root, this is why. The textbook formula Σx² − (Σx)²/n loses catastrophic precision when the values are big and similar. This page uses Welford's online algorithm, which sidesteps the problem by updating a running mean and a running sum of squared deviations one value at a time. Test it with [1,000,000,000, 1,000,000,001, 1,000,000,002] if you want to see the difference.

Edge cases worth knowing about

One value: the population SD is zero, because there is no spread. The sample SD is undefined, because the n − 1 in the denominator becomes zero. The page returns the population value and a clear note for the sample.

All identical values: both SDs are zero. There is no variation, so there is nothing to measure.

Two values: the sample SD is defined and equal to the absolute difference divided by the square root of two. The population SD is half the absolute difference. Both make intuitive sense once you write the maths out.

Negative numbers, decimals, and scientific notation are all accepted. The calculator does not assume your data is positive or whole. If a token in your input is not a valid number, it is reported back to you so you can fix it without losing the rest of the list.

Related calculators

Spread is one descriptive stat. These cover the neighbouring numbers.

Frequently asked questions

Should I use sample or population standard deviation?

Use sample standard deviation (s, divide by n − 1) when your numbers are a sample drawn from a larger population and you want to estimate the spread of that population. Use population standard deviation (σ, divide by n) only when your numbers are the entire population, every member of it, with nobody left out. In practice, almost every real dataset is a sample, so s is the right default unless you can prove otherwise. The difference between the two shrinks as n grows, but at small sample sizes (n under 30) it matters.

What is Bessel's correction and why divide by n − 1?

Bessel's correction is the n − 1 in the denominator of the sample variance formula. The sample mean is itself estimated from the data, which means the deviations from it are slightly smaller, on average, than deviations from the true population mean. Dividing by n instead of n − 1 would underestimate the variance. Subtracting one degree of freedom corrects for the fact that you used the data to estimate the mean before computing the spread.

Does this calculator send my numbers anywhere?

No. Everything runs in your browser using vanilla JavaScript. The numbers you paste never leave your device. You can disconnect from the network and the calculator still works.

Why does this give a different answer to my old calculator?

Almost always it is because one calculator returned sample SD (s, n − 1 denominator) and the other returned population SD (σ, n denominator). This page shows both side by side so you can match whichever number the source you are checking against used. If the difference is in the last decimal places only, that is normal floating-point variation between implementations.

What delimiters can I use to separate numbers?

Commas, spaces, tabs, semicolons, and newlines are all accepted, mixed freely. Paste a column from a spreadsheet, a comma-separated list from a report, or a space-separated row from a paper. Anything that is not a valid number is reported back to you so you can fix the typo without losing your place.