๐ Standard Deviation Calculator (Sample and Population)
By ToolNimba Editorial Team ยท Updated 2026-06-20
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, sum, mean, variance, sum of squares, 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. Because it is in the original units, standard deviation is usually preferred over variance when you describe a dataset to other people.
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), summing those squared differences (a quantity called the sum of squares), and then dividing by the count. 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, not 25.
The key choice is whether your numbers are an entire population or a sample drawn from a larger group. Population standard deviation divides the sum of squares by n. Sample standard deviation divides by n-1 instead, a correction known as the 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, surveys, and lab work, use the n-1 version. This calculator shows both so you can copy whichever your assignment or report asks for.
Standard deviation rarely travels alone. The coefficient of variation (CV), also called relative standard deviation (RSD), divides the standard deviation by the mean and multiplies by 100 to express spread as a percentage. That makes it possible to compare consistency across datasets measured in different units or on very different scales, for example comparing the variability of heights in centimetres with weights in kilograms. The standard error of the mean (SEM), the sample standard deviation divided by the square root of n, tells you how precisely the sample mean estimates the true population mean and shrinks as your sample grows.
In a roughly normal (bell-shaped) distribution, standard deviation maps directly onto familiar percentages through the empirical rule: about 68 percent of values fall within one standard deviation of the mean, about 95 percent within two, and about 99.7 percent within three. This is why standard deviation underpins z-scores, confidence intervals, control charts, and risk measures like volatility in finance. A value more than two or three standard deviations from the mean is often treated as unusual or as a potential outlier.
There is no single number that counts as a high or low standard deviation in the abstract, because it depends entirely on the scale of your data and the context. A standard deviation of 10 is tiny for annual incomes but huge for adult body temperatures. The honest way to judge spread is to compare the standard deviation against the mean (using the coefficient of variation) or against a benchmark from similar datasets, rather than looking at the raw figure alone.
When to use it
- Reporting the spread of exam, survey, or experiment results alongside the average.
- Checking how consistent a process or measurement is in quality control and Six Sigma work.
- Working out volatility or risk from a series of investment returns or sensor readings.
- Comparing the variability of two datasets using the coefficient of variation (RSD).
- Calculating z-scores and confidence intervals for a statistics or research project.
- 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, which is just the square of the matching standard deviation.
- Copy the result and, if needed, divide the standard deviation by the mean for the coefficient of variation.
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 (the sum of squares)
- Population variance = 32 / 8 = 4, so population SD = sqrt(4) = 2
- Sample variance = 32 / (8 - 1) = 32 / 7 = 4.5714, so sample SD = sqrt(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 = sqrt(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
Find the coefficient of variation for the lab readings 48, 50, 52, 49, 51 (n = 5, a sample).
- Mean = (48 + 50 + 52 + 49 + 51) / 5 = 250 / 5 = 50
- Squared differences from the mean: 4, 0, 4, 1, 1, which sum to 10
- Sample variance = 10 / (5 - 1) = 10 / 4 = 2.5, so sample SD = sqrt(2.5) = 1.581
- Coefficient of variation = (1.581 / 50) x 100 = 3.16%
Result: Sample SD = 1.581, coefficient of variation = 3.16% (a tight, consistent dataset)
Sample versus population standard deviation at a glance
| Aspect | Sample (s) | Population (sigma) |
|---|---|---|
| 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 squared (variance) | sigma (SD), sigma squared (variance) |
| Tends to be | Slightly larger | Slightly smaller |
| Excel function | STDEV.S, VAR.S | STDEV.P, VAR.P |
| Google Sheets function | STDEV, VAR | STDEVP, VARP |
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% |
Related spread statistics and what they tell you
| Statistic | Formula | What it measures |
|---|---|---|
| Variance | SD squared | Average squared distance from the mean |
| Coefficient of variation (RSD) | (SD / mean) x 100% | Relative spread as a percentage, unit-free |
| Standard error of the mean | s / sqrt(n) | How precisely the sample mean estimates the true mean |
| Z-score of a value x | (x - mean) / SD | How many standard deviations a value sits from the mean |
Common mistakes to avoid
- Using n instead of n-1 for a sample. Survey, research, and lab 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.
- Calling a raw standard deviation high or low. A standard deviation only means something relative to the scale of the data. Compare it against the mean using the coefficient of variation, or against similar datasets, before judging it large or small.
- Mixing up standard deviation and standard error. Standard deviation describes the spread of the individual values, while the standard error of the mean describes how precise the average is. They are different numbers and answer different questions.
Glossary
- Mean (x-bar)
- 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.
- Coefficient of variation
- The standard deviation divided by the mean, times 100%, also called relative standard deviation (RSD).
- Standard error of the mean
- The sample standard deviation divided by the square root of n, measuring the precision of the sample mean.
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. This calculator shows both at once.
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. When you are unsure, the n-1 (sample) version is the safer default.
How do you calculate standard deviation step by step?
Find the mean, subtract it from each value and square the result, add those squared differences to get the sum of squares, divide by n (population) or n-1 (sample) to get the variance, then take the square root. The worked examples above show each step with real numbers.
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 and report.
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, with no spread at all.
What is a good or high standard deviation?
There is no fixed threshold, because it depends on the scale of your data. A standard deviation that is small relative to the mean (a low coefficient of variation) signals consistent data, while a large one relative to the mean signals high variability. Compare against the mean or a similar dataset rather than the raw number.
How do I calculate the coefficient of variation?
Divide the standard deviation by the mean and multiply by 100 to express it as a percentage. Also known as relative standard deviation (RSD), it lets you compare the spread of datasets that use different units or scales.
How do I find standard deviation in Excel or Google Sheets?
In Excel use STDEV.S for a sample and STDEV.P for a population (VAR.S and VAR.P give variance). In Google Sheets use STDEV and STDEVP. This calculator matches those functions so you can check a spreadsheet result quickly.
What is the standard error of the mean and how is it different?
The standard error of the mean is the sample standard deviation divided by the square root of n. Standard deviation describes how spread out the individual values are, while the standard error describes how precisely the sample mean estimates the true population mean.
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, so you can confirm nothing was dropped.