How to use the standard deviation calculator
- Paste or type your numbers, separated by commas, spaces or new lines.
- Choose sample (the data is part of a bigger group) or population (the data is the whole group).
- Read the standard deviation, mean and variance, plus the standard error, a 95% confidence interval for the mean, median, mode and range. The step-by-step section shows every deviation.
Standard deviation formulas
Population: ฯ = โ( ฮฃ(x โ ฮผ)ยฒ รท N )
Standard error: SE = s รท โn ยท 95% CI = xฬ ยฑ t(0.975, n โ 1) ร SE
Worked example
Data: 2, 4, 4, 4, 5, 5, 7, 9 (n = 8).
| x | x โ 5 | (x โ 5)ยฒ |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| ฮฃ = 40 | 0 | 32 |
- Mean = 40 รท 8 = 5
- Population: ฯยฒ = 32 รท 8 = 4, so ฯ = 2
- Sample: sยฒ = 32 รท 7 โ 4.571, so s โ 2.138
- Standard error = 2.138 รท โ8 โ 0.756; 95% CI for the mean โ 5 ยฑ 2.365 ร 0.756 = 3.21 to 6.79
Interpreting standard deviation
For data that is roughly bell-shaped, the empirical rule says about 68% of values fall within 1 SD of the mean, 95% within 2 SD and 99.7% within 3 SD. The coefficient of variation (SD รท mean) compares spread between data sets with different units or scales.
To find probabilities under the normal curve, use the normal CDF calculator; for intervals from summary statistics, the confidence interval calculator. If some values count more than others, use the weighted mean calculator. More math calculators.
Sources
Frequently asked questions
How do you calculate standard deviation?
Find the mean, subtract it from each value and square the differences, add the squares, divide by n โ 1 (sample) or N (population) to get the variance, then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the sum of squares is 32, the population SD is โ(32 รท 8) = 2 and the sample SD is โ(32 รท 7) โ 2.138.
Should I use sample or population standard deviation?
Use the population formula (divide by N) only when your data includes every member of the group you care about, such as all students in one class. If the data is a sample used to describe a larger group, use the sample formula (divide by n โ 1), which corrects for the sample's tendency to underestimate spread.
What does standard deviation tell you?
It measures how spread out values are around the mean, in the same units as the data. A small SD means values cluster near the mean; a large one means they are spread widely. For roughly normal data, about 68% of values lie within 1 SD of the mean and about 95% within 2 SD.
What is the difference between variance and standard deviation?
Variance is the average squared deviation from the mean; standard deviation is its square root. SD is easier to interpret because it is in the original units (for example centimeters rather than square centimeters).
What is the standard error of the mean?
The standard error, s รท โn, estimates how much a sample mean would vary from sample to sample. It shrinks as the sample gets larger and is used to build confidence intervals for the mean.
How do I calculate standard deviation in Excel?
Use =STDEV.S(range) for a sample and =STDEV.P(range) for a population. The matching variance functions are VAR.S and VAR.P.
Can standard deviation be negative?
No. It is a square root of a sum of squares, so it is zero when every value is the same and positive otherwise.