Standard Diviation Calculator
Separate numbers with commas, spaces, or line breaks.
Data plot
Each dot is one value. The vertical line is the mean; the shaded band covers mean ± 1 standard deviation.
Calculation process
Step 1: Calculate the mean
Step 2: Subtract the mean from each value and square the result
Step 3: Divide by the divisor and take the square root
What is the standard deviation?
The standard deviation measures how far, on average, the values in a data set sit from their mean. A small standard deviation means the values cluster tightly around the mean; a large one means they are spread out. It is the square root of the variance, and because of that square root it is expressed in the same units as the original data, which is why it is usually easier to interpret than the variance itself.
Two versions exist, and the calculator above lets you switch between them:
- Sample standard deviation (s) — use when your data are a sample drawn from a larger population and you want to estimate the population’s spread. The sum of squared deviations is divided by n − 1.
- Population standard deviation (σ) — use when your data are the entire population of interest. The sum of squared deviations is divided by N.
Dividing by n − 1 instead of n (Bessel’s correction) makes the sample variance an unbiased estimate of the population variance. In most research settings the data are a sample, so the sample formula is the default in SPSS, R, Excel’s STDEV.S, and this calculator.
Standard deviation formula
Sample standard deviation
- s — sample standard deviation
- xi — each individual value
- x̄ — sample mean
- n — number of values in the sample
Population standard deviation
- σ — population standard deviation
- μ — population mean
- N — number of values in the population
How to calculate standard deviation by hand
Both versions follow the same five steps; only the divisor in step 4 changes.
Example 1: sample standard deviation
Six students report the number of hours they studied for an exam: 12, 15, 9, 20, 14, 18. Treat this as a sample.
| xi | xi − x̄ | (xi − x̄)² |
|---|---|---|
| 12 | 12 − 14.6667 = −2.6667 | 7.1111 |
| 15 | 15 − 14.6667 = 0.3333 | 0.1111 |
| 9 | 9 − 14.6667 = −5.6667 | 32.1111 |
| 20 | 20 − 14.6667 = 5.3333 | 28.4444 |
| 14 | 14 − 14.6667 = −0.6667 | 0.4444 |
| 18 | 18 − 14.6667 = 3.3333 | 11.1111 |
| Sum | 0 | 79.3333 |
The deviations always sum to zero, which is a quick check on the mean. Squaring removes the signs so the spread does not cancel out.
On average, study time varied by about four hours around the mean of 14.67 hours. Paste the same six numbers into the calculator above with “Sample” selected to confirm.
Example 2: population standard deviation
Now suppose those six students are the entire class (the whole population of interest), so we use the population formula on the same data.
The population value is smaller than the sample value (3.6362 vs 3.9833) because the divisor is larger. The gap shrinks as the number of observations grows; with hundreds of values the two are nearly identical.
Which one should I report?
- Survey responses, experimental measurements, or any data meant to generalize beyond the cases you collected → sample (s).
- Every unit you care about is in the data set — all employees in a department, all exam scores in one class you are only describing → population (σ).
Discussion