
To calculate standard deviation, find the mean, subtract it from each value, square those differences, average them, then take the square root. For the data 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the squared differences add up to 32, and 32 ÷ 8 = 4, so the population standard deviation is √4 = 2. For a sample, divide by n − 1 instead: √(32 ÷ 7) ≈ 2.14.
In short: Standard deviation measures how spread out numbers are around the mean. Small = values close together; large = values spread out. Use n for a whole population and n − 1 for a sample.
In this guide
- What standard deviation means
- The formulas
- How to calculate it in 5 steps
- Worked example: population
- Worked example: sample
- Population vs sample: n or n − 1?
- Variance and the shortcut formula
- From a frequency table
- What the number tells you
- The 68–95–99.7 rule
- Excel, Google Sheets and calculators
- Common mistakes
- Practice problems
- FAQ
What Does Standard Deviation Mean?
Standard deviation tells you the typical distance of the values from their mean. Two sets can have the same average but very different spreads:
| Data set | Mean | Standard deviation | What it shows |
|---|---|---|---|
| 9, 10, 10, 11 | 10 | 0.71 | Values sit close to the mean |
| 1, 5, 15, 19 | 10 | 7.28 | Values are spread far from the mean |
The mean alone hides this difference, which is why standard deviation is reported alongside the mean, median, mode and range. The range only uses the two extreme values; standard deviation uses every value.
Standard Deviation Formulas
| Population | Sample | |
|---|---|---|
| Symbol | σ (sigma) | s |
| Formula | σ = √( Σ(x − μ)² ÷ N ) | s = √( Σ(x − x̄)² ÷ (n − 1) ) |
| Mean used | μ, the population mean | x̄, the sample mean |
| Divide by | N, the number of values | n − 1 |
Σ means “add up”, x is each value, and (x − mean)² is the squared distance of each value from the mean.

How to Calculate Standard Deviation in 5 Steps
- Find the mean. Add the values and divide by how many there are. Our mean, median and mode calculator can do this step for you.
- Subtract the mean from each value. Some differences will be negative.
- Square each difference. This makes every result positive.
- Add the squares and divide. Divide by N for a population or by n − 1 for a sample. The result is the variance.
- Take the square root of the variance. That is the standard deviation, in the same units as the data.
Worked Example: Population Standard Deviation
Data: 2, 4, 4, 4, 5, 5, 7, 9 (all 8 values we care about).
| 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 |
| Sum = 40 | 0 | 32 |
- Mean = 40 ÷ 8 = 5.
- Variance = 32 ÷ 8 = 4.
- Standard deviation σ = √4 = 2.
The differences always add up to 0, which is why we square them before averaging.
Worked Example: Sample Standard Deviation
Five test scores picked from a larger class: 85, 90, 78, 92, 88.
| Score | x − 86.6 | (x − 86.6)² |
|---|---|---|
| 85 | −1.6 | 2.56 |
| 90 | 3.4 | 11.56 |
| 78 | −8.6 | 73.96 |
| 92 | 5.4 | 29.16 |
| 88 | 1.4 | 1.96 |
| Sum = 433 | 119.2 |
- Mean = 433 ÷ 5 = 86.6.
- Sample variance = 119.2 ÷ (5 − 1) = 29.8.
- Sample standard deviation s = √29.8 ≈ 5.46.
If these five scores were the whole class, divide by 5 instead: √23.84 ≈ 4.88.
Population vs Sample: Divide by n or n − 1?
- Population (divide by N): you have every value you care about, such as the marks of all 30 students in your class.
- Sample (divide by n − 1): your data is a part of a bigger group and you want to estimate that group’s spread, such as 50 people surveyed from a city.
A sample tends to sit a little closer to its own mean than the full population does, so dividing by n − 1 (Bessel’s correction) makes the estimate slightly bigger and more accurate. With large samples the two answers are almost the same. If a textbook question does not say, check which symbol it uses: σ means population, s means sample.
Variance and the Shortcut Formula
Variance is the standard deviation squared (σ² or s²). It is in squared units, which is why we take the square root to get back to the units of the data. A quicker way to get the population variance is:
σ² = (Σx² ÷ N) − μ²
Example: For 2, 4, 4, 4, 5, 5, 7, 9: Σx² = 232, so σ² = 232 ÷ 8 − 5² = 29 − 25 = 4 and σ = 2, the same answer with fewer subtractions.
Standard Deviation From a Frequency Table
When values repeat, multiply each squared difference by its frequency f.
| x | f | f·x | x − 2.1 | f·(x − 2.1)² |
|---|---|---|---|---|
| 1 | 2 | 2 | −1.1 | 2.42 |
| 2 | 5 | 10 | −0.1 | 0.05 |
| 3 | 3 | 9 | 0.9 | 2.43 |
| Total | 10 | 21 | 4.9 |
- Mean = 21 ÷ 10 = 2.1.
- Variance = 4.9 ÷ 10 = 0.49.
- Standard deviation = √0.49 = 0.7.
How to Interpret Standard Deviation
- 0 means every value is the same.
- Small compared with the mean means the data is consistent, for example a machine filling bottles to almost exactly 500 mL.
- Large compared with the mean means the data varies a lot, for example daily sales in a shop.
- It is never negative, and it is in the same units as the data (cm, marks, rupees).
The 68–95–99.7 Rule
For data with a bell-shaped (normal) distribution, about 68% of values lie within 1 standard deviation of the mean, about 95% within 2, and about 99.7% within 3.
| Within | Share of data | IQ-style scores (mean 100, SD 15) |
|---|---|---|
| 1 SD | about 68% | 85 to 115 |
| 2 SD | about 95% | 70 to 130 |
| 3 SD | about 99.7% | 55 to 145 |
A score of 130 is (130 − 100) ÷ 15 = 2 standard deviations above the mean. This number is called a z-score.
Standard Deviation in Excel, Google Sheets and on a Calculator
| Tool | Sample | Population |
|---|---|---|
| Excel | =STDEV.S(A1:A8) | =STDEV.P(A1:A8) |
| Google Sheets | =STDEV(A1:A8) or =STDEV.S(A1:A8) | =STDEVP(A1:A8) or =STDEV.P(A1:A8) |
| TI-84 | Enter data in L1 (STAT, EDIT), then STAT, CALC, 1-Var Stats: read Sx | Same screen: read σx |
| Casio fx-991EX | MENU, Statistics, 1-Variable, enter data, then OPTN, 1-Variable Calc: read sx | Same screen: read σx |
For the data 2, 4, 4, 4, 5, 5, 7, 9, STDEV.P gives 2 and STDEV.S gives 2.138.
Common Mistakes
- Forgetting to square the differences, so the total comes out as 0.
- Stopping at the variance and forgetting the square root.
- Using n when the question is about a sample (or n − 1 for a full population).
- Rounding the mean too early, which pushes every later step off. Keep full precision until the end.
- Squaring a negative difference wrongly: (−3)² = 9, not −9.
Practice Problems
1. Find the population standard deviation of 3, 7, 7, 19.
Mean = 9. Squared differences: 36, 4, 4, 100 = 144. Variance = 144 ÷ 4 = 36, so σ = 6.
2. Find the sample standard deviation of 6, 8, 10.
Mean = 8. Squared differences: 4, 0, 4 = 8. Variance = 8 ÷ (3 − 1) = 4, so s = 2.
3. What is the standard deviation of 5, 5, 5, 5?
0, because every value equals the mean.
4. The variance of a data set is 49. What is the standard deviation?
√49 = 7.
5. Test scores have mean 70 and SD 8 and are bell-shaped. About what percentage of scores lie between 62 and 78?
About 68%, because 62 and 78 are 1 standard deviation either side of the mean.
FAQ
What is standard deviation in simple words?
It is the typical distance of the values from their average. A small standard deviation means the numbers are close together; a large one means they are spread out.
How do you calculate standard deviation step by step?
Find the mean, subtract it from each value, square the results, add them, divide by n (population) or n − 1 (sample), then take the square root.
What is the difference between population and sample standard deviation?
Population standard deviation divides by N and is used when you have every value. Sample standard deviation divides by n − 1 and is used when your data is a sample of a bigger group.
Can standard deviation be negative?
No. It is a square root of a sum of squares, so it is always 0 or positive.
What is the relationship between variance and standard deviation?
Standard deviation is the square root of the variance. If the variance is 4, the standard deviation is 2.
Working out grades or GPA where items count differently? See how to calculate a weighted average.
Sources and Further Reading
- OpenStax Statistics, Section 2.7: Measures of the Spread of the Data.
- OpenStax Contemporary Mathematics, Section 8.4: Range and Standard Deviation.
- LibreTexts, Introductory Statistics 2e: Measures of the Spread of the Data.
- Microsoft Support: STDEV.S function.
Related: mean, median and mode calculator, mean, median, mode and range, square roots, square roots on a calculator, the math glossary and all free math calculators.
Check your working in seconds
Type any problem from this guide into the free CalcSolver calculator and see the answer, with fractions, instantly.


