To calculate standard deviation, find the mean, subtract it from each value, square those differences, add them, divide by n − 1 for a sample (or n for a whole population), then take the square root. For 4, 8, 6, 5, 3, 7 the mean is 5.5 and the sample standard deviation is 1.87.

Standard deviation tells you how spread out your numbers are around the average. Learning how to calculate standard deviation by hand once makes every calculator and spreadsheet result easier to trust and explain.
This guide gives you five steps, a full worked example, a clear rule for sample vs population, what the number actually means, and the mistakes that cause wrong answers. If you just need the result, our standard deviation calculator shows both versions.
How Do You Calculate Standard Deviation Step by Step?
You calculate standard deviation by finding the mean, squaring each value’s distance from the mean, averaging those squares, and taking the square root.
- Find the mean. Add the values and divide by how many there are.
- Find each deviation. Subtract the mean from each value.
- Square each deviation. This makes every distance positive.
- Add the squares and divide. Divide by n − 1 for a sample or n for a full population. The result is the variance.
- Take the square root of the variance. That is the standard deviation.
Population SD (σ) = √( Σ(x − μ)² ÷ N )
The sample formula is the one the NIST/SEMATECH e-Handbook of Statistical Methods lists under measures of scale. x̄ is the sample mean, μ is the population mean, and Σ means add them all up.
What Is an Example of Calculating Standard Deviation?
For the six values 4, 8, 6, 5, 3 and 7, the mean is 5.5, the sum of squared deviations is 17.5, and the standard deviation is 1.87 for a sample or 1.71 for a population.
A coach records how many free throws six players make out of 10: 4, 8, 6, 5, 3, 7.
- Mean: (4 + 8 + 6 + 5 + 3 + 7) ÷ 6 = 33 ÷ 6 = 5.5.
- Deviations: −1.5, 2.5, 0.5, −0.5, −2.5, 1.5. They add to 0, which is a good check.
- Squares: 2.25, 6.25, 0.25, 0.25, 6.25, 2.25.
- Sum of squares: 17.5.
- Sample variance: 17.5 ÷ 5 = 3.5. Sample SD: √3.5 = 1.87.
- Population variance: 17.5 ÷ 6 = 2.92. Population SD: √2.92 = 1.71.
If these six players are the whole team, use 1.71. If they stand in for all players in the league, use 1.87.
| Value (x) | x − 5.5 | (x − 5.5)² |
|---|---|---|
| 4 | −1.5 | 2.25 |
| 8 | 2.5 | 6.25 |
| 6 | 0.5 | 0.25 |
| 5 | −0.5 | 0.25 |
| 3 | −2.5 | 6.25 |
| 7 | 1.5 | 2.25 |
| Sum | 0 | 17.5 |
Laying the work out in three columns like this is the fastest way to avoid slips by hand.
Should You Use Sample or Population Standard Deviation?
Use the population formula when your data includes every member of the group you care about, and use the sample formula when your data is a subset used to estimate a larger group.
Dividing by n − 1, a fix known as Bessel’s correction, makes the sample variance an unbiased estimate of the population variance. A sample tends to sit closer to its own mean than to the true mean, so dividing by a slightly smaller number nudges the answer up to compensate.
| Number of values (n) | Sample SD ÷ population SD | Sample SD is larger by |
|---|---|---|
| 2 | 1.414 | 41.4% |
| 5 | 1.118 | 11.8% |
| 10 | 1.054 | 5.4% |
| 30 | 1.017 | 1.7% |
| 100 | 1.005 | 0.5% |
The ratio is √(n ÷ (n − 1)) for the same data. Computed for each n shown.
The choice matters most for small data sets. With 100 or more values, the two answers are almost the same. When in doubt, most real problems use the sample version, because you rarely measure everyone. Spreadsheets give you both: in Excel and Google Sheets, STDEV.S is the sample SD and STDEV.P is the population SD.
What Does Standard Deviation Tell You?
Standard deviation tells you the typical distance between a value and the mean, in the same units as your data.
Two classes can both average 50 points and still look nothing alike. Scores of 48, 49, 50, 51, 52 have a sample SD of 1.58. Scores of 30, 40, 50, 60, 70 have a sample SD of 15.81. Same mean, ten times the spread.
For data that follows a bell shaped normal distribution, the SD also tells you where most values fall. The percentages below come from the normal curve, computed with the error function.
| Range | Share of values inside | Example: mean 70, SD 8 |
|---|---|---|
| Mean ± 1 SD | 68.27% | 62 to 78 |
| Mean ± 2 SD | 95.45% | 54 to 86 |
| Mean ± 3 SD | 99.73% | 46 to 94 |
This is the 68 95 99.7 rule, also called the empirical rule. It only holds for data that is close to normal.
A score of 86 on that test sits 2 SDs above the mean. That count of SDs is a z-score, and our z-score calculator turns it into a percentile. The Common Core high school standards ask students to do exactly this and to recognize data sets where a normal fit is not appropriate, such as strongly skewed incomes.
What Is the Difference Between Variance and Standard Deviation?
Variance is the average squared distance from the mean, and standard deviation is its square root, which puts the spread back into the original units.
In the free throw example, the sample variance is 3.5 “squared free throws,” which nobody can picture. The standard deviation, 1.87 free throws, reads naturally. That is why reports almost always give the SD.
- If your data is in dollars, the variance is in squared dollars and the SD is in dollars.
- Variances of independent things can be added. SDs cannot. Add the variances first, then take the square root.
- A variance or SD of 0 means every value is the same. Neither can ever be negative.
To compare spread between data sets with very different means, divide the SD by the mean. This ratio is the coefficient of variation. The tight class above has 1.58 ÷ 50 = 3.2%, and the spread out class has 15.81 ÷ 50 = 31.6%.
Is There a Faster Way to Calculate Standard Deviation by Hand?
Yes. The shortcut formula lets you work from the sum of the values and the sum of their squares, so you never have to write out each deviation.
Sample variance = that result ÷ (n − 1)
Check it on the free throw data. The squares are 16, 64, 36, 25, 9 and 49, which add to Σx² = 199. The plain sum is Σx = 33, so (Σx)² ÷ n = 1,089 ÷ 6 = 181.5. Then 199 − 181.5 = 17.5, the same sum of squares as before. Divide by 5 and take the root to get 1.87 again.
This version is handy with a basic calculator, because you can keep two running totals as you enter each number. One warning: when the values are large and very close together, such as 1,000,001 and 1,000,003, the two big totals nearly cancel and rounding can creep in. In that case, subtract a round number like 1,000,000 from every value first. Shifting all values by the same amount does not change the standard deviation at all.
What Are Common Mistakes When Calculating Standard Deviation?
The most common mistakes are using the wrong divisor, forgetting to square or to take the square root, and rounding the mean too early.
- Wrong divisor: dividing a sample by n understates the spread, by 11.8% when n is 5.
- Adding raw deviations: they always total 0, which is why you square them first.
- Stopping at the variance: 3.5 is the variance. The SD is √3.5 = 1.87.
- Early rounding: keep full decimals in the mean until the final step.
- Ignoring outliers: one extreme value can blow up the SD.
To see the last point, add a 25 to the free throw data. Out of 10 throws, a 25 is clearly a typo. The mean jumps from 5.5 to 8.29 and the sample SD jumps from 1.87 to 7.57, about four times larger. The median only moves from 5.5 to 6. Always look at the sorted data before trusting the SD, and try the mean, median and mode calculator for centers that resist outliers. Then run the clean data through the standard deviation calculator to confirm your hand work.
Quick Recap
- SD = square root of the average squared distance from the mean.
- Divide by n − 1 for a sample and by n for a full population.
- About 68%, 95% and 99.7% of normal data fall within 1, 2 and 3 SDs.
- Variance is in squared units; the SD is in the data’s own units.
- Check for outliers first, because one bad value can inflate the SD.

Frequently Asked Questions
Why do you divide by n − 1 for a sample?
Because a sample’s values sit closer to their own mean than to the true population mean, dividing by n would underestimate the spread. Dividing by n − 1, called Bessel’s correction, makes the sample variance an unbiased estimate.
What is a good standard deviation?
There is no universal good value. A small SD means values cluster tightly around the mean, and a large one means they spread out. Judge it against the mean, for example with the coefficient of variation, and against what your field expects.
Can standard deviation be negative?
No. It is the square root of an average of squared numbers, so it is always 0 or positive. A standard deviation of exactly 0 means every value in the data set is identical.
How do you calculate standard deviation in Excel?
Use =STDEV.S(A1:A10) for a sample and =STDEV.P(A1:A10) for a whole population. Google Sheets uses the same two function names. The older STDEV function matches STDEV.S.
What is the difference between standard deviation and standard error?
Standard deviation measures the spread of individual values. Standard error measures how much a sample mean would vary from sample to sample, and equals the SD divided by the square root of n.
Is standard deviation the same as average deviation?
No. Mean absolute deviation averages the plain distances from the mean, while standard deviation squares them first and takes a root at the end. For 4, 8, 6, 5, 3, 7 the mean absolute deviation is 1.5 and the sample SD is 1.87.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods: 1.3.5.6 Measures of Scale, variance and standard deviation formulas with the N − 1 divisor
- NIST/SEMATECH e-Handbook of Statistical Methods: 1.3.6.6.1 Normal Distribution, mean and standard deviation as the parameters of the normal curve
- Common Core State Standards: High School Interpreting Categorical and Quantitative Data, using mean and standard deviation to fit a normal distribution
