How to calculate standard deviation by hand
Standard deviation is the square root of the average squared distance from the mean. Five steps get you there, and the calculator prints each of them for lists of up to 30 numbers.[1][2]
- Find the mean: add the values and divide by n.
- Subtract the mean from each value (the deviations always add up to 0).
- Square each deviation.
- Add the squares, then divide by n − 1 for a sample or by n for a population. That is the variance.
- Take the square root of the variance.
Worked example: quiz scores 8, 9, 7, 10, 6, 9, 8
Mean = 57 ÷ 7 = 8.1429.
Squared deviations add up to 10.8571. Sample variance = 10.8571 ÷ 6 = 1.8095; sample SD = 1.3452.
As a population: 10.8571 ÷ 7 = 1.551, so σ = 1.2454.
Sample vs population standard deviation
Use the sample standard deviation (divide by n − 1) unless your list contains every member of the group. A sample’s values sit, on average, closer to the sample mean than to the true mean, so dividing by n would understate the spread; n − 1 corrects for that.[1]
| Your data | Use | Symbol | Divide by |
|---|---|---|---|
| A survey, an experiment, a class used to represent all students | Sample SD | s | n − 1 |
| Every test score in your own class, every game a team played this season | Population SD | σ | n |
| Not sure | Sample SD (the safer, larger value) | s | n − 1 |
The gap shrinks as n grows: with 8 values the sample SD is 1.069 times the population SD, with 100 values about 1.005 times. Calculators label them differently: on a TI-84 1-Var Stats screen, Sx is the sample SD and σx the population SD; in Excel they are STDEV.S and STDEV.P.
What a standard deviation tells you
A standard deviation is the typical distance of a value from the mean, in the data’s own units. Scores with mean 75 and SD 4 are bunched together; scores with mean 75 and SD 15 are spread out. For data that follow a normal (bell-shaped) curve, about 68% of values lie within 1 SD of the mean, 95% within 2 and 99.7% within 3.[4] To see where a single value falls, convert it with the z-score calculator.
Variance or standard deviation?Variance is the standard deviation squared, so it is in squared units (points², inches²). Report the SD to describe spread; variance is what goes into formulas such as the pooled t-test and ANOVA.
Common standard deviation mistakes
- Forgetting the square root. Σ(x − mean)² ÷ (n − 1) is the variance, not the SD.
- Squaring the values instead of the deviations. Subtract the mean first, then square.
- Rounding the mean too early. Keep full precision until the last step; the calculator does.
- Mixing up s and σ on homework. Check whether the question says “sample” or “population”.
The statistics calculator gives the SD together with the mean, median, quartiles and outliers; the confidence interval calculator uses the SD to put a margin of error on a mean.
How we check this calculator
Automated tests run before every update: 2, 4, 4, 4, 5, 5, 7, 9 must give σ = 2 exactly and s = 2.13809; the deviations column must add to 0; long lists of decimals are summed with compensated addition so rounding does not creep in. The formulas match the NIST/SEMATECH e-Handbook definitions.[1][3]
- 14 November 2026: page and calculator published.
More statistics calculators
- Statistics calculatorMean, median, mode, SD, quartiles and outliers
- Z-score calculatorz, percentile and area under the normal curve
- P-value calculatorFrom z, t, chi-square or F
- Confidence interval calculatorMeans and proportions, t or z
- t-test calculatorOne-sample, Welch, pooled and paired
- Binomial distribution calculatorExactly, at most, at least x successes
Frequently asked questions
How do you calculate standard deviation?
Find the mean, subtract it from each value, square the results, add them, divide by n − 1 (sample) or n (population), and take the square root.
Should I use n or n − 1?
Use n − 1 for a sample and n for a whole population. Most homework, surveys and experiments are samples, so n − 1 is the usual choice.
What is the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9?
The population standard deviation is exactly 2; the sample standard deviation is 2.1381.
Can a standard deviation be negative?
No. It is a square root of a sum of squares, so it is 0 or positive. It is 0 only when every value is the same.
Is a high standard deviation good or bad?
Neither. It only says the values are spread out. In a factory it usually means inconsistent quality; in a class it means scores varied a lot.