Standard Deviation Calculator: Easy Steps & Examples
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator works out the standard deviation of a list of numbers you type in, and it gives you both the sample standard deviation and the population standard deviation. Enter your numbers separated by commas, choose which version you need, and the calculator returns the standard deviation, variance, mean, and count. The formula and a step-by-step worked example are below so you can verify the result by hand.
Formula
The standard deviation measures how spread out numbers are from their average. For a population (all members of a group), the formula is:
σ = √[ Σ(xᵢ − μ)² / N ]
- σ (sigma) is the population standard deviation.
- xáµ¢ is each individual value.
- μ (mu) is the population mean (average).
- N is the number of values in the population.
For a sample (a subset used to estimate the whole group), the formula divides by n − 1 instead of n:
s = √[ Σ(xᵢ − x̄)² / (n − 1) ]
- s is the sample standard deviation.
- x̄ (x-bar) is the sample mean.
- n is the number of values in the sample.
The only difference is the denominator: n − 1 for a sample, n for a population. This is called Bessel’s correction, and it makes the sample estimate slightly larger so it better approximates the true population spread when you only have a subset.
Worked Example
Using the default values from the calculator above — the numbers 4, 8, 6, 5, 3 — here is the full calculation for the sample standard deviation (the default selection).
- Find the mean: (4 + 8 + 6 + 5 + 3) / 5 = 26 / 5 = 5.2
- Subtract the mean from each value and square the result:
(4 − 5.2)² = 1.44
(8 − 5.2)² = 7.84
(6 − 5.2)² = 0.64
(5 − 5.2)² = 0.04
(3 − 5.2)² = 4.84 - Sum the squared differences: 1.44 + 7.84 + 0.64 + 0.04 + 4.84 = 14.8
- Divide by n − 1 (sample): 14.8 / 4 = 3.7
- Take the square root: √3.7 ≈ 1.9235
The calculator rounds to four decimal places, giving 1.9235. If you switch the type to Population, the denominator becomes 5, giving 14.8 / 5 = 2.96, and √2.96 ≈ 1.7205. Notice the sample version is larger — that is the correction working as intended.
When to Use Which Version
The choice between sample and population is not a math preference; it depends on what your data represents.
- Population standard deviation (σ): Use when your list contains every member of the group you care about. Examples: the heights of all five starting players on a basketball team, the daily high temperatures in your city for the entire month of July, or the ages of all students currently enrolled in one specific class.
- Sample standard deviation (s): Use when your list is a subset taken from a larger group, and you want to estimate the spread of the whole group. Examples: the heights of 30 randomly chosen students from a school of 1,000, the weights of 10 bags of flour from a production line, or the test scores of 15 patients in a clinical trial.
A common rule of thumb: if you could, in theory, collect more data from the same group, you are almost certainly dealing with a sample. If the group is fixed and fully enumerated, it is a population.
How to Read the Result
The standard deviation is in the same units as your original data. If your numbers are in centimeters, the standard deviation is in centimeters; if they are dollars, it is in dollars. The variance, by contrast, is in squared units (cm², dollars²), which is why the standard deviation is usually reported instead — it is directly comparable to the mean.
A small standard deviation relative to the mean means the values cluster tightly around the average. A large one means they are spread out. For roughly bell-shaped (normal) distributions, about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. This is the empirical rule, and it is a useful mental check, but it only applies to data that is approximately normal — not to skewed or multi-modal data.
For example, if the mean test score is 75 with a standard deviation of 5, most students scored between 70 and 80. If the standard deviation were 20, scores would range widely from about 35 to 115 (or beyond), indicating very inconsistent performance.
Common Mistakes and Pitfalls
Several errors trip people up when calculating standard deviation by hand or entering data into a tool.
- Using n instead of n − 1 for a sample: This is the most frequent error. It makes your result slightly too small, which can understate the true variability of the population you are estimating.
- Forgetting to square the differences: If you sum the unsquared deviations, they always add to zero. Squaring is not optional.
- Mixing up variance and standard deviation: The variance is the square of the standard deviation. Many calculators report both; make sure you read the right one.
- Entering commas or spaces incorrectly: A stray comma (e.g., “4,,5”) or a missing comma between numbers will change your data set. Check the count output to confirm you entered the right number of values.
- Rounding too early: If you round the mean to one decimal place before computing the squared deviations, your final answer can be noticeably off. Keep full precision until the last step.
Limits of the Standard Deviation
Standard deviation is a powerful summary, but it has limits. It is highly sensitive to outliers: a single extreme value can inflate it dramatically, making the data look more variable than it really is. For example, in the set {1, 2, 3, 4, 100}, the mean is 22 and the standard deviation is about 42.7, even though four of the five values are close together. In such cases, the median and interquartile range (the difference between the 75th and 25th percentiles) give a more robust picture of spread.
Standard deviation also assumes the mean is a meaningful center. For skewed data (like incomes or house prices), the mean itself is pulled toward the tail, and the standard deviation becomes hard to interpret. It also says nothing about the shape of the distribution — two very different data sets can have the same mean and standard deviation.
Finally, standard deviation is not a measure of “goodness” or “badness.” A high standard deviation in stock returns means high volatility (risk), but a high standard deviation in the diameters of manufactured bolts means poor quality control. Context determines what the number means.
Alternatives and Related Measures
Depending on your question, another measure of spread may serve you better.
- Range: The maximum minus the minimum. Simple, but uses only two values and ignores everything in between.
- Interquartile range (IQR): The 75th percentile minus the 25th percentile. Robust to outliers and good for skewed data.
- Mean absolute deviation (MAD): The average of the absolute differences from the mean. Easier to explain than variance, but less useful in statistical theory.
- Variance: The square of the standard deviation. Used in many formulas (e.g., ANOVA, regression) because variances add, while standard deviations do not.
- Coefficient of variation (CV): The standard deviation divided by the mean, expressed as a percentage. Useful for comparing the relative variability of data sets with different units or very different means.
For most introductory statistics and everyday data analysis, the standard deviation is the default choice — but knowing when it is not the best choice is just as important.
Frequently Asked Questions
What is the difference between sample and population standard deviation?
The population standard deviation (σ) uses all members of a group and divides by N. The sample standard deviation (s) uses a subset and divides by n − 1. The n − 1 correction makes the sample estimate slightly larger, compensating for the fact that a sample tends to underestimate the true spread of the population.
Can standard deviation be negative?
No. Because it is the square root of a sum of squared values, it is always zero or positive. A standard deviation of zero means every value in the data set is identical.
What does a standard deviation of 1 mean?
It means the typical distance of a data point from the mean is 1 unit (in whatever unit your data uses). Whether that is large or small depends entirely on the context — a standard deviation of 1 cm for screw lengths is huge, but a standard deviation of 1 cm for the heights of adult humans is tiny.
Should I use standard deviation or standard error?
Standard deviation describes the spread of your data. Standard error (SE) describes the spread of the sample mean if you repeated the sampling many times. SE = s / √n. Use standard deviation to describe your data; use standard error when making inferences about the population mean from a sample.
Why is my hand calculation different from the calculator?
Almost always because of rounding. If you round the mean or the squared deviations at intermediate steps, your final answer will drift. Also check that you selected the same type (sample vs. population) in both your hand calculation and the calculator.
What if my data has units like dollars or kilograms?
Enter the numbers without units — the calculator treats them as pure numbers. The standard deviation you get back carries the same unit as your input. Just remember to state the unit when you report the result (e.g., “standard deviation = $12.50”).
Related
Formula used
in numbers | Numbers (comma-separated) | - | 4, 8, 6, 5, 3 | 0 sel type | Type | Sample=1, Population=2 out sd | Standard deviation | - | if(type==1, sd(numbers), psd(numbers)) | 4 out variance | Variance | - | if(type==1, var(numbers), pvar(numbers)) | 4 out mean | Mean | - | mean(numbers) | 4 out count | Count | - | count(numbers) | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.