Standard Deviation Formula

STATISTICS

Standard deviation formula

Standard deviation measures how spread out a data set is around its mean. It is the square root of the variance, the average of the squared distances from the mean.

σ = √( Σ(x − μ)² / N )
where:

  • σ = the population standard deviation
  • x = each value in the data set
  • μ = the mean of the data
  • N = the number of values
  • Σ = sum over all values

Population versus sample

The formula shown is the population standard deviation, dividing by N. For a sample drawn from a larger population, divide by N minus 1 instead and use the sample mean; this Bessel correction gives a better estimate of the true spread. The sample version is the one used in most real-world statistics.

How to compute it

Find the mean, subtract it from each value to get the deviations, square those deviations, average them to get the variance, and take the square root. Squaring keeps negative and positive deviations from cancelling and gives more weight to values far from the mean.

Worked example

  1. Data: 2, 4, 6, 8, 10. Mean = 6.
  2. Deviations: −4, −2, 0, 2, 4. Squared: 16, 4, 0, 4, 16.
  3. Sum of squares = 40; divide by N = 5 to get variance 8.
  4. Standard deviation = √8 ≈ 2.83.

Go deeper

Use the Standard Deviation Calculator, or read the Standard Deviation Guide.

FAQ

What is the standard deviation formula?

For a population, σ = √(Σ(x − μ)² / N): the square root of the average squared distance from the mean.

When do I divide by N minus 1?

When the data is a sample of a larger population. This correction makes the sample standard deviation a better estimate of the population value.

Spotted an error or have a suggestion for this calculator? Let us know →
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.