Paste a list of numbers and this standard deviation calculator returns both the sample (s) and population (σ) standard deviation, the two variances, the mean, the count, the standard error and the coefficient of variation. It accepts data copied straight from a spreadsheet column.
Formula
Mean x̄ = Σx ÷ n. Population: σ = √(Σ(x - x̄)² ÷ n). Sample: s = √(Σ(x - x̄)² ÷ (n - 1)). Standard error = s ÷ √n. CV = s ÷ x̄ × 100.
How it works
Paste the values separated by commas, spaces, semicolons or line breaks (you can copy a column from a spreadsheet). The calculator finds the mean, adds up the squared distance of each value from the mean and divides by n for the population or by n - 1 for a sample (Bessel correction). The square root of the variance is the standard deviation, in the same unit as the data. Sample results need at least two values.
How to calculate standard deviation step by step
1. Find the mean: add the values and divide by how many there are. 2. Subtract the mean from each value and square the result. 3. Add up those squared deviations. 4. Divide by n for the population variance, or by n - 1 for the sample variance. 5. Take the square root to get the standard deviation.
The standard deviation is in the same unit as the data (points, centimeters, dollars), which makes it easier to interpret than the variance. Roughly, it is the typical distance between a value and the mean: a small one means the data is tightly grouped, a large one means it is spread out.
Worked example: 2, 4, 4, 4, 5, 5, 7, 9
The 8 values add up to 40, so the mean is 5. The squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. Population variance = 32 ÷ 8 = 4, so the population standard deviation σ = √4 = 2.
Treated as a sample, the variance is 32 ÷ 7 = 4.5714 and the sample standard deviation s = 2.1381. The standard error of the mean is 2.1381 ÷ √8 = 0.7559, and the coefficient of variation is 2.1381 ÷ 5 = 42.76%. These are the numbers you see with the default example.
Sample or population: which one should you use?
Use the population formula (divide by n) when your data includes every member of the group you are describing: all employees of a small company, every test score in one class. Use the sample formula (divide by n - 1) when your data is a subset used to estimate a larger group, which is the normal case in surveys, experiments and quality control.
The n - 1 is called Bessel's correction. A sample tends to underestimate the spread of the whole population, and dividing by a slightly smaller number compensates. With large data sets the two results get very close; with small ones the difference matters. Spreadsheets follow the same convention: STDEV.S is the sample and STDEV.P the population formula.
Interpreting the result and common mistakes
For roughly bell-shaped data, about 68% of values fall within one standard deviation of the mean and about 95% within two (the empirical rule). The coefficient of variation (standard deviation ÷ mean) lets you compare spread across data sets with different scales; it is meaningless when the mean is close to zero.
Common mistakes: forgetting to square the deviations (they would add to zero), mixing up variance and standard deviation, and using the population formula on a sample. The calculator also shows the mean on its own; for a weighted mean or the median, use the average calculator.
Frequently Asked Questions
- Should I use sample or population standard deviation?
- Use population (σ) when the data covers every member of the group you care about, such as all students in one class. Use sample (s) when the data is a subset used to estimate a larger group, which is the usual case in research and quality control.
- What is the difference between variance and standard deviation?
- Variance is the average squared distance from the mean; standard deviation is its square root. The standard deviation is in the original units, so it is easier to interpret.
- Why divide by n - 1 for a sample?
- Because the sample mean is closer to the sample values than the true population mean is, which makes the squared deviations slightly too small. Dividing by n - 1 corrects that bias.
- Can standard deviation be negative?
- No. It is a square root of a sum of squares, so it is zero or positive. It is zero only when all values are identical.
- What is a good standard deviation?
- There is no universal good value; it depends on the context. Compare it with the mean (coefficient of variation) or with the tolerance you need. In manufacturing, a smaller spread usually means a more consistent process.