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. A large standard deviation means values are scattered 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 quantifies dispersion — the degree to which individual values in a dataset differ from the mean. It is expressed in the same units as your original data, which makes it easy to interpret alongside the mean itself. If a class of students has a mean exam score of 70 with a standard deviation of 5, you immediately know that most students scored between 65 and 75. If the standard deviation were 20, the scores would be spread from 50 to 90 or beyond.
The underlying mathematical concept is variance — the average of squared differences from the mean. Standard deviation is simply the square root of variance, which converts the squared units back into the original units of measurement.
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
Use the Mean, Median and Mode Calculator if you need to verify the mean quickly or are working with 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 |
Note that the deviations sum to zero — this is always true and is a useful 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
This is where population and sample SD diverge.
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
The division 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. This means a typical value in the dataset sits about 4.83 units away from the mean of 5.4. The Standard Deviation Calculator handles all five steps automatically and shows the intermediate working, which is useful when checking your manual calculations.
Population vs Sample: Which Formula to Use?
Use population SD when:
- Your dataset includes every member of the group being studied (e.g., all 50 employees in a company, all 30 students in a specific class).
- You are not trying to generalise beyond the data you have.
Use sample SD in virtually all other cases:
- 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)
In practice, sample SD is the default for almost all research, data analysis, and business contexts. If you are unsure, use sample SD.
How to Interpret Standard Deviation
The 68-95-99.7 Rule
For data that follows a normal distribution, approximately:
- 68% of values fall within 1 SD of the mean
- 95% fall within 2 SDs
- 99.7% fall within 3 SDs
Applied 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 would be expected to fall within one SD of the long-run average return. Extreme years — crashes or booms — correspond to returns that are 2 or 3 SDs away from the mean.
Z-Scores
A z-score converts any individual value into a standard deviation count — it tells you how many SDs above or below the mean a particular value sits. The formula is: z = (value − mean) ÷ SD. A z-score of 2.0 means the value is 2 standard deviations above average, which puts it in roughly the top 2.3% of a normal distribution. Use the Z-Score Calculator to compute this instantly for any dataset.
What Makes an SD "Large" or "Small"?
There is no universal threshold. Standard deviation must always be interpreted relative to the mean and the context. A useful dimensionless measure is the coefficient of variation (CV = SD ÷ mean × 100%). A CV of 10% indicates low variability; a CV of 50% indicates 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 limitations:
- Outliers inflate it. Because deviations are squared, a single extreme value can dominate the result. One value of 1,000 in a dataset of mostly single-digit numbers will push the SD dramatically upward.
- Skewed distributions. Income, wealth, and property prices are right-skewed. The mean and SD describe these distributions poorly; the median and interquartile range are more informative.
- Non-normal data. The 68-95-99.7 rule only applies to normally distributed data. Applying it to other distributions produces incorrect probability estimates.
- Small samples. With fewer than 30 observations, the sample SD is itself an unreliable estimate of the population SD.
When your data is skewed or contains outliers, always report the median and range alongside mean and SD, or instead of them.
Quick Reference: The Formula
Population SD:
σ = √( Σ(xᵢ − μ)² ÷ N )
Sample SD:
s = √( Σ(xᵢ − x̄)² ÷ (N−1) )
Where 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, returning both population and sample SD simultaneously.