Standard Deviation Calculator
Calculate population and sample standard deviation with variance.
About the Standard Deviation Calculator
The standard deviation calculator computes both the population and sample standard deviation of a list of numbers, along with the corresponding variances and the mean. Standard deviation is the most widely used measure of how spread out a dataset is around its mean, and it appears in fields ranging from finance to quality control to scientific research.
The distinction between population and sample standard deviation is critical and is often the source of errors. If your data represents the entire group you care about (every student in a class, every product in a batch), use the population standard deviation, which divides the sum of squared deviations by n. If your data is a sample drawn from a larger population and you want to estimate the spread of that population, use the sample standard deviation, which divides by n-1 — a correction known as Bessel's correction.
Bessel's correction exists because a sample tends to underestimate the spread of its parent population. The sample values cluster around the sample mean rather than the population mean, which biases the sum of squared deviations downward. Dividing by n-1 instead of n compensates for this bias and gives an unbiased estimate of the population variance.
How It Works
The standard deviation is the square root of the variance, and the variance is the average of the squared deviations from the mean. The two versions differ only in what "average" means:
Mean = sum(x_i) / n
Population variance = sum((x_i - mean)^2) / n
Population std dev = sqrt(population variance)
Sample variance = sum((x_i - mean)^2) / (n - 1)
Sample std dev = sqrt(sample variance)
The squared deviation (x_i - mean)² is used rather than the absolute deviation |x_i - mean| because squaring is mathematically more convenient: it is differentiable, which matters for optimisation, and it gives more weight to larger deviations, which is usually what you want when measuring risk or variability.
Bessel's correction (dividing by n-1) makes the sample variance an unbiased estimator of the population variance. The intuition is that the sample mean is itself derived from the same data, so the deviations are slightly smaller on average than they would be around the true population mean. Dividing by n-1 instead of n inflates the estimate just enough to cancel this bias. As n grows, the difference between the two versions shrinks and becomes negligible for n above about 30.
The standard deviation is in the same units as the original data, which makes it easier to interpret than the variance (which is in squared units). A standard deviation of 5 cm means the typical deviation from the mean is about 5 centimetres.
Worked Examples
Using the default dataset 4, 8, 15, 16, 23, 42 (the famous Lost numbers), the mean is (4 + 8 + 15 + 16 + 23 + 42) / 6 = 108 / 6 = 18. The squared deviations from the mean are (4-18)² = 196, (8-18)² = 100, (15-18)² = 9, (16-18)² = 4, (23-18)² = 25, and (42-18)² = 576, summing to 910.
The population variance is 910 / 6 = 151.67, so the population standard deviation is sqrt(151.67) = 12.31. The sample variance is 910 / 5 = 182, so the sample standard deviation is sqrt(182) = 13.49. Notice that the sample version is larger, which is always the case because dividing by a smaller number gives a larger result.
The large standard deviation reflects the wide spread of the data, driven by the outlier 42. If we remove that value, the remaining five numbers have a mean of 13.2 and a much smaller sample standard deviation of about 7.66. This illustrates how a single outlier can inflate the standard deviation dramatically.
When to Use This Tool
Use the standard deviation calculator when you need to:
- Measure the volatility of investment returns or price movements in finance.
- Assess the consistency of manufacturing tolerances in quality control.
- Summarise the spread of test scores, survey responses, or experimental measurements.
- Compare the variability of two datasets with similar means.
- Detect outliers that inflate the standard deviation relative to the interquartile range.
- Compute inputs for confidence intervals and hypothesis tests.
- Teach the difference between population and sample statistics in a statistics course.
Limitations & Disclaimer
The standard deviation is sensitive to outliers and assumes that the mean is a meaningful summary of central tendency, which is not the case for highly skewed distributions. This calculator does not compute confidence intervals, perform normality tests, or report outlier-resistant measures such as the interquartile range or median absolute deviation. For inferential statistics, use a dedicated statistical package. See our disclaimer for full details.
Frequently Asked Questions
What is the difference between population and sample standard deviation?
The population standard deviation divides the sum of squared deviations by n and is used when your data is the entire population of interest. The sample standard deviation divides by n-1 (Bessel's correction) and is used when your data is a sample drawn from a larger population and you want to estimate the spread of that population.
Why is Bessel's correction necessary?
A sample tends to underestimate the spread of its parent population because the sample values cluster around the sample mean rather than the true population mean. Dividing by n-1 instead of n inflates the estimate just enough to cancel this bias, giving an unbiased estimate of the population variance.
When should I use which version?
Use the population version when you have data for the entire group (every student in a class, every item in a batch). Use the sample version when your data is a sample drawn from a larger population and you want to infer the spread of that population. For n above 30, the difference is usually negligible.
What does the standard deviation tell me?
It measures how spread out the values are around the mean. A small standard deviation means the values are clustered tightly around the mean; a large one means they are spread widely. For a normal distribution, about 68% of values fall within one standard deviation of the mean.
Why is the standard deviation in the same units as the data?
Because it is the square root of the variance, and the variance is in squared units. Taking the square root brings the measure back to the original units, which makes it interpretable: a standard deviation of 5 cm means the typical deviation from the mean is about 5 centimetres.
How sensitive is the standard deviation to outliers?
Very sensitive, because the deviations are squared. A single value several standard deviations from the mean can inflate the variance dramatically. For outlier-resistant alternatives, consider the interquartile range or the median absolute deviation, which this calculator does not compute.
Last updated: July 21, 2026 · Author: HT99 Tools Editorial Team · Reviewed by: HT99 Tools Editorial Team