What is standard deviation?
Standard deviation is a number that describes spread. Take two classes with the same average test score of 75. In one class every student scores between 73 and 77. In the other class scores range from 40 to 100. The averages match, but the second class has a much larger standard deviation.
It is the most common measure of variability in school statistics and in science.
Standard deviation formula: population and sample
Population standard deviation divides by n, the number of values:
Sample standard deviation divides by n − 1:
Here μ or x̄ is the mean, and each xᵢ is one value.
How to use the standard deviation calculator
- Type or paste your numbers, separated by commas or spaces.
- Choose population or sample.
- Read the mean, the squared distances and the variance.
- Read the standard deviation at the top.
- Check that you picked the right type. A sample needs at least two values.
Standard deviation examples
Example 1: Population
Data: 2, 4, 4, 4, 5, 5, 7, 9.
- Mean: 40 ÷ 8 = 5.
- Squared distances: 9, 1, 1, 1, 0, 0, 4, 16. Their sum is 32.
- Variance: 32 ÷ 8 = 4.
- Standard deviation: √4 = 2.
Example 2: Sample
Data: 3, 5, 7, treated as a sample.
- Mean: 15 ÷ 3 = 5.
- Squared distances: 4, 0, 4. Their sum is 8.
- Variance: 8 ÷ (3 − 1) = 4.
- Standard deviation: √4 = 2.
The same list treated as a population would give a variance of 8 ÷ 3, so the choice matters.
Example 3: A classic data set
Take 10, 12, 23, 23, 16, 23, 21 and 16. The mean is 144 ÷ 8 = 18. The differences from the mean are −8, −6, 5, 5, −2, 5, 3 and −2. Their squares are 64, 36, 25, 25, 4, 25, 9 and 4, and the sum is 192.
- Population: variance = 192 ÷ 8 = 24, so the standard deviation is √24 ≈ 4.90.
- Sample: variance = 192 ÷ 7 ≈ 27.43, so the standard deviation is √27.43 ≈ 5.24.
The sample result is a little larger, as expected.
How to read the result
Compare the standard deviation with the mean. A standard deviation of 5 around a mean of 18 means values are typically about 5 units away from 18. If most of the data is roughly bell-shaped, about two thirds of the values lie within one standard deviation of the mean. A standard deviation close to zero means the values are almost identical.
Should I use sample or population?
Ask whether your list is every value you care about, or a part used to estimate a bigger group.
- Population (divide by n). You measured everyone: all 28 students in one class, every game this season.
- Sample (divide by n − 1). Your data stands in for more: 50 customers out of thousands, 10 test batches from a production line.
If you cannot decide, sample is the safer default for research and survey data. The two answers get closer as the list grows. The sample vs population guide explains why n − 1 corrects the estimate.
Why one number has no sample standard deviation
With one value, n − 1 is 0, and you cannot divide by 0. A single value also has no spread to measure. The calculator asks for at least two numbers in sample mode. In population mode, one value gives a standard deviation of 0.
What the result tells you
A small standard deviation means the values sit close to the mean; a large one means they are scattered. For roughly bell-shaped data, about 68 percent of values fall within one standard deviation of the mean and about 95 percent within two. To place one value on that scale, use the z-score calculator.
Standard deviation from a frequency table
When data comes as values and how often each occurs, you do not need to type every value. Enter value:count pairs.
| Value x | Count f | f × x | f × (x − 5)² |
|---|---|---|---|
| 2 | 1 | 2 | 9 |
| 4 | 3 | 12 | 3 |
| 5 | 2 | 10 | 0 |
| 7 | 1 | 7 | 4 |
| 9 | 1 | 9 | 16 |
| Total | 8 | 40 | 32 |
Mean = 40 ÷ 8 = 5. Population variance = 32 ÷ 8 = 4, so σ = 2. Sample variance = 32 ÷ 7 ≈ 4.571, so s ≈ 2.138. Type 2:1, 4:3, 5:2, 7:1, 9:1 to see the same working.
For grouped data in class intervals (such as 10–19, 20–29), use each interval's midpoint as x. The answer is then an estimate, because the exact values inside each class are unknown.
One, two and three standard deviations from the mean
The steps list the ranges mean ± 1, 2 and 3 standard deviations and how many of your values fall in each. For data that is roughly bell-shaped (normal), about 68%, 95% and 99.7% of values fall inside them, which is called the empirical rule. Your own counts will differ for small or skewed data sets, and comparing them with 68/95/99.7 is a quick check on whether the normal model fits.
| Range | Normal data | The sample data 2, 4, 4, 4, 5, 5, 7, 9 (σ = 2) |
|---|---|---|
| Mean ± 1σ | about 68% | 3 to 7: 6 of 8 values (75%) |
| Mean ± 2σ | about 95% | 1 to 9: 8 of 8 (100%) |
| Mean ± 3σ | about 99.7% | −1 to 11: 8 of 8 (100%) |
Coefficient of variation. The summary also gives standard deviation ÷ mean as a percent. It lets you compare spread between data sets with different units or sizes: a standard deviation of 2 on a mean of 5 (40%) is far more variable than 2 on a mean of 500 (0.4%). It is only meaningful for data measured from a true zero, such as weights or times, not temperatures in °C.
Standard deviation in Excel and Google Sheets
| You want | Excel | Google Sheets |
|---|---|---|
| Sample (n − 1) | =STDEV.S(range) | =STDEV.S(range) or =STDEV(range) |
| Population (n) | =STDEV.P(range) | =STDEV.P(range) or =STDEVP(range) |
| Sample variance | =VAR.S(range) | =VAR.S(range) |
If a spreadsheet and this calculator disagree, the usual cause is the sample/population choice.
Tips
- Separate your numbers with commas or spaces. For a frequency table, type each value with its count, like 4:3.
- Choose population if your list is the whole group, and sample if it is part of a larger group. Our guide on sample vs population standard deviation explains how to decide.
- A sample needs at least two values.
- The steps list each deviation and squared deviation, then a summary of n, mean, variance, standard deviation and the coefficient of variation, and the ranges one, two and three standard deviations from the mean. For a sample they also show the standard error of the mean, s ÷ √n.
- Look at the mean, median and mode too. Read mean, median and mode explained to learn when each one is the best summary.
- Keep extra decimals in your own work until the last step.
Common standard deviation mistakes
- Using population when you have a sample. This makes the spread look slightly too small.
- Forgetting to take the square root. The variance is not the standard deviation.
- Squaring the sum instead of summing the squares. Square each distance first, then add.
- Skipping the mean. Every distance is measured from the mean.
- Mixing units or scales. Do not combine centimeters with meters in one list.
Real-life uses
Teachers use standard deviation to see whether a test separated students or bunched them together. Scientists use it to describe measurement error. Factories use it to keep parts close to the target size. Investors use it to describe how much a price jumps around. It also shows up when test results are curved, which affects the grade you need on a final. See standard deviation explained for a plain-English walk-through.