📊 Standard Deviation Calculator
By ToolNimba Editorial Team · Updated 2026-06-19
Sample SD divides by n-1; population SD divides by n.
This standard deviation calculator turns a list of numbers into the statistics you actually need: count, mean, variance, and standard deviation. Paste or type your values separated by commas, spaces, or new lines and you will see both the sample standard deviation (dividing by n-1) and the population standard deviation (dividing by n) at once, so you never have to guess which one to report.
What is the Standard Deviation Calculator?
Standard deviation measures how spread out a set of numbers is around their mean (average). A small standard deviation means the values cluster tightly near the mean, while a large one means they are scattered widely. It is reported in the same units as the data itself, which makes it easy to interpret: if test scores have a mean of 70 and a standard deviation of 5, most scores sit roughly between 65 and 75.
Variance is the step before standard deviation. You find it by taking each value, subtracting the mean, squaring the result (so negatives do not cancel positives), and averaging those squared differences. The standard deviation is simply the square root of the variance, which brings the figure back into the original units. Squaring is the reason variance is harder to read on its own: a variance of 25 corresponds to a standard deviation of 5.
The key choice is whether your numbers are an entire population or a sample drawn from a larger group. Population standard deviation divides the summed squared differences by n. Sample standard deviation divides by n-1 instead, a correction (called Bessel correction) that compensates for the fact that a sample tends to underestimate the true spread of the population it came from. When in doubt and you are working with a sample, which is the usual case in research and surveys, use the n-1 version.
When to use it
- Reporting the spread of exam or survey results alongside the average.
- Checking how consistent a process or measurement is in quality control.
- Working out volatility or risk from a series of returns or readings.
- Completing statistics homework and verifying answers step by step.
How to use the Standard Deviation Calculator
- Type or paste your numbers into the box, separated by commas, spaces, or new lines.
- Read the count and mean to confirm all your values were picked up correctly.
- Use the sample standard deviation (n-1) if your data is a sample of a larger group.
- Use the population standard deviation (n) if your data covers the whole group.
- Note the variance too, which is just the square of the matching standard deviation.
Formula & method
Worked examples
Find the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9 (n = 8).
- Mean = (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 = 5
- Squared differences from the mean: 9, 1, 1, 1, 0, 0, 4, 16, which sum to 32
- Population variance = 32 ÷ 8 = 4, so population SD = √4 = 2
- Sample variance = 32 ÷ (8 − 1) = 32 ÷ 7 ≈ 4.5714, so sample SD = √4.5714 ≈ 2.138
Result: Population SD = 2, sample SD ≈ 2.138
Find the standard deviation of 10, 12, 23, 23, 16, 23, 21, 16 (n = 8).
- Mean = (10 + 12 + 23 + 23 + 16 + 23 + 21 + 16) ÷ 8 = 144 ÷ 8 = 18
- Squared differences from the mean: 64, 36, 25, 25, 4, 25, 9, 4, which sum to 192
- Population variance = 192 ÷ 8 = 24, so population SD = √24 ≈ 4.899
- Sample variance = 192 ÷ (8 − 1) = 192 ÷ 7 ≈ 27.4286, so sample SD ≈ 5.237
Result: Population SD ≈ 4.899, sample SD ≈ 5.237
Sample versus population standard deviation at a glance
| Aspect | Sample (s) | Population (σ) |
|---|---|---|
| Divides by | n − 1 | n |
| When to use | Data is a sample of a larger group | Data is the entire group |
| Symbol | s (SD), s² (variance) | σ (SD), σ² (variance) |
| Tends to be | Slightly larger | Slightly smaller |
| Spreadsheet function | STDEV.S, VAR.S | STDEV.P, VAR.P |
Empirical (68-95-99.7) rule for normally distributed data
| Range around the mean | Approximate share of values |
|---|---|
| Within 1 standard deviation | About 68% |
| Within 2 standard deviations | About 95% |
| Within 3 standard deviations | About 99.7% |
Common mistakes to avoid
- Using n instead of n-1 for a sample. Survey and research data is almost always a sample. Dividing by n there underestimates the spread. Use the sample formula (n-1) unless you genuinely have every member of the group.
- Forgetting to square the differences. Each difference from the mean must be squared before summing, otherwise positives and negatives cancel out and you get zero. The final square root reverses the squaring at the end.
- Confusing variance with standard deviation. Variance is in squared units and standard deviation is its square root in the original units. A variance of 25 means a standard deviation of 5, not 25.
- Including labels or stray text in the data. Only numeric values are counted. Pasting headers, units, or currency symbols can drop or skew values, so check that the count matches how many numbers you intended to enter.
Glossary
- Mean (x̄)
- The arithmetic average: the sum of all values divided by how many there are.
- Variance
- The average of the squared differences from the mean. Standard deviation is its square root.
- Standard deviation
- A measure of spread in the same units as the data, equal to the square root of the variance.
- Sample
- A subset of values drawn from a larger population, used to estimate that population.
- Population
- The complete set of values you care about, with no members left out.
- Bessel correction
- Dividing by n-1 rather than n for a sample, which gives a less biased estimate of the population variance.
Frequently asked questions
What is the difference between sample and population standard deviation?
Sample standard deviation divides the summed squared differences by n-1, while population standard deviation divides by n. Use the sample version when your data is a subset of a larger group, and the population version when it covers the whole group.
Should I use n or n-1?
Use n-1 for a sample, which is the most common case in research and surveys. Use n only when your numbers represent the entire population with no members missing.
How do you calculate standard deviation?
Find the mean, subtract it from each value and square the result, add those squared differences, divide by n (population) or n-1 (sample) to get the variance, then take the square root.
What is the difference between variance and standard deviation?
Variance is the average of the squared differences from the mean, so it is in squared units. Standard deviation is the square root of the variance, which puts it back in the original units and makes it easier to interpret.
Can standard deviation be negative?
No. It is a square root of squared differences, so it is always zero or positive. A standard deviation of zero means every value in the set is identical.
How do I enter my numbers in this calculator?
Type or paste them into the box separated by commas, spaces, or new lines. The calculator ignores blanks and non-numeric text, and the count shows how many valid numbers it found.