How to Calculate Standard Deviation
Standard deviation measures how far data values typically sit from their mean. The procedure: find the mean, subtract it from each value and square the result, average those squared deviations (divide by n for a population, n − 1 for a sample), then take the square root to return to the original units.
Sample: s = √( Σ(xᵢ − x̄)² ÷ (n − 1) )
Data: 2, 4, 4, 4, 5, 5, 7, 9. The mean is 40 ÷ 8 = 5. Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16 — sum 32. As a population, variance = 32 ÷ 8 = 4 and σ = 2. As a sample, variance = 32 ÷ 7 ≈ 4.571 and s ≈ 2.138.
Sample vs. Population: Which to Choose
Use population when your data is every member of the group you care about — all 30 students in one class, every match a team played this season. Use sample when your data represents a larger group — 500 survey responses standing in for all customers. Dividing by n − 1 (Bessel's correction) compensates for the fact that a sample's own mean is always closer to its data than the true population mean, which would otherwise make the spread look smaller than it really is.
Interpreting the Result
| Within… | ≈ Share of data (bell-shaped) |
|---|---|
| mean ± 1 SD | 68% |
| mean ± 2 SD | 95% |
| mean ± 3 SD | 99.7% |
Standard deviation is the workhorse of practical statistics: it defines the margin of error in polls, the volatility of investments, quality-control limits in manufacturing, and how test scores are curved. Whenever someone says a result is “two sigma from the mean,” this is the sigma they mean.
Frequently Asked Questions
What does standard deviation tell you?
How spread out the data is around its mean, in the same units as the data. A small standard deviation means values cluster tightly near the average; a large one means they vary widely. Test scores with a mean of 75 and SD of 3 are far more consistent than scores with the same mean and SD of 15.
What is the difference between sample and population standard deviation?
Population SD divides by n (use it when your data is the entire group of interest). Sample SD divides by n − 1, which corrects the systematic underestimate that occurs when a sample stands in for a larger population. If your numbers are a sample — the usual case — use sample SD.
What is variance?
Variance is the average of the squared deviations from the mean — the standard deviation squared. It is measured in squared units, which is why the standard deviation (its square root) is usually the more interpretable number.
What is the empirical (68-95-99.7) rule?
For roughly bell-shaped data, about 68% of values fall within one standard deviation of the mean, 95% within two, and 99.7% within three. It is a quick way to judge whether a particular value is typical or unusual.
Can standard deviation be zero or negative?
It can be zero — but only when every value in the data set is identical. It can never be negative, because it is the square root of an average of squared (non-negative) numbers.
Cite This Calculator
Using this calculator in an assignment, article or lesson? Copy a ready-made citation — or the link snippet if you're referencing it from a web page.
The CalculatorsGuide Editorial Team. (2026). Standard Deviation Calculator. CalculatorsGuide. Retrieved from https://www.calculatorsguide.com/statistics/standard-deviation-calculator/