About this standard deviation calculator
Standard deviation tells you how spread out a set of numbers is around its average. A small standard deviation means the values sit close to the mean. A large one means they are scattered widely. This calculator takes a list of numbers and returns the sample standard deviation (s), the population standard deviation (σ), the variance, the mean, the standard error of the mean and the full working, so you can check homework or follow each step of an analysis.
Paste values separated by commas, spaces or new lines. If your data is already grouped, switch the data type to “Values with frequencies” and enter one value, frequency pair per line. Everything runs in your browser. Your numbers are never uploaded.
Sample or population: which one do you need?
Use the population formula when your list contains every member of the group you care about, such as the scores of all 30 students in one class. Use the sample formula when your list is only a subset used to estimate a larger group, such as 30 voters out of a city. The sample version divides by n − 1 instead of N (Bessel’s correction) because a sample tends to understate the true spread. If you are not sure, the sample standard deviation is the safer default for most coursework and research.
| Measure | Formula | Divide by |
|---|---|---|
| Population variance (σ²) | Σ(x − μ)² / N | N |
| Population standard deviation (σ) | √(σ²) | N |
| Sample variance (s²) | Σ(x − x̄)² / (n − 1) | n − 1 |
| Sample standard deviation (s) | √(s²) | n − 1 |
| Standard error of the mean | s / √n | — |
How to calculate standard deviation by hand
- Find the mean. Add the numbers and divide by how many there are.
- Subtract the mean from each number to get each deviation.
- Square every deviation so negatives do not cancel positives.
- Add the squares. This total is the sum of squares.
- Divide by N (population) or n − 1 (sample). That is the variance.
- Take the square root of the variance. That is the standard deviation.
Worked example: 5, 9, 8, 12, 6, 10, 6, 8
The eight values add up to 64, so the mean is 64 ÷ 8 = 8. The deviations are −3, 1, 0, 4, −2, 2, −2 and 0. Their squares are 9, 1, 0, 16, 4, 4, 4 and 0, which sum to 38. For a population, the variance is 38 ÷ 8 = 4.75 and σ = √4.75 ≈ 2.179. For a sample, the variance is 38 ÷ 7 ≈ 5.429 and s = √5.429 ≈ 2.330. The default numbers in the calculator above are exactly this data set, so you can compare each line of the working with the steps shown.
What does the result mean?
For data that is roughly bell-shaped, about 68% of values fall within one standard deviation of the mean, about 95% within two and about 99.7% within three. This is the empirical rule, and the calculator shows the mean ± 1, 2 and 3 standard deviations ranges to match. Standard deviation uses the same units as your data, so it is easier to interpret than variance.
Common mistakes
- Using the wrong formula. Calculators and spreadsheets differ. Excel’s STDEV.S is the sample version and STDEV.P is the population version.
Next steps: turn a value into a z-score with the Z-Score Calculator, build a range with the Confidence Interval Calculator, find the typical value with the Average Calculator, or test a result with the P-Value Calculator.
Frequently asked questions
Population standard deviation (sigma) divides the sum of squared deviations by N and is used when your data includes every member of the group. Sample standard deviation (s) divides by n minus 1 and is used when your data is a subset that estimates a larger group. The sample value is always a little larger for the same numbers, and the gap shrinks as the sample gets bigger.
Find the mean, subtract it from each value, square each difference, add the squares, divide by N for a population or n minus 1 for a sample to get the variance, then take the square root. This calculator shows a table with each value, its deviation and its squared deviation so you can follow every step.
The mean is 8 and the sum of squared deviations is 38. The population standard deviation is about 2.179 (the square root of 4.75) and the sample standard deviation is about 2.330 (the square root of 38 divided by 7, which is about 5.429).
Neither is better in general. A low standard deviation means values are consistent and close to the mean, which is good for quality control or predictable results. A high one means more variability, which may be expected for things like income or stock returns. Always judge it against the mean and the context of the data.
It can never be negative, because it is a square root of an average of squares. It is zero only when every value is identical, since there is then no spread at all.
Choose the option for values with frequencies and enter one value and its count per line, such as 4, 3 for the value 4 appearing three times. The calculator treats each value as repeated that many times, so the mean, variance and standard deviation match what you would get from the full expanded list.
It is the range from the mean minus two standard deviations to the mean plus two. For normally distributed data, about 95% of values fall inside it, so values outside it are fairly unusual.