Standard Deviation Calculator
Paste a list of numbers to get the sample and population standard deviation side by side, plus variance, mean, range and mean \u00b1 1, 2 and 3 SD, with every step written out. For the center of the same list, the Average Calculator also shows median and mode.
- x̄ = (4 + 8 + 6 + 5 + 3 + 7) ÷ 6 = 33 ÷ 6 = 5.5
- Subtract the mean from each value and square the result, for example (4 − 5.5)² = (−1.5)² = 2.25. Every value is in the table below.
- Σ(x − x̄)² = 2.25 + 6.25 + 0.25 + 0.25 + 6.25 + 2.25 = 17.5
- Sample variance s² = 17.5 ÷ (6 − 1) = 3.5; population variance σ² = 17.5 ÷ 6 = 2.9167
- Sample s = √3.5 = 1.8708; population σ = √2.9167 = 1.7078
| x | x − x̄ | (x − x̄)² |
|---|---|---|
| 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 |
| Σ = 33 | 0 | 17.5 |
What is standard deviation
Standard deviation is a single number for the spread of data around its mean: roughly the typical distance between a value and the average. A low standard deviation means the values sit close to the mean; a high one means they are spread wide. Both 9, 10, 11 and 0, 10, 20 have a mean of 10, but their sample standard deviations are 1 and 10.
It is measured in the same unit as the data, so heights in centimetres give a standard deviation in centimetres. Variance is the standard deviation squared (for 0, 10, 20 the sample variance is 100), which is why variance carries squared units such as cm².
Standard deviation formula
Sample: s = √( Σ(xᵢ − x̄)² ÷ (n − 1) )
Population: σ = √( Σ(xᵢ − μ)² ÷ n )
Use the sample formula when your numbers are a subset of a larger group you want to describe, and the population formula when the list contains every member of the group. Dividing by n − 1 instead of n (Bessel's correction) compensates for a sample's mean sitting closer to its own values than the true population mean does.
Variable definitions
xᵢ: Each value in the dataset (x₁, x₂, … xₙ).x̄: Sample mean: the sum of the values divided by n.μ: Population mean: the same average when the data is the whole population.n: Number of values in the dataset.Σ: Sum over every value.s / σ: Sample / population standard deviation.s² / σ²: Sample / population variance (the value before the square root).
How to find standard deviation
Worked on the data set 5, 9, 8, 12, 6, 10, 6, 8 (n = 8):
- Find the mean. x̄ = (5 + 9 + 8 + 12 + 6 + 10 + … (2 more)) ÷ 8 = 64 ÷ 8 = 8
- Find each deviation and square it. Subtract the mean from each value and square the result, for example (5 − 8)² = (−3)² = 9. The full table:
| x | x − x̄ | (x − x̄)² |
|---|---|---|
| 5 | −3 | 9 |
| 9 | 1 | 1 |
| 8 | 0 | 0 |
| 12 | 4 | 16 |
| 6 | −2 | 4 |
| 10 | 2 | 4 |
| 6 | −2 | 4 |
| 8 | 0 | 0 |
| Σ = 64 | 0 | 38 |
- Add the squares. Σ(x − x̄)² = 9 + 1 + 0 + 16 + 4 + 4 + 4 + 0 = 38
- Divide. Sample variance s² = 38 ÷ (8 − 1) = 5.4286; population variance σ² = 38 ÷ 8 = 4.75
- Take the square root. Sample s = √5.4286 = 2.3299; population σ = √4.75 = 2.1794
Result: sample standard deviation 2.3299, population standard deviation 2.1794.
Worked example
Dataset: 4, 8, 6, 5, 3, 7 (n = 6).
- Mean: 33 ÷ 6 = 5.5
- Squared deviations: 2.25, 6.25, 0.25, 0.25, 6.25, 2.25 → sum = 17.5
- Sample variance: 17.5 ÷ 5 = 3.5; sample SD ≈ 1.8708
- Population variance: 17.5 ÷ 6 ≈ 2.9167; population SD ≈ 1.7078
- Min = 3, Max = 8, Range = 5
How to use this calculator
- Paste or type your numbers separated by commas, spaces, tabs, semicolons or new lines.
- Choose Sample or Population; the chosen result is highlighted and both are always shown.
- Pick how many decimals to display.
- Read the summary, the written steps and the per-value deviation table.
This SD calculator returns the count, sum, mean, sum of squared deviations, sample and population variance and standard deviation, minimum, maximum, range, standard error of the mean and the mean ± 1, 2 and 3 standard deviations. Because both variances are listed, it also works as a variance calculator. For the mean, median and mode alone, use the Average Calculator.
Common mistakes
- Sample vs population: using the wrong divisor changes the answer. Use sample (n − 1) unless you have literally every data point in the population.
- Confusing SD with variance: variance is SD squared and uses the same units squared (e.g. dollars²).
- Forgetting to square the deviations: the plain deviations always add up to 0 (see the Σ row of the table), so they say nothing about spread until squared.
- Cutting decimals too early: shortening the mean before subtracting it from every value adds error to each square. Keep full precision until the final answer.
Sample vs population standard deviation
Ask whether your list is everything you want to describe. If it is (every student in one class, every month of one year), use the population formula and divide by n. If it is a subset used to estimate a larger group (a survey, a batch of test measurements), use the sample formula and divide by n − 1.
Same data, both answers: for 5, 9, 8, 12, 6, 10, 6, 8 the sample standard deviation is 2.3299 and the population standard deviation is 2.1794. The sample value is always the larger of the two, and the gap shrinks as n grows.
How to calculate sample standard deviation
Find the mean, add up the squared deviations, divide by n − 1 and take the square root. For the data above: √(38 ÷ 7) = 2.3299.
How to calculate standard deviation on a calculator
TI-84
- Press STAT, choose 1:Edit and type your values into list L1.
- Press STAT, move to CALC and choose 1:1-Var Stats (on newer models set List to L1, then select Calculate).
- Read Sx for the sample standard deviation and σx for the population standard deviation; x̄ is the mean.
Casio scientific calculators
Switch to the statistics (STAT) mode for single-variable data, enter each value in the data list, then open the statistics results. The sample standard deviation is shown as sx (or xσn−1 on older models) and the population standard deviation as σx (or xσn). Key sequences differ between models, so check your calculator's manual for the exact buttons.
Excel and Google Sheets
| Formula | Returns |
|---|---|
=STDEV.S(A1:A10) | Sample standard deviation |
=STDEV.P(A1:A10) | Population standard deviation |
=STDEV(A1:A10) | Older name; same as STDEV.S (sample) |
=VAR.S(A1:A10) / =VAR.P(A1:A10) | Sample / population variance |
The 68-95-99.7 rule
For data that is roughly bell-shaped (symmetric, with most values in the middle), about 68% of values fall within 1 standard deviation of the mean, about 95% within 2 and about 99.7% within 3. If exam scores have a mean of 70 and a standard deviation of 10, roughly 68% of students scored 60–80, 95% scored 50–90 and 99.7% scored 40–100.
The calculator shows these mean ± SD ranges for your data. For 5, 9, 8, 12, 6, 10, 6, 8 (sample SD), mean ± 1 SD is 5.6701 to 10.3299 and holds 6 of 8 values (75%); mean ± 2 SD is 3.3401 to 12.6599 and holds 8 of 8 (100%).
The rule only applies to roughly bell-shaped data. Small, skewed or lopsided data sets can differ a lot; for any shape, at least 75% of values lie within 2 standard deviations of the mean.
Standard error of the mean
The standard error of the mean, s ÷ √n, measures how precisely a sample mean estimates the population mean. It shrinks as n grows, while the standard deviation stays about the same. For 5, 9, 8, 12, 6, 10, 6, 8 it is 2.3299 ÷ √8 ≈ 0.8238.
Browse the math calculators for related percentage, statistics and measurement tasks.
Frequently asked questions
›What is standard deviation?
Standard deviation measures how spread out the values in a dataset are from the mean. A small SD means values cluster near the mean; a large one means they're spread far from it.
›What's the difference between sample and population standard deviation?
Sample SD divides by (n − 1) and is used when your data is a sample from a larger population. Population SD divides by n and is used when you have the entire population.
›How can I calculate a standard deviation?
Find the mean, subtract the mean from each value and square the result, sum those squares, divide by n (population) or n − 1 (sample), then take the square root. The Average Calculator can check that first mean separately.
›What is the standard deviation of 5, 9, 8, 12, 6, 10, 6, 8?
For 5, 9, 8, 12, 6, 10, 6, 8 the mean is 8 and the squared deviations add up to 38. Sample standard deviation s = √(38 ÷ 7) ≈ 2.3299 (variance 5.4286). Population standard deviation σ = √(38 ÷ 8) ≈ 2.1794 (variance 4.75).
›What is the standard deviation of 5 5 5 9 9 9 10 10 10?
For 5, 5, 5, 9, 9, 9, 10, 10, 10 the mean is 8 and the squared deviations add up to 42. Sample standard deviation s = √(42 ÷ 8) ≈ 2.2913 (variance 5.25). Population standard deviation σ = √(42 ÷ 9) ≈ 2.1602 (variance 4.6667).
›How to calculate SD in calculator?
On a TI-84, press STAT → 1:Edit and type the values into L1, then STAT → CALC → 1:1-Var Stats. Sx is the sample standard deviation and σx the population one. In Excel or Google Sheets use =STDEV.S(A1:A10) for a sample and =STDEV.P(A1:A10) for a population.
›What is variance?
Variance is the square of the standard deviation. It's the average of the squared differences from the mean and uses the same n or n − 1 divisor.
›Why divide by n − 1 for sample standard deviation?
Dividing by n − 1 (Bessel's correction) makes the sample variance an unbiased estimator of the population variance. Dividing by n alone would systematically underestimate the true spread for small samples.
›What format should my data be in?
Numbers separated by commas, spaces, tabs, semicolons or new lines. Negatives, decimals and exponents such as 1e3 work. Anything that is not a number is skipped, and the calculator tells you how many entries it ignored. If these are measurements, retain their original precision and use the Sig Fig Calculator only when reporting a final calculation.
›What are the min, max, and range?
The minimum and maximum are the smallest and largest values in the dataset. Range = max − min. Together they give you a quick sense of the data's spread alongside the SD.
›What is the standard error of the mean?
The standard error of the mean is s ÷ √n. It describes how precisely the sample mean estimates the population mean, not how spread out the individual values are. For 5, 9, 8, 12, 6, 10, 6, 8 it is 2.3299 ÷ √8 ≈ 0.8238.
Related calculators
If this helped, the following calculators are useful for everyday math problems: