Standard Deviation Calculator

Calculate the standard deviation and variance of a data set, for a sample or a whole population.

Separate with commas, spaces or new lines.

What standard deviation measures

Standard deviation tells you how spread out the numbers are around their mean. A small value means the data sits close to the average; a large value means it is widely scattered. Two classes can both average 70% on a test, but if one has a standard deviation of 4 and the other 15, the second class has far more students at the extremes.

Sample or population?

Choose population when your list contains every member of the group you care about — every employee in a company, every match a team played this season. Choose sample when your list is a subset used to estimate a larger group, such as 50 customers surveyed out of thousands. Most real-world data is a sample.

The only difference is the divisor. The sample formula divides by n − 1 instead of n. This adjustment (Bessel’s correction) makes up for the fact that a sample tends to underestimate the true spread.

The formulas

Population: σ = √( Σ(x − μ)² ÷ N )

Sample: s = √( Σ(x − x̄)² ÷ (n − 1) )

Worked example

Data: 4, 8, 6, 5, 3, 7, 9, 6 (a sample of 8).

  1. Mean = 48 ÷ 8 = 6.
  2. Subtract the mean from each value and square it: 4, 4, 0, 1, 9, 1, 9, 0.
  3. Add the squares: the sum of squares is 28.
  4. Divide by n − 1 = 7 to get the variance: 28 ÷ 7 = 4.
  5. Take the square root: the standard deviation is 2.

Treated as a population, the variance would be 28 ÷ 8 = 3.5 and the standard deviation about 1.871.

The 68–95–99.7 rule

For data that follows a bell-shaped (normal) curve, about 68% of values fall within one standard deviation of the mean, 95% within two and 99.7% within three. It is a handy way to judge whether a value is unusual.

Frequently asked questions

What is the difference between variance and standard deviation?

Variance is the average squared distance from the mean. Standard deviation is its square root, which puts the spread back into the same units as your data, so it is easier to interpret.

Why does the sample formula use n − 1?

A sample mean sits closer to its own data points than the true population mean does, so the raw spread comes out slightly too small. Dividing by n − 1 corrects for that bias.

Can standard deviation be negative?

No. It is a square root of a sum of squares, so it is always zero or positive. It is zero only when every value is identical.

Last reviewed: