Standard Deviation Calculator
Compute mean, standard deviation, variance, and more from a list of numbers. Paste data from Excel/CSV, choose sample or population, and get steps plus a clean mini distribution visual.
Background
Standard deviation measures how “spread out” values are around the mean. For a population: σ = √(Σ(x−μ)² / N). For a sample: s = √(Σ(x−x̄)² / (n−1)).
How to use this calculator
- Paste a list of numbers (commas/spaces/new lines all work).
- Choose Sample or Population.
- Click Calculate (or turn on Auto-calculate).
- Read the mean, variance, standard deviation, plus optional steps and the mini visual.
How this calculator works
- Parse: extract numbers (and expand x:freq pairs).
- Compute mean & spread: uses a stable one-pass method (Welford) to reduce rounding error.
- Variance: population uses N; sample uses n−1.
- Standard deviation: √variance.
Formula & Equation Used
Mean: x̄ = (Σx) / n
Population variance: σ² = Σ(x−μ)² / N
Sample variance: s² = Σ(x−x̄)² / (n−1)
Standard deviation: σ = √σ², s = √s²
Example Problem & Step-by-Step Solution
Example 1 — Classic dataset (Population)
Data: 2, 4, 4, 4, 5, 5, 7, 9
- Mean: x̄ = (2+4+4+4+5+5+7+9)/8 = 40/8 = 5
- Squared deviations sum: Σ(x−5)² = 9+1+1+1+0+0+4+16 = 32
- Population variance: σ² = 32/8 = 4
- Population SD: σ = √4 = 2
Example 2 — Same data (Sample)
Use the same dataset, but treat it as a sample.
- We already have Σ(x−x̄)² = 32 and n = 8.
- Sample variance: s² = 32/(8−1) = 32/7 ≈ 4.571
- Sample SD: s = √4.571 ≈ 2.138
- Interpretation: sample SD is a bit larger because it uses n−1.
Example 3 — Frequency-style input
Data: 10:3, 12:2, 15:1 (so the list is 10,10,10,12,12,15)
- Expanded list has n = 6.
- Mean: x̄ = (10+10+10+12+12+15)/6 = 69/6 = 11.5
- Squared deviations: 3·(10−11.5)² + 2·(12−11.5)² + 1·(15−11.5)²
- That is 3·2.25 + 2·0.25 + 12.25 = 6.75 + 0.5 + 12.25 = 19.5
- Population variance: σ² = 19.5/6 = 3.25 → SD: σ = √3.25 ≈ 1.803
Frequently Asked Questions
Q: Sample or population?
Use sample if your data is a subset used to estimate a larger population. Use population if it includes everyone.
Q: Why does sample divide by n−1?
It corrects bias when estimating the population variance from a sample (Bessel’s correction).
Q: Can I paste a whole column from Excel?
Yes. New lines and commas are handled automatically. Non-numbers are ignored with a callout.