Standard Deviation Calculator

Sample and population standard deviation, variance and standard error.

Standard deviation measures how spread out a data set is. A small value means observations cluster near the mean; a large one means they scatter widely. It shares the units of the original data, which makes it far easier to interpret than variance.

Sample or population

Use the population formula when your data covers every member of the group you care about. Use the sample formula — the default here — when the data is a subset used to infer something about a larger group.

The sample version divides by n − 1 rather than n. This is Bessel's correction: a sample's own mean sits closer to its points than the true population mean does, which biases the estimate low. Dividing by n − 1 corrects it.

Population:  σ = √( Σ(xᵢ − μ)² / N )
Sample:      s = √( Σ(xᵢ − x̄)² / (n − 1) )

The empirical rule

For roughly normally distributed data:

RangeContains about
mean ± 1 SD68% of values
mean ± 2 SD95% of values
mean ± 3 SD99.7% of values

This only holds for approximately normal distributions. Skewed or heavy-tailed data breaks it, sometimes badly.

  • Variance — the square of standard deviation. Mathematically convenient because variances of independent variables add, but its units are squared and hard to interpret.
  • Standard error — the standard deviation divided by √n. Describes the precision of the sample mean, not the spread of the data, and shrinks as the sample grows.
  • Coefficient of variation — SD divided by the mean, expressed as a percentage. Dimensionless, so it compares variability between data sets on different scales.

Worked example

Using the values pre-loaded in the calculator above:

InputValue
Data set12, 15, 9, 22, 18, 14, 11, 25, 17, 13
OutputValue
Sample standard deviation4.99332888
Population standard deviation4.73708771
Sample variance24.93333333
Population variance22.44
Mean15.6
Count10
Sum156
Standard error of the mean1.57902924

Frequently asked questions

Should I use the sample or population formula?

Sample (n − 1) when your data is a subset used to infer about a wider group — the usual case. Population (n) only when you have measured every member.

What counts as a high standard deviation?

It depends entirely on scale and context. Compare it to the mean using the coefficient of variation, which is scale-free.

How does standard deviation differ from standard error?

Standard deviation describes the spread of the data. Standard error describes the uncertainty in the mean and gets smaller as you collect more data.

Can standard deviation be negative?

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