Standard Deviation Calculator
Press Calculate to see the results.
Enter numbers separated by commas, spaces or line breaks, and this standard deviation calculator returns the standard deviation, variance, mean and margins of error for population or sample data.
Standard deviation measures how spread out a set of numbers is around its average. A small value means the numbers cluster tightly around the mean; a large value means they are scattered widely. Two classes can have the same average test score, 75, while one has nearly everyone between 70 and 80 and the other ranges from 40 to 100. The averages agree, but the standard deviations tell the two stories apart.
Population Standard Deviation
Use the population formula when your data includes every member of the group you care about: every employee of a small firm, every game a team played this season, every reading a sensor took during a test. In that case the mean you compute is the true mean μ, and the spread around it can be measured exactly.
The steps are the same each time. Find the mean of the values. Subtract the mean from each value and square the result, which makes every deviation positive and weights large ones more heavily. Add up the squared deviations, divide by the number of values N to get the variance σ², and take the square root to return to the original units.
For the default data, 10, 12, 23, 23, 16, 23, 21 and 16, the mean is 144 ÷ 8 = 18. The squared deviations are 64, 36, 25, 25, 4, 25, 9 and 4, which add to 192. Dividing by 8 gives a variance of 24, and the population standard deviation is √24 ≈ 4.899.
σ = √( Σ(xᵢ − μ)² ÷ N )
- xᵢ
- each value in the population
- μ
- the population mean
- N
- the number of values in the population
Sample Standard Deviation
Most of the time you do not have the whole population, only a sample drawn from it, and you want to estimate how variable the population is. The sample standard deviation s uses the same steps with one change: the sum of squared deviations is divided by n − 1 instead of n.
The reason is that a sample's deviations are measured from the sample mean x̄, which is itself calculated from the same data and therefore sits closer to those values than the unknown population mean does. Dividing by n would systematically understate the spread. Dividing by n − 1, a fix known as Bessel's correction, makes the variance estimate unbiased. The divisor n − 1 is also called the degrees of freedom: once the mean is fixed, only n − 1 of the deviations can vary independently.
Treating the default numbers as a sample, the sum of squared deviations is still 192, but it is divided by 7. The sample variance is about 27.43 and the sample standard deviation is about 5.237, slightly larger than the population figure. The gap shrinks as samples grow; with hundreds of values the two formulas give nearly the same answer.
- Sample standard deviation: s = √( Σ(xᵢ − x̄)² ÷ (n − 1) )
Applications of Standard Deviation
Standard deviation is one of the most widely used numbers in statistics because it turns a whole distribution into a single, interpretable measure of variability. For data that follow a roughly 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. This rule of thumb lets you judge quickly whether a value is ordinary or unusual: a measurement three standard deviations from the mean happens only about 3 times in 1,000.
In polling and experimental science, the standard deviation feeds directly into the standard error, σ ÷ √n, which describes how much a sample mean would bounce around from sample to sample. Multiplying the standard error by a critical value gives the margin of error shown in the table above. A survey reporting 52% support with a margin of error of ±3 points is using exactly this calculation.
Manufacturing uses standard deviation for quality control. If bolts are meant to be 10.00 mm long and the process produces a standard deviation of 0.02 mm, engineers can predict what fraction will fall outside tolerance and adjust the machine before defects pile up. Six Sigma programs take their name from the goal of keeping specification limits six standard deviations away from the process mean.
In finance, the standard deviation of an investment's returns is the usual definition of volatility and a common proxy for risk. A stock fund whose yearly returns have a standard deviation of 18% swings far more than a bond fund at 5%, even if both average similar long-run returns. Weather forecasters, sports analysts, teachers grading on a curve and medical researchers setting normal ranges for lab tests all rely on the same idea.
Frequently asked questions
Should I use population or sample standard deviation?
Use population when your data covers the entire group you are describing. Use sample when the data is a subset used to estimate a larger group, which is the usual case in research and surveys.
What is the difference between variance and standard deviation?
Variance is the average squared deviation from the mean. Standard deviation is its square root, which puts the measure back in the same units as the data.
Can standard deviation be negative?
No. It is a square root of a sum of squares, so it is zero when all values are identical and positive otherwise.
What does a standard deviation of zero mean?
Every value in the data set is the same, so there is no spread around the mean.
How is the margin of error calculated?
The standard error, σ ÷ √N, is multiplied by the z-value for the confidence level, such as 1.96 for 95%.
What is the formula for sample standard deviation?
s = √(Σ(xᵢ − x̄)² ÷ (n − 1)): find the mean, square each value's distance from it, add the squares, divide by one less than the count, and take the square root. For 10, 12, 23, 23, 16, 23, 21 and 16 the mean is 18 and the squared deviations add to 192, so s = √(192 ÷ 7) ≈ 5.237.
What is relative standard deviation?
Relative standard deviation, also called the coefficient of variation, is the standard deviation divided by the mean, times 100. For the default data it is 4.899 ÷ 18 × 100 ≈ 27.2% using the population figure. It lets you compare the spread of data sets measured on different scales, and it works best for positive data whose mean is well above zero.
Updated by Calculator.hair. How we build and check our calculators