Standard deviation is one of the most important numbers in statistics. It answers a simple question about your data: how spread out are the values? A small standard deviation means most values cluster tightly around the average, and a large one means values scatter widely. This guide walks through the exact calculation steps with a worked example, explains the population versus sample distinction, and shows you how to interpret the result.
What is Standard Deviation?
Standard deviation measures dispersion, the degree to which individual values in a dataset differ from the mean. It comes out in the same units as your original data, so it's easy to read alongside the mean itself. If a class of students has a mean exam score of 70 with a standard deviation of 5, you already know most students scored between 65 and 75. Push the standard deviation to 20 and the scores spread from 50 to 90 or beyond.
The underlying concept is variance, the average of squared differences from the mean. Standard deviation is the square root of variance, which converts those squared units back into the original scale.
Step 1: Find the Mean
Add all values and divide by the count.
Dataset: {4, 7, 13, 2, 1}
Sum = 4 + 7 + 13 + 2 + 1 = 27 n = 5 Mean = 27 ÷ 5 = 5.4
The Statistics Calculator can verify the mean quickly, especially on a larger dataset.
Step 2: Find Each Deviation from the Mean
Subtract the mean from each value:
| Value | Deviation (value − mean) |
|---|---|
| 4 | 4 − 5.4 = −1.4 |
| 7 | 7 − 5.4 = 1.6 |
| 13 | 13 − 5.4 = 7.6 |
| 2 | 2 − 5.4 = −3.4 |
| 1 | 1 − 5.4 = −4.4 |
The deviations sum to zero. That's always true, and it's a handy check that your mean is correct.
Step 3: Square Each Deviation
Squaring removes the negative signs and gives extra weight to larger deviations:
| Deviation | Squared |
|---|---|
| −1.4 | 1.96 |
| 1.6 | 2.56 |
| 7.6 | 57.76 |
| −3.4 | 11.56 |
| −4.4 | 19.36 |
Sum of squared deviations = 93.20
Step 4: Calculate the Variance
Population and sample SD part ways here.
Population variance (use when you have data for every member of the group): σ² = 93.20 ÷ 5 = 18.64
Sample variance (use when your data is a subset estimating a larger population): s² = 93.20 ÷ (5 − 1) = 93.20 ÷ 4 = 23.30
Dividing by N−1 instead of N is called Bessel's correction. It compensates for the fact that a sample tends to underestimate the true spread of the full population.
Step 5: Take the Square Root
Converting variance back to standard deviation restores the original units:
Population SD: σ = √18.64 ≈ 4.32 Sample SD: s = √23.30 ≈ 4.83
For this dataset, the sample standard deviation is 4.83, meaning a typical value sits about 4.83 units away from the mean of 5.4. The Standard Deviation Calculator runs all five steps automatically and shows the intermediate working, which helps when you're checking a manual calculation.
Population vs Sample: Which Formula to Use?
Use population SD when:
- Your dataset includes every member of the group being studied (all 50 employees in a company, all 30 students in a specific class).
- You aren't trying to generalize beyond the data you have.
Use sample SD in virtually every other case:
- Survey data representing a larger population
- Quality control samples from a production run
- Medical study participants representing all patients with a condition
- Financial return data for a stock (past returns are a sample of all possible future returns)
Sample SD is the default for almost all research, data analysis, and business work. If you're unsure which to use, use sample SD.
How to Interpret Standard Deviation
The 68-95-99.7 Rule
For data that follows a normal distribution, roughly:
- 68% of values fall within 1 SD of the mean
- 95% fall within 2 SDs
- 99.7% fall within 3 SDs
Apply this to the S&P 500, which has a historical annual standard deviation of roughly 15-17%: in any given year, about 68% of annual returns should fall within one SD of the long-run average. Extreme years, crashes or booms, correspond to returns that sit 2 or 3 SDs away from the mean.
Z-Scores
A z-score converts an individual value into a standard deviation count, telling you how many SDs above or below the mean that value sits. The formula: z = (value − mean) ÷ SD. A z-score of 2.0 puts a value 2 standard deviations above average, roughly the top 2.3% of a normal distribution. The Z-Score Calculator computes this instantly for any dataset.
What Makes an SD "Large" or "Small"?
No universal threshold exists here. You have to read standard deviation relative to the mean and the context. The coefficient of variation (CV = SD ÷ mean × 100%) gives you a dimensionless way to compare. A CV of 10% signals low variability; a CV of 50% signals high variability. This lets you compare spread across datasets measured in different units or at different scales.
When Standard Deviation Can Mislead
Standard deviation has real limits:
- Outliers inflate it. Because deviations get squared, one extreme value can dominate the result. A single 1,000 in a dataset of mostly single-digit numbers pushes the SD dramatically upward.
- Skewed distributions cause trouble. Income, wealth, and property prices run right-skewed. Mean and SD describe these poorly; median and interquartile range tell you more.
- Non-normal data breaks the rule. The 68-95-99.7 rule only applies to normally distributed data. Apply it elsewhere and you get incorrect probability estimates.
- Small samples add noise. With fewer than 30 observations, sample SD is itself an unreliable estimate of the population SD.
When your data is skewed or carries outliers, report the median and range alongside mean and SD, or in place of them.
Quick Reference: The Formula
Population SD: σ = √( Σ(xᵢ − μ)² ÷ N )
Sample SD: s = √( Σ(xᵢ − x̄)² ÷ (N−1) )
Here xᵢ is each individual value, μ (or x̄) is the mean, and N is the count of values. The Standard Deviation Calculator applies this formula to any dataset you paste in and returns both population and sample SD at once.