Standard Deviation Calculator
Compute sample SD (s, divisor n−1) and population SD (σ, divisor n) with full intermediate steps.
Written by Golam Rabbani, Founder & Lead Engineer
How to use this standard deviation calculator
- Paste or type your numbers, separated by commas, spaces, or newlines.
- Tick "Show step-by-step work" if you want to see each (x − mean)² contribution.
- Press Calculate to get sample SD (s, divisor n − 1) and population SD (σ, divisor n) side by side.
- Copy the result or Reset to start over.
About this standard deviation calculator
Standard deviation summarises how spread out a list of numbers is around its mean. Compute it by subtracting the mean from each value, squaring those deviations, summing them (call the total SS), then dividing by either n (population formula, σ²) or n − 1 (sample formula, s²). Taking the square root gives σ or s. Use the sample formula whenever the data is a sample from a larger population; the n − 1 correction (Bessel's correction) keeps the estimate unbiased.
Worked example. Enter 2, 4, 4, 4, 5, 5, 7, 9 with n = 8. Mean = 40 / 8 = 5. The squared deviations (x − 5)² are 9, 1, 1, 1, 0, 0, 4, 16 — sum SS = 32. Sample variance s² = 32 / (8 − 1) = 32 / 7 ≈ 4.5714, so s = √4.5714 ≈ 2.1381. Population variance σ² = 32 / 8 = 4, so σ = 2. The standard error of the mean SEM = s / √n ≈ 2.1381 / √8 ≈ 0.7559. Step-by-step work is available for inspection in the result panel.
FAQ
- When should I use n − 1 vs n?
- Use n − 1 when your data is a sample from a larger population (almost all real-world cases). Use n only when the data is the entire population.
- Why does Bessel's correction (n − 1) exist?
- Dividing by n underestimates variance because the sample mean is closer to the data than the unknown true mean. Dividing by n − 1 corrects that bias on average.
- What is the standard error of the mean (SEM)?
- SEM = s / √n. It estimates how variable the sample mean would be if you repeated the experiment many times.
- Can SD be zero?
- Yes — if every value is identical, all deviations are zero, so both s and σ are zero.
- How are non-numeric tokens handled?
- They are skipped and the calculator displays how many tokens were ignored, so partial data does not silently inflate or shrink the result.