Skip to content
Omnikalc

Standard deviation calculator: population and sample

Measure how spread out a set of numbers is: mean, variance and standard deviation for a population or a sample, coefficient of variation and standard error.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Mean

5.0000

Population standard deviation (σ)

2.0000

Sample standard deviation (s)

2.1381

Which one to use? Use σ when your values are the whole group, s when they are a sample drawn from a larger group.
Population variance (σ²)
4.0000
Sample variance (s²)
4.5714
Coefficient of variation (s ÷ mean)
42.76%
Standard error of the mean
0.7559
Count
8

Spread if the last value changes

MeanPopulation standard deviation (σ)Sample standard deviation (s)
Value 8 = 5 current4.50001.32291.4142
Value 8 = 9 current5.00002.00002.1381
Value 8 = 15 current5.75003.73333.9911
Value 8 = 25 current7.00006.92827.4066

How spread out are your numbers?

Two data sets can share the same mean and look nothing alike. Test scores of 79, 80 and 81 and scores of 50, 80 and 110 both average 80, but the second set is far more spread out. Standard deviation puts a number on that spread. This calculator gives the population and sample standard deviation, the variance, the coefficient of variation and the standard error of the mean for up to eight values.

The formulas

  1. Mean: x̄ = sum of the values ÷ n.
  2. Sum of squares: SS = Σ(xᵢ − x̄)².
  3. Population variance: σ² = SS ÷ n, and population standard deviation σ = √σ².
  4. Sample variance: s² = SS ÷ (n − 1), and sample standard deviation s = √s².
  5. Coefficient of variation = s ÷ x̄. Standard error = s ÷ √n.

Worked example: 2, 4, 4, 4, 5, 5, 7, 9

  1. Mean: 40 ÷ 8 = 5.
  2. Deviations from the mean: −3, −1, −1, −1, 0, 0, 2, 4. Squared: 9, 1, 1, 1, 0, 0, 4, 16, which add up to 32.
  3. Population variance: 32 ÷ 8 = 4, so σ = 2.
  4. Sample variance: 32 ÷ 7 = 4.571, so s = 2.138.
  5. Coefficient of variation: 2.138 ÷ 5 = 42.76 percent. Standard error: 2.138 ÷ √8 = 0.756.

How one value changes the spread

Last value Mean σ s
5 4.50 1.32 1.41
9 5.00 2.00 2.14
15 5.75 3.73 3.99
25 7.00 6.93 7.41

A single outlier can triple the standard deviation, which is why it pays to look at the data, not just the summary.

Population or sample?

Divide by n when the values are the entire group you want to describe: every employee of a small company, every game a team played this season. Divide by n − 1 when the values are a sample used to estimate a larger population: 8 bags of chips weighed from a production line of thousands. The n − 1 correction, named after Friedrich Bessel, compensates for the fact that a sample’s own mean is closer to its values than the true population mean would be. Spreadsheet functions follow the same split: STDEV.P for populations, STDEV.S for samples.

Interpreting the result

For data with a bell-shaped distribution, the 68-95-99.7 rule applies: about 68 percent of values fall within one standard deviation of the mean, 95 percent within two and 99.7 percent within three. If adult men’s heights in the US average 69 inches with a standard deviation of about 3 inches, roughly two thirds of men are between 66 and 72 inches tall.

The coefficient of variation compares spreads across data of different scales: a standard deviation of $2 on an average price of $10 (20 percent) is much larger, relatively, than $50 on an average of $1,000 (5 percent).

Standard error versus standard deviation

The standard deviation describes the spread of individual values. The standard error describes how precisely the sample mean estimates the true mean, and it shrinks as the sample grows: quadrupling the sample size halves it. Polls and scientific studies report margins of error based on it, typically about twice the standard error for 95 percent confidence.

Frequently asked questions

What is standard deviation?

A measure of how far values typically are from their mean. Small values mean the data are tightly grouped, large values mean they are spread out. For 2, 4, 4, 4, 5, 5, 7 and 9, the mean is 5 and the population standard deviation is 2.

Should I use the population or the sample standard deviation?

Use the population formula, dividing by n, when your data cover the entire group you care about. Use the sample formula, dividing by n − 1, when your data are a sample used to estimate a larger group. For the same 8 values, σ = 2 and s = 2.14.

What is the difference between variance and standard deviation?

Variance is the average squared distance from the mean, and standard deviation is its square root. Standard deviation is expressed in the same unit as the data, which makes it easier to interpret.

What does the 68-95-99.7 rule mean?

For data that follow a normal, bell-shaped distribution, about 68 percent of values lie within one standard deviation of the mean, 95 percent within two and 99.7 percent within three. It does not apply to strongly skewed data.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.