How to use the standard deviation calculator
- Type or paste your numbers, separated by commas, spaces or new lines. A column copied from Excel or Google Sheets works.
- Choose sample if the numbers are part of a larger group, or population if they are the whole group.
- Read the standard deviation, then the steps: mean, sum of squared deviations, variance and square root.
How to calculate standard deviation by hand
1. Find the mean: add the values and divide by how many there are. 2. Subtract the mean from each value and square the result. 3. Add the squares. 4. Divide by n − 1 for a sample or n for a population; this is the variance. 5. Take the square root.
For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 40 ÷ 8 = 5. The squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. The sample variance is 32 ÷ 7 ≈ 4.571, so s ≈ 2.138. The population variance is 32 ÷ 8 = 4, so σ = 2.
Sample or population: why n − 1?
Use population (divide by n) only when you have every member of the group, such as the scores of everyone in one class. Use sample (divide by n − 1) when your values are drawn from something bigger, such as a survey or a set of measurements. This is the usual case.
A sample's values sit closer to their own mean than to the true population mean, so dividing by n would understate the spread. Dividing by n − 1 (Bessel's correction) makes the variance an unbiased estimate. The difference shrinks as n grows.
| Your data | Divide by | Excel / Google Sheets |
|---|---|---|
| A sample from a larger group | n − 1 | STDEV.S (or STDEV) |
| The whole population | n | STDEV.P (or STDEVP) |
What standard deviation tells you
Standard deviation is the typical distance of a value from the mean, in the same units as the data. A small value means the numbers are bunched together; a large one means they are spread out.
For data that roughly follow a bell curve, about 68% of values lie within one standard deviation of the mean, about 95% within two and about 99.7% within three. The variance is the standard deviation squared. The standard error, sd ÷ √n, measures how precisely the sample mean estimates the population mean.
Worked examples
Test scores (sample)
70, 75, 80, 85, 90: mean 80, squared deviations add to 250. s = √(250 ÷ 4) ≈ 7.906.
Whole population
2, 4, 4, 4, 5, 5, 7, 9 treated as the whole group: σ = √(32 ÷ 8) = 2.
Frequently asked questions
Should I use sample or population standard deviation?
Use sample (n − 1) unless your data cover every member of the group you care about. Most real data, such as surveys, experiments and measurements, are samples.
What is the difference between STDEV.S and STDEV.P in Excel?
STDEV.S divides by n − 1 and gives the sample standard deviation; STDEV.P divides by n and gives the population standard deviation. The older STDEV and STDEVP functions do the same.
What is the difference between variance and standard deviation?
Variance is the average squared distance from the mean; standard deviation is its square root, so it is in the same units as the data. For more detail on variance, use the variance calculator.
Can standard deviation be negative?
No. It is a square root, so it is zero when all values are equal and positive otherwise.
Is there a limit on how many values I can enter?
No fixed limit. Paste as many as you have; the calculation runs in your browser and nothing is sent anywhere. The chart is shown for up to 40 values.