Standard Deviation Calculator
Paste a list of numbers to get the standard deviation, sample or population, with the mean, deviations and squares worked out.
Separate them with commas, spaces or new lines; paste a column from a spreadsheet.
Sample standard deviation (s)
≈ 2.13809
The sample standard deviation is ≈ 2.13809: values typically sit about that far from the mean, 5.
The shaded band is the mean ± one standard deviation.
- Variance (s²)
- ≈ 4.571429
- Mean
- 5
- Within 1 SD of the mean
- 6 of 8
How to calculate standard deviation
Standard deviation measures how spread out values are around their mean, in the same units as the data. For 2, 4, 4, 4, 5, 5, 7 and 9 the mean is 5. Subtract it from each value (−3, −1, −1, −1, 0, 0, 2, 4), square those (9, 1, 1, 1, 0, 0, 4, 16) and add them: the sum of squares is 32.
Then divide and take the square root. If these 8 values are the whole population, divide by n: 32 ÷ 8 = 4, and √4 = 2. If they are a sample from a bigger group, divide by n − 1: 32 ÷ 7 ≈ 4.571, and the sample standard deviation is √4.571 ≈ 2.138. Most real data are samples, so the sample formula is the usual default in spreadsheets (STDEV.S in Excel, STDEV.P for a population).
For data that follow a bell curve, about 68% of values lie within one standard deviation of the mean, about 95% within two and 99.7% within three. So if exam scores have mean 70 and standard deviation 8, roughly two thirds of students scored between 62 and 78.
σ = √(Σ(x − μ)² ÷ n) (population) · s = √(Σ(x − x̄)² ÷ (n − 1)) (sample)
- Dividing by n − 1 instead of n (Bessel’s correction) corrects the bias of the sample variance, because deviations from the sample’s own mean are smaller on average than deviations from the true mean. Source: Wikipedia, Bessel’s correction.
- For a normal distribution, 68.27% of values fall within one standard deviation of the mean, 95.45% within two and 99.73% within three. Source: Wikipedia, 68–95–99.7 rule.
Sample and population standard deviation compared
The sample formula always gives the larger answer; the gap shrinks as the number of values grows.
| Data | n | Population σ | Sample s |
|---|---|---|---|
| 2, 4, 4, 4, 5, 5, 7, 9 | 8 | 2 | ≈ 2.1381 |
| 1, 2, 3 | 3 | ≈ 0.8165 | 1 |
| 10, 20, 30 | 3 | ≈ 8.165 | 10 |
| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 | 10 | ≈ 2.8723 | ≈ 3.0277 |
| 5, 5, 5, 5 | 4 | 0 | 0 |
| 1, 1000 | 2 | 499.5 | ≈ 706.3997 |
| 162, 175, 168, 181, 170, 158, 177 | 7 | ≈ 7.6238 | ≈ 8.2347 |
| 0.1, 0.2, 0.3, 0.4 | 4 | ≈ 0.1118 | ≈ 0.1291 |
| −2, −1, 0, 1, 2 | 5 | ≈ 1.4142 | ≈ 1.5811 |
| 50, 52, 48, 51, 49, 50 | 6 | ≈ 1.291 | ≈ 1.4142 |
Frequently Asked Questions
Should I use the sample or the population standard deviation?
Use population (n) only when your data are the entire group you care about, such as every student in one class. If the data are a sample used to describe a bigger group, use the sample formula (n − 1).
Can the standard deviation be zero or negative?
It is zero exactly when every value is the same, and it can never be negative, because it is the square root of an average of squares.
What is a high standard deviation?
There is no fixed cut-off; compare it with the mean. The coefficient of variation (standard deviation ÷ mean) helps: 8 points of spread is large for a mean of 20 but small for a mean of 500.