What is standard deviation?
Standard deviation measures how spread out a set of numbers is around its mean. A small standard deviation means most values sit close to the average; a large one means the values are scattered over a wider range. It is the square root of the variance, so it is expressed in the same units as the original data—dollars, inches, test points, and so on.
This standard deviation calculator (SD calculator) also works as a variance calculator and a mean and standard deviation calculator: paste a list of numbers, choose population or sample, and it returns the standard deviation, variance, mean, count, sum, the worked steps, a histogram, margins of error for the mean, and a frequency table.
Standard deviation formula
Population standard deviation (σ)
Use the population formula when your data includes every value you are interested in—for example, the scores of every student in one class.
σ = √[ Σ(xᵢ − μ)² ÷ N ]
Sample standard deviation (s)
Use the sample formula when your data is a subset drawn from a larger group and you want to estimate the spread of that whole group. Dividing by N − 1 instead of N (Bessel's correction) makes the sample variance an unbiased estimate of the population variance.
s = √[ Σ(xᵢ − x̄)² ÷ (N − 1) ]
In both formulas, xᵢ is each value, μ or x̄ is the mean, and N is the number of values. The expression inside the square root is the variance: σ² for a population and s² for a sample.
How to find standard deviation
- Add up all the values and divide by how many there are to get the mean.
- Subtract the mean from each value and square each difference.
- Add the squared differences together.
- Divide that total by N for a population, or by N − 1 for a sample. This is the variance.
- Take the square root of the variance to get the standard deviation.
For example, take the data set 4, 8, 6, 10. The mean is 28 ÷ 4 = 7. The squared differences are 9, 1, 1, and 9, which add up to 20. The population variance is 20 ÷ 4 = 5, so σ = √5 ≈ 2.236. Treated as a sample, the variance is 20 ÷ 3 ≈ 6.667, so s ≈ 2.582.
What the result includes
- The standard deviation (σ or s), variance, mean, count, sum, minimum, and maximum.
- The step-by-step calculation from the mean to the square root of the variance.
- A histogram of the values with the mean and one standard deviation on each side marked.
- The standard error of the mean (SD ÷ √N) and the margin of error at confidence levels from 68.3% to 99.9999%.
- A frequency table showing how often each value appears.
About the margin of error
The margin of error table multiplies the standard error of the mean by the two-sided critical value of the standard normal distribution (1.645 for 90%, 1.960 for 95%, 2.576 for 99%, and so on). The remaining critical values come from the inverse of the standard normal cumulative distribution function. This normal approximation works well for larger data sets. For small samples—roughly fewer than 30 values—a t-distribution critical value gives a wider, more accurate interval, so treat the figures here as approximate.
Frequently asked questions
Should I use population or sample standard deviation?
Use population when you have every value in the group you care about. Use sample when the numbers are only part of a larger group, such as a survey of 200 voters used to describe all voters. When in doubt, the sample standard deviation is the safer choice because it does not understate the spread.
What is the difference between variance and standard deviation?
Variance is the average squared distance from the mean, so it is in squared units. Standard deviation is the square root of variance, which puts it back in the original units and makes it easier to interpret.
What does a standard deviation of 0 mean?
A standard deviation of 0 means every value in the data set is identical—there is no spread at all around the mean.
How much data falls within one standard deviation?
For data that follows a normal (bell-shaped) distribution, about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. Data that is skewed or has outliers may not follow this rule.
What's changed
- Launched.
References
- NIST/SEMATECH e-Handbook of Statistical Methods, Measures of Scale
sample variance and standard deviation formulas with the N − 1 divisor
- Wolfram MathWorld, Standard Deviation
standard deviation as the square root of variance, with both the 1/N and 1/(N − 1) forms
- NIST/SEMATECH e-Handbook, Confidence Limits for the Mean
confidence limits built from the standard error s ÷ √N
- NIST/SEMATECH e-Handbook, Cumulative Distribution Function of the Standard Normal Distribution
critical z values 1.645, 1.960, and 2.576 used in the margin of error table