Standard Deviation Calculator
Enter your numbers separated by commas or spaces. You get both the sample and population standard deviation and variance, with the working.
The formulas
Standard deviation starts from the distance of each value from the mean. Square those distances so negatives do not cancel positives, average them to get the variance, then take the square root.
| Measure | Population | Sample |
|---|---|---|
| Variance | σ² = Σ(x − μ)² ÷ n | s² = Σ(x − x̄)² ÷ (n − 1) |
| Standard deviation | σ = √σ² | s = √s² |
Worked example: 2, 4, 4, 4, 5, 5, 7, 9
The mean is 40 ÷ 8 = 5. The squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. For a population, the variance is 32 ÷ 8 = 4, so σ = 2. For a sample, the variance is 32 ÷ 7 ≈ 4.571, so s ≈ 2.138.
Sample or population?
Dividing by n − 1 for a sample is called Bessel's correction. A sample tends to sit closer to its own mean than to the true population mean, so dividing by n slightly underestimates the spread. Using n − 1 corrects this. If your data is the whole group, such as every score in one class, use the population figure. If it is a survey or a test batch used to judge a larger group, use the sample figure. When unsure, the sample version is the usual default in statistics courses.
Reading the result
For data that follows a bell-shaped (normal) distribution, about 68% of values fall within one standard deviation of the mean, about 95% within two and about 99.7% within three. This is the empirical rule. It does not hold for heavily skewed data.
Common mistakes
The most common error is using n when you should use n − 1, or the reverse. Others are forgetting the final square root, which leaves you with the variance, and calculating a sample standard deviation from a single value, which is undefined because n − 1 would be zero. To find the mean and median first, use the mean, median, mode calculator.
Frequently asked questions
What is standard deviation?
It measures how far values typically sit from the mean. A small standard deviation means the values cluster close to the mean, and a large one means they are spread out.
What is the difference between sample and population standard deviation?
Use the population version (divide by n) when your data is every member of the group. Use the sample version (divide by n − 1) when your data is a sample drawn from a larger group.
How are variance and standard deviation related?
Variance is the average squared distance from the mean, and standard deviation is its square root. The square root brings the result back into the same units as your data.
What does a high standard deviation mean?
The values are widely spread. Two classes can both average 70 on a test, but a class with a standard deviation of 15 has far more varied scores than one with a standard deviation of 3.
More Statistics calculators
Browse every statistics calculator.