Calculate mean, variance, and standard deviation for a data set.
Enter values to see the result.
Guide: Standard Deviation and Variance
Variance measures how spread out data is around the mean. It is calculated as the average of squared deviations from the mean. A larger variance indicates more dispersed data. It is a fundamental measure of dispersion in statistics.
Standard deviation is the square root of the variance. It is expressed in the same units as the original data, making interpretation easier. For example, if average sales are 1000 with a standard deviation of 200, typical values typically fall between 800-1200.
Population vs. sample: Population variance divides by N and applies to the entire population. Sample variance divides by N-1 and is a better estimate for a larger population based on a sample. This is Bessel's correction, which removes the bias in the estimate.
Interpretation: A small standard deviation means data clusters around the mean. A large one means wide spread of values. The 68-95-99.7 rule states that approximately 68% of data falls within one standard deviation, 95% within two, and 99.7% within three.
Two datasets with the same mean of 50 differ twentyfold in spread
The mean tells you where the middle is and nothing about how far anything sits from it. The set 48, 49, 50, 51, 52 and the set 10, 30, 50, 70, 90 both average exactly 50, yet one has a standard deviation of 1.58 and the other 31.62. Reporting only the average discards the entire difference between them.
How it works
- Calculates the standard deviation and variance of a set of values.
- Uses the sample formula, dividing by n − 1, and explains when the population formula is the right one instead.
- Shows how much of the data falls within one, two and three deviations of the mean.
sample: s = √( Σ(x − x̄)² ÷ (n − 1) ) population: σ = √( Σ(x − µ)² ÷ n ) variance is the same thing before the square root for roughly normal data: 68% within 1 SD, 95% within 2 SD, 99.7% within 3 SD
Worked example
Two five-value sets with identical means.
- A = 48, 49, 50, 51, 52 → mean 50.0, SD 1.58
- B = 10, 30, 50, 70, 90 → mean 50.0, SD 31.62
- the spread differs by a factor of 20
- with mean 50 and SD 10, about 68% of values fall between 40 and 60
- and about 95% between 30 and 70
Both sets report an average of 50 and describe completely different situations. A is a stable process; B is barely a process at all. Any summary quoting the mean alone hides that entirely.
Reading the result
- Divide by n − 1 for a sample and by n for a whole population. The correction matters most when n is small: with five values, dividing by n understates the deviation by 10.56%, while at n = 100 the error is 0.50% and effectively irrelevant.
- For set A the population formula gives 1.414 and the sample formula 1.581. Neither is wrong — they answer different questions, and the sample version is the honest one when your five values are drawn from something larger.
- The 68–95–99.7 rule assumes a roughly normal distribution. Applied to skewed data — incomes, waiting times, file sizes — it will badly misstate how much sits in each band, and those distributions are extremely common.
- Standard deviation shares the units of the data, which is why it is quoted rather than variance. Variance is in squared units, so a spread of 31.62 becomes a variance of 1,000, a number with no physical meaning.
Common questions
- Why divide by n − 1 instead of n?
- Because a sample's own mean sits closer to its values than the true population mean does, which makes the deviations look smaller than they are. Dividing by n − 1 corrects that bias. With five values it lifts the result by 10.56%; with a hundred, by half a percent.
- Is a high standard deviation bad?
- Only relative to what you expect. High spread in a manufacturing tolerance is a defect; high spread in a portfolio of returns may be the price of the returns. The number describes consistency, and whether consistency is desirable depends entirely on the thing being measured.