Standard Deviation Calculator
Standard deviation measures how spread out the numbers in a dataset are from their mean. A low SD means values are clustered near the mean; a high SD means they are widely spread. This calculator gives both sample (n-1) and population SD, along with the sample variance, mean, count, min and max.
Your numbers
Enter comma-separated numbers, e.g. 10, 20, 30, 40, 50
- Mean
- 18
- Variance
- 182
- Population SD
- 12.3153
- Count (n)
- 6
- Min
- 4
- Max
- 42
How to calculate standard deviation
Start by adding up all the values and dividing by how many there are (n) to get the mean. Next, subtract the mean from each value to get its deviation, and square each deviation so that values below the mean do not cancel out values above it. Add the squared deviations together. For the sample standard deviation, divide that sum by n - 1 to get the sample variance, then take the square root. For the population standard deviation, divide by n instead before taking the square root. The calculator needs at least two numbers, because a single value has no spread. Results are rounded to four decimal places, and the variance shown is the sample variance (the n - 1 version), so it equals the sample SD squared.
Mean = Σx / n | Sample SD = √(Σ(x - mean)² / (n-1)) | Population SD = √(Σ(x - mean)² / n)Worked example. For the values 4, 8, 15, 16, 23, 42: the sum is 108, so the mean is 18. The squared deviations are 196, 100, 9, 4, 25 and 576, which add up to 910. Dividing by n - 1 = 5 gives a sample variance of 182 and a sample SD of about 13.49. Dividing by n = 6 instead gives a population SD of about 12.32.
A second worked example: test scores
Take five test scores: 72, 85, 90, 68 and 95. They add up to 410, so the mean is 82. The deviations from 82 are -10, 3, 8, -14 and 13, and their squares are 100, 9, 64, 196 and 169, which total 538. As a sample, the variance is 538 / 4 = 134.5 and the standard deviation is about 11.60. Treated as the whole population (say, the only five students in a class), divide by 5 instead: the variance is 107.6 and the SD is about 10.37. Either way, a typical score sits roughly 10 to 12 points from the average. The gap between the two figures shrinks as n grows: with 30 values the sample SD is under 2% larger than the population SD.
How to read the result
Standard deviation is in the same units as your data, so an SD of 11.6 points on test scores means scores typically land about 11.6 points from the mean. For data that is roughly bell-shaped (normal), about 68% of values fall within 1 SD of the mean, about 95% within 2 SD and about 99.7% within 3 SD. With a mean of 82 and SD of 11.6, that puts about two thirds of scores between roughly 70 and 94. To compare spread across datasets with different scales, divide the SD by the mean to get the coefficient of variation: 11.6 / 82 is about 14%, while the 4, 8, 15, 16, 23, 42 set has an SD that is about 75% of its mean, a far wider relative spread.
Outliers and other common mistakes
Because deviations are squared, one extreme value can dominate the result. In the default data, the single value 42 contributes 576 of the 910 total. Remove it and the sample SD of 4, 8, 15, 16, 23 drops from about 13.49 to about 7.40. If a value is a typo or a measurement error, fix it before you calculate; if it is real, report it rather than quietly dropping it. Other frequent mistakes: using population SD on a sample, which understates the spread; confusing variance with SD (variance is in squared units, so it is not directly comparable to the data); and applying the 68-95-99.7 rule to data that is heavily skewed, such as incomes or house prices, where it does not hold.
Questions people ask
How do you calculate standard deviation?
Find the mean, subtract it from each value and square the results, add those squares, divide by n − 1 for a sample (or n for a whole population), then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the squares add to 32, and the population standard deviation is √(32 ÷ 8) = 2.
Sample vs population SD: which should I use?
Use sample SD (n-1) when your data is a sample taken from a larger population, which covers most surveys, experiments and measurements. Use population SD (n) only when you have measured every member of the group you care about.
Why divide by n - 1 instead of n?
Dividing by n - 1 corrects a bias. A sample's own mean is always closer to its data points than the true population mean is, so dividing by n would underestimate the spread on average. The adjustment is called Bessel's correction.
What does a high standard deviation mean?
A high SD means the data points are spread far from the average. Whether that is good or bad depends on context: in finance a high SD means higher volatility, while in manufacturing a low SD means more consistent parts.
What is the difference between variance and standard deviation?
Standard deviation is the square root of variance. Variance is measured in squared units (points squared, dollars squared), so SD is the figure to report because it is in the same units as the data.
Can standard deviation be negative or zero?
It can never be negative, because it is the square root of a sum of squares. It is zero only when every value in the list is identical, meaning there is no spread at all.
Put this calculator on your site
Free to use on any site. Please keep the credit link.
<iframe
id="letmecalc-standard-deviation-calculator"
src="https://letmecalc.com/embed/math/standard-deviation-calculator"
title="Standard Deviation Calculator"
width="100%"
height="620"
style="border:0;max-width:100%"
loading="lazy"
></iframe>
<p><a href="https://letmecalc.com/math/standard-deviation-calculator" target="_blank" rel="noopener">Standard Deviation Calculator</a> by letmecalc</p>
<script>
(function () {
var f = document.getElementById("letmecalc-standard-deviation-calculator");
window.addEventListener("message", function (e) {
if (e.origin !== "https://letmecalc.com") return;
if (!f || e.source !== f.contentWindow) return;
var d = e.data;
if (!d || d.source !== "letmecalc-embed" || d.type !== "resize") return;
if (typeof d.height === "number" && d.height > 0) {
f.style.height = d.height + "px";
}
});
})();
</script>