Standard Deviation Formula (and How to Find It)

How to find standard deviation by hand: the formula, what each symbol means and a worked example — then check your own data with the calculator below.

The formulas

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

x = each value, x̄ = sample mean, μ = population mean, n = sample size, N = population size, Σ = add them all up.

Five steps

  1. Find the mean.
  2. Subtract the mean from each value.
  3. Square each difference.
  4. Add the squares and divide by n − 1 (sample) or N (population) — that is the variance.
  5. Take the square root.

Worked example

Data: 4, 8, 6, 5, 7. Mean = 30 ÷ 5 = 6. Differences: −2, 2, 0, −1, 1. Squares: 4, 4, 0, 1, 1 → sum 10. Sample variance = 10 ÷ 4 = 2.5, so s = √2.5 ≈ 1.5811. Population: σ = √(10 ÷ 5) ≈ 1.4142.

In Excel and Google Sheets

=STDEV.S(A1:A5) for a sample, =STDEV.P(A1:A5) for a population. TI-84: STAT → CALC → 1-Var Stats (Sx is sample, σx is population).

Try it with your numbers

Your data is a

Sample SD (s)1.5811
Population SD (σ)1.4142
Mean6
Count (n)5

Step by step

  1. Mean: add the values and divide by the count: x̄ = 30 ÷ 5 = 6
  2. Subtract the mean from each value and square the result (table below)
  3. Add the squares: Σ(x − x̄)² = 10
  4. Divide by n − 1 = 4: variance s² = 10 ÷ 4 = 2.5
  5. Take the square root: s = √2.5 = 1.5811
xx − x̄(x − x̄)²
4−24
824
600
5−11
711

Frequently asked questions

What is the formula for standard deviation?

s = √(Σ(x − x̄)² ÷ (n − 1)) for a sample; σ = √(Σ(x − μ)² ÷ N) for a population.

What is the standard deviation of 4, 8, 6, 5, 7?

Sample SD ≈ 1.5811; population SD ≈ 1.4142.

Which Excel function gives sample standard deviation?

STDEV.S.