Standard Deviation Calculator
Calculate population and sample standard deviation, variance, and coefficient of variation for a dataset.
Did this tool work for you?
How to use this calculator
- 1
Enter your data values (up to 8 fields shown; all are used).
- 2
The calculator automatically computes both sample and population standard deviation.
- 3
Use sample SD (s) if your data is a sample from a larger population.
- 4
Use population SD (σ) if your data represents the entire population.
Frequently asked questions
What is the difference between sample and population standard deviation?
Both take the square root of the average squared distance from the mean, but the population version divides the sum of squared differences by n, while the sample version divides by n − 1. Use the population figure (σ) when your numbers are every member of the group you care about, and the sample figure (s) when they are a subset used to estimate a larger group. The highlighted result is the sample value.
Why do the two results differ by so little for large datasets?
The only difference is n versus n − 1 in the denominator. With 8 values the sample variance is 8 ÷ 7 times the population variance, about 14% larger. With 100 values the ratio is 100 ÷ 99, about 1%. For the default data 2, 4, 4, 4, 5, 5, 7, 9 the calculator gives σ = 2 and s = 2.13809.
What happens if I clear a field?
It counts as 0, not as missing. The form turns an empty box into the number 0 before the calculation, so the data set always contains all eight values shown. Entering 1, 2, 3, 4, 5 and leaving the other three at 0 gives a mean of 1.875 rather than 3. There is currently no way to leave a slot out, so for fewer than eight values use a spreadsheet or work the smaller set by hand.
Is the coefficient of variation based on the sample or the population SD?
The sample SD. It is s ÷ |mean| × 100, shown to two decimals. If the mean is exactly 0, the ratio is undefined and the calculator says so instead of printing a number. It is also not meaningful for data that can be negative around zero, such as temperatures in Celsius.
How many values can I enter?
Eight fields are shown, and the minimum is two because the sample formula divides by n − 1. Datasets longer than eight values need a spreadsheet or a calculator that accepts a pasted list.
Does the standard deviation have units?
Yes, the same unit as the data, so a spread of heights in centimetres is in centimetres. Variance is in squared units. The coefficient of variation has no unit because it is a percentage of the mean.
Can a standard deviation be negative or zero?
It is never negative, because it is a square root. It is exactly 0 only when every value is identical, since then no point differs from the mean. Entering 5 in all eight fields returns 0 for every spread measure.
How sensitive is the result to outliers?
Very sensitive, because differences are squared before being averaged. One extreme value can dominate the sum. If you suspect an error in one data point, rerun without it and compare. The calculator does not detect or remove outliers.
Standard deviation calculator — sample, population, variance and spread
Two versions of the same idea
Standard deviation measures how far values typically sit from their mean. First find the mean, then square each value’s distance from it, add the squares, divide, and take the square root. The only choice is the divisor. Divide by n for a population, where you hold every value, or by n − 1 for a sample, where the values stand in for a larger group and the extra degree of freedom compensates for using the sample mean.
| Measure | Symbol | Formula |
|---|---|---|
| Population variance | σ² | Σ(x − mean)² ÷ n |
| Sample variance | s² | Σ(x − mean)² ÷ (n − 1) |
| Population SD | σ | √σ² |
| Sample SD | s | √s² |
| Coefficient of variation | CV | s ÷ |mean| × 100 |
Worked example: the classic eight numbers
The default data set is 2, 4, 4, 4, 5, 5, 7, 9. The mean is 5, the squared distances add up to 32, so the population variance is 32 ÷ 8 = 4 and σ = 2. The sample variance is 32 ÷ 7 = 4.571429 and s = 2.13809. The coefficient of variation comes to 42.76%. All of these figures come from running the tool.
Worked example: exam scores
Take scores of 10, 12, 23, 23, 16, 23, 21, 16. The calculator reports a mean of 18, a population variance of 24 with σ = 4.898979, and a sample variance of 27.428571 with s = 5.237229. If these eight students are the whole class, σ describes it. If they are a sample from a larger year group, s is the better estimate. The CV is 29.10%, meaning the typical spread is about 29% of the average score.
Watch out for empty fields
Every one of the eight inputs enters the calculation, and a blank box is read as zero. Typing 1, 2, 3, 4, 5 and leaving three fields empty produces a mean of 1.875 and s = 1.95941, which describe eight numbers, not five. Fill every field with real data, or accept that spare zeros are part of the set. Also remember that the CV is undefined when the mean is zero: a set such as −5, 5, −5, 5, −5, 5, −5, 5 has s = 5.345225 but no CV.
Interpreting the number
A standard deviation only means something relative to the scale of the data and its shape. For a roughly bell-shaped distribution, about two thirds of values lie within one standard deviation of the mean and about 95% within two, but skewed or clustered data break that rule of thumb. Use the CV to compare spread across data on different scales, and report which type of SD you used.
Learn more from an authoritative source:
WikipediaProbability Calculator
Calculate single event probability, complementary probability, and odds for/against an event.
Quadratic Equation Solver
Solve any quadratic equation ax² + bx + c = 0 using the quadratic formula. Finds real and complex roots.
Prime Number Checker
Check if a number is prime and find all prime factors. Also lists the nearest primes above and below.
GCD & LCM Calculator
Calculate the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of two or three numbers.
Factorial Calculator
Calculate the factorial of any non-negative integer. Also computes permutations (nPr) and combinations (nCr).
Triangle Calculator
Calculate the area, perimeter, angles, and height of a triangle from three sides using Heron's formula.
Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →