How to use this calculator
- 1 Type your numbers, separated by commas or spaces. You need at least two for a sample.
- 2 Choose Sample (n − 1) or Population (n).
- 3 Read the standard deviation. The variance, mean, count, sum and standard error show the working below it.
What is standard deviation?
Standard deviation tells you how far a typical value sits from the mean, which is the average. A small standard deviation means the numbers cluster tightly around the mean. A large one means they are spread out.
For example, two classes can have the same mean test score of 70. In one class, most scores are between 65 and 75. In the other, scores range from 40 to 100. The standard deviation shows that difference clearly.
It is measured in the same units as your data, which makes it easy to read. Scores in points, heights in centimetres and prices in dollars all give a standard deviation in their own unit.
How the standard deviation is calculated
First, find the mean by adding the numbers and dividing by how many there are. Next, find how far each number is from the mean, square each difference, and add the squares together.
Then divide the total by n for a population, or by n − 1 for a sample. This result is the variance. Finally, take the square root of the variance to get the standard deviation. Squaring and then taking the root keeps the answer in the original units.
Dividing by n − 1 for a sample is called Bessel’s correction. A sample usually sits a little closer to its own mean than the full group does, so dividing by n − 1 gives a slightly larger, fairer estimate of the spread.
| Step | Calculation | Result |
|---|---|---|
| Mean | (1 + 2 + 3 + 4 + 5) ÷ 5 | 3 |
| Sum of squared differences | 4 + 1 + 0 + 1 + 4 | 10 |
| Sample variance | 10 ÷ (5 − 1) | 2.5 |
| Sample standard deviation | √2.5 | 1.581139 |
Sample, population and standard error
Use population when your list is every member of the group you care about, such as the scores of all students in one class. Use sample when your list is a subset, such as a survey of some of the people in a city.
The standard error of the mean estimates how much the sample mean would vary between samples. It equals the sample standard deviation divided by the square root of n. Larger samples give a smaller standard error, which is why bigger studies give more reliable averages.
If you want a range that is likely to contain the true mean, the confidence interval calculator builds one from the same ideas. To see how many values you need for a study, the sample size calculator helps.
Reading the result
For data that follows a bell-shaped normal curve, about 68% of values lie within one standard deviation of the mean, and about 95% lie within two. Many real datasets are close to this pattern, but not all of them are.
To see how far one value is from the mean, in standard deviations, use the z-score calculator. Compare the spread of two datasets by their standard deviations, and always look at the mean too.
- Compare like with like. Standard deviations are only comparable when the units and the typical size of the data are similar.
- Watch for outliers. One extreme value can raise the standard deviation a lot.
Tips for accurate results
Mistakes usually come from the data entry or the choice of formula. These checks help:
- Check every number. A missing or extra value changes both the mean and the spread.
- Pick the right type. Use sample for a subset and population for the whole group.
- Use the mean from the same list. The calculator finds it for you, so do not average the results of different lists.
- Read the working. Check the sum of squares and the count, then compare them with a quick mental estimate.
- Use the average tool for the mean alone. The statistics calculator also gives the mean, median and other summary values.
The formula
Mean
μ = (x₁ + x₂ + … + xₙ) ÷ n
- μ
- the mean of the numbers
Variance
Sample: s² = Σ(xᵢ − μ)² ÷ (n − 1). Population: σ² = Σ(xᵢ − μ)² ÷ n
- Σ
- add up over all the numbers
- n − 1
- used for a sample to correct for estimating the mean from the same data
Standard deviation
s = √s² or σ = √σ²
- √
- the square root
Standard error of the mean
SEM = s ÷ √n
- s
- the sample standard deviation
- n
- the number of values
Worked example
Sample standard deviation of 1, 2, 3, 4, 5
- 1.Mean: (1 + 2 + 3 + 4 + 5) ÷ 5 = 3.
- 2.Squared differences: (1 − 3)² + (2 − 3)² + (3 − 3)² + (4 − 3)² + (5 − 3)² = 4 + 1 + 0 + 1 + 4 = 10.
- 3.Variance: 10 ÷ (5 − 1) = 2.5.
- 4.Standard deviation: √2.5 = 1.581139.
The sample standard deviation is 1.581139. The standard error of the mean is 0.707107.
Frequently asked questions
How do I calculate the standard deviation?
Find the mean, then the squared distance of each value from it. Add those squares, divide by n or n − 1, and take the square root. For 1, 2, 3, 4, 5 the sample standard deviation is 1.581139.
When should I use sample or population?
Use population when your list includes every member of the group you care about. Use sample when the list is a subset, such as survey answers from some of the people you wanted to study. The sample version divides by n − 1, which gives a fairer estimate of the spread.
What is a good standard deviation?
There is no single good value. A small standard deviation means the data is consistent, and a large one means it varies more. Judge it against the mean and the purpose of your study.
What is the difference between standard deviation and variance?
Variance is the average of the squared distances from the mean, so its units are squared. Standard deviation is the square root of the variance, so it is in the original units.
Sources
Last reviewed by the GridCalculators team.