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 )
Population: σ = √( Σ(x − μ)² ÷ N )
x = each value, x̄ = sample mean, μ = population mean, n = sample size, N = population size, Σ = add them all up.
Five steps
- Find the mean.
- Subtract the mean from each value.
- Square each difference.
- Add the squares and divide by n − 1 (sample) or N (population) — that is the variance.
- 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
Sample SD (s)1.5811
Population SD (σ)1.4142
Mean6
Count (n)5
Step by step
- Mean: add the values and divide by the count: x̄ = 30 ÷ 5 = 6
- Subtract the mean from each value and square the result (table below)
- Add the squares: Σ(x − x̄)² = 10
- Divide by n − 1 = 4: variance s² = 10 ÷ 4 = 2.5
- Take the square root: s = √2.5 = 1.5811
| x | x − x̄ | (x − x̄)² |
|---|---|---|
| 4 | −2 | 4 |
| 8 | 2 | 4 |
| 6 | 0 | 0 |
| 5 | −1 | 1 |
| 7 | 1 | 1 |
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.