Standard Deviation Calculator
Type
Standard Deviation2.0000
Variance4.0000
Mean5.0000
Count8
Standard deviation tells you how spread out a data set is around its mean: a small value means the numbers cluster tightly, a large one means they scatter widely. This calculator returns the standard deviation, the variance, the mean, and the count for your data, and lets you choose between the population and sample formulas, which differ in their divisor.
Formula
σ = √( Σ(xᵢ − x̄)² / N ) (population) | s = √( Σ(xᵢ − x̄)² / (N − 1) ) (sample)
- xᵢ
- Each individual value in the data set
- x̄
- The arithmetic mean of the data set
- N
- The number of values; the sample formula divides by N − 1 instead
- σ / s
- Population standard deviation (σ) or sample standard deviation (s)
How it works
- Enter your numbers as a data set and choose whether they represent the whole population or just a sample.
- The calculator finds the mean, then sums the squared differences of each value from the mean. Dividing that sum by N gives the population variance; dividing by N − 1 gives the sample variance (Bessel’s correction).
- The standard deviation is the square root of the variance. The result also shows the mean and the number of values; a sample with fewer than two values returns a deviation of 0 since N − 1 would be zero.
Worked examples
Find the population standard deviation of 2, 4, 4, 4, 5, 5, 7, 9.
- Mean = (2+4+4+4+5+5+7+9) / 8 = 40 / 8 = 5.
- Squared differences sum to 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32.
- Population variance = 32 / 8 = 4, so σ = √4 = 2.
Population standard deviation = 2 (variance 4, mean 5)
Treat the same numbers as a sample instead of a population.
- The squared-difference sum is still 32 and the mean is still 5.
- Sample variance divides by N − 1 = 7: 32 / 7 ≈ 4.5714.
- Sample standard deviation = √4.5714 ≈ 2.138.
Sample standard deviation ≈ 2.138 (variance ≈ 4.571, mean 5)
Frequently asked questions
- Should I use the population or sample formula?
- Use the population formula when your data covers every member of the group you care about. Use the sample formula (dividing by N − 1) when your data is a subset used to estimate a larger population; the smaller divisor corrects the tendency of samples to understate true spread.
- What is the difference between variance and standard deviation?
- Variance is the average of the squared differences from the mean, so its units are squared. Standard deviation is the square root of the variance, returning the spread to the same units as your data, which makes it easier to interpret.
- Why does a single sample value give a standard deviation of 0?
- The sample formula divides by N − 1, so with only one value the divisor would be zero. The calculator avoids that undefined result by reporting a standard deviation and variance of 0 while still showing the mean.
- How does this differ from the full statistics calculator?
- This tool focuses on spread — standard deviation, variance, and the population-versus-sample choice. The statistics calculator instead gives a broad summary including median, mode, range, sum, minimum, and maximum, using the sample standard deviation.