Standard Deviation Calculator

Paste a list of numbers to get the standard deviation (sample or population), variance, mean, count and sum of squares.

2 to 500 values. Use a point for decimals (1.5), no thousands separators, and separate numbers with spaces or a comma and a space.
Use “sample” when the numbers are a subset of a larger group (the usual case), “population” when they are every value.

Results

Standard deviation (sample)
2.1381
Variance (sample)
4.5714
Mean
5
Count (n)
8
Sum
40
Sum of squared deviations
32

How it’s calculated

Standard deviation measures how spread out numbers are around their mean. Subtract the mean from each value, square the differences, add them up, divide, then take the square root. For a population (every value) you divide by n; for a sample (a subset) you divide by n − 1, which corrects for the sample tending to understate the spread.

mean = Σx ÷ n SS = Σ(x − mean)² population: σ = √(SS ÷ n) sample: s = √(SS ÷ (n − 1)) variance = standard deviation squared

Example: 2, 4, 4, 4, 5, 5, 7, 9. The sum is 40, so the mean is 5. The deviations are −3, −1, −1, −1, 0, 0, 2, 4, whose squares add to SS = 32. Population: variance = 32 ÷ 8 = 4, so σ = 2. Sample: variance = 32 ÷ 7 ≈ 4.5714, so s ≈ 2.138.

Frequently asked questions

Should I use sample or population standard deviation?

Use population only when your list contains every member of the group you care about. If the numbers are a sample from something larger (a survey, a few measurements), use sample.

Why divide by n − 1 for a sample?

The sample mean is calculated from the same data, which makes the deviations a little too small on average. Dividing by n − 1 (Bessel’s correction) gives an unbiased estimate of the variance.

What is the difference between variance and standard deviation?

Variance is the average squared deviation, so it is in squared units. Standard deviation is its square root, in the same units as your data.

Why do I need at least two numbers?

With one value there is no spread to measure, and the sample formula would divide by zero.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator