Standard Deviation Calculator
Standard deviation measures how far values typically sit from their mean. Subtract the mean from each value, square the results, add them up, divide by n − 1 for a sample (or N for a whole population), then take the square root. Paste your numbers and choose Sample or Population.
Last updated by Ultra Calculator
Standard Deviation
How to calculate it
Sample: s = √[ Σ(x − x̄)² ÷ (n − 1) ] Population: σ = √[ Σ(x − μ)² ÷ N ]
- s
- sample standard deviation
- σ
- population standard deviation
- x
- each value in your list
- x̄, μ
- the mean of your list (x̄ for a sample, μ for a population)
- n, N
- how many values there are
- Σ
- add up the result for every value
The variance is the same expression without the square root. In Excel, STDEV.S gives the sample version and STDEV.P the population version.
In Excel or Google Sheets: =STDEV.S(A2:A11)
Worked example
Sample standard deviation of test scores
Seven scores taken from a larger year group have a mean of 86.29 and a sample standard deviation of 6.99. The variance is 48.90 and the coefficient of variation is 8.1%.
| Numbers | 85, 92, 78, 94, 88, 76, 91 |
|---|---|
| Sample or Population | Sample (divide by n − 1) |
| Standard Deviation | 6.9932 |
|---|---|
| Variance | 48.9048 |
| Mean | 86.2857 |
| Coefficient of Variation | 8.1% |
| Count | 7 |
| Sample or Population | Sample |
How to use this calculator
- Type or paste your values into Numbers, separated by commas, spaces or semicolons.
- In Sample or Population, choose Sample when the values are part of a larger group whose spread you want to estimate (the usual case), or Population when they are the complete group.
- Read the Standard Deviation. It is in the same units as your data.
- Use the Variance (the standard deviation squared) if a later formula needs it, and the Coefficient of Variation to compare spread between data sets with different means.
- Check Count to confirm every value was read.
Frequently asked questions
How do you calculate standard deviation by hand?
Find the mean, subtract it from each value and square each result. Add the squares, divide by n − 1 for a sample or N for a population, then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the squares add up to 32, and the population standard deviation is √(32 ÷ 8) = 2.
Should I use sample or population standard deviation?
Use population (divide by N) only when your list holds every member of the group you are describing, such as every employee in one firm. If the values are a sample used to estimate a wider group, as with most survey and experiment data, use the sample version (divide by n − 1).
Why does the sample formula divide by n − 1?
The deviations are measured from the sample's own mean, which sits closer to the sample values than the true population mean does, so the sum of squares comes out slightly too small. Dividing by n − 1 instead of n (Bessel's correction) makes the sample variance an unbiased estimate of the population variance. Its square root, the sample standard deviation, still tends to run a little low, most noticeably in small samples.
What is a good standard deviation?
There is no single good value, because it depends on the units, the scale and how much variation the task can tolerate. A standard deviation of 2 g matters for 100 g chocolate bars and is negligible for 25 kg sacks of potatoes. For data measured from a true zero, the coefficient of variation (the standard deviation as a percentage of the mean) is easier to compare across data sets.
What is the difference between standard deviation and variance?
Variance is the average squared distance from the mean, so its units are squared (cm² for lengths in cm). Standard deviation is the square root of the variance, which puts it back into the original units. The variance calculator also shows the sum of squares and the divisor used.
Can I work out a sample standard deviation from one number?
No. With one value, n − 1 is zero and the formula would divide by zero, so the calculator asks for at least two values. With Population chosen, one value gives a standard deviation of 0.
Learn more
What the number tells you
Comparing data on the same scale, a smaller standard deviation means the values sit closer to the mean and a larger one means they are more spread out. For data shaped roughly like a bell curve, about 68% of values lie within one standard deviation of the mean and about 95% within two.
Sample versus population
A population is every member of the group you are describing. A sample is part of it, used to estimate the whole. The two formulas differ only in the divisor, and the gap shrinks as the list gets longer: with 100 values, n − 1 and N differ by 1%.
Coefficient of variation
The coefficient of variation (CV) is the standard deviation divided by the mean, as a percentage. It lets you compare spread between data sets on different scales, for example the weights of mice and of horses. It only makes sense for data measured from a true zero, and it becomes unstable when the mean is close to zero. At a mean of 0 the CV is undefined, so the calculator leaves it out.
- Checking how consistent a production line is from a sample of weights or lengths
- Measuring how much investment returns swing from year to year
- Describing the spread of exam or test scores alongside the mean
- Working out the standard deviation needed for a z-score or confidence interval
- Comparing the consistency of two suppliers, machines or teams
Choosing Population for sample data
When you are estimating a wider group's spread from a sample, dividing by N tends to understate it. Unless the list covers everyone, choose Sample.
Typing thousand separators
A comma always separates values, so 1,200 is read as 1 and 200. Type 1200.
Comparing standard deviations on different scales
A standard deviation of 5 means little without the mean and units beside it. For data with a true zero and a mean well away from zero, compare the coefficient of variation instead.
Reading the result as a percentage for percentage data
If your values are percentages, the standard deviation is in percentage points: 6.73 means 6.73 points either side of the mean, not 6.73% of it.
- Enter the same list in the variance calculator to see the sum of squared deviations behind the result.
- The descriptive statistics calculator gives the median, quartiles and skewness from the same list.
- Round only the final answer: rounding the mean first can shift the standard deviation in the last decimal place.
Methodology and sources
Values are split at commas, semicolons or spaces. The calculator finds the mean, adds up the squared differences from it, divides by n − 1 for Sample (used when nothing is chosen) or N for Population, and takes the square root. The coefficient of variation is the standard deviation divided by the absolute value of the mean, times 100, and is left out when the mean is 0, where it is undefined. The standard deviation, variance and mean are rounded to 4 decimal places and the CV to 2. With Sample and a single value there is no valid answer, so the calculator asks for at least two values.