Skip to content

Sample vs Population Standard Deviation: When to Divide by n or n − 1

By Sprout Calculator Editorial Team Bylines · Published November 5, 2026 · Updated November 6, 2026

Use the population formula, dividing by n, when your data includes every member of the group. Use the sample formula, dividing by n − 1, when your data is only a part of a larger group. The n − 1 makes the sample variance a fair, unbiased estimate of the true spread.

What is the difference between a population and a sample?

A population is the whole group you want to know about. A sample is a smaller part of that group that you actually measure. If you want the average height of all students in your school, the population is every student. If you measure 30 of them, those 30 are a sample.

Often you cannot measure everyone, so you measure a sample and use it to learn about the population. The numbers that describe a population, such as its true mean, are called parameters. The numbers computed from a sample are called statistics. The difference matters for how you calculate the standard deviation.

What are the two formulas?

Both formulas measure how far the values sit from the mean. The only difference is the divisor.

σ=∑(xi−μ)2Ns=∑(xi−xˉ)2n−1\sigma = \sqrt{\frac{\sum (x_i - \mu)^2}{N}} \qquad\qquad s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n - 1}}

The first is the population standard deviation, written with the Greek letter sigma. It divides by N, the number of values in the population. The second is the sample standard deviation, written s. It divides by n − 1, where n is the sample size. Also note the mean: μ stands for the population mean, and x̄ for the sample mean.

How do you calculate each one?

Use the same eight numbers for both: 2, 4, 4, 4, 5, 5, 7 and 9.

  1. Find the mean: 40 ÷ 8 = 5.
  2. Subtract the mean from each value and square: 9, 1, 1, 1, 0, 0, 4 and 16.
  3. Add the squares: 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32.

Now divide.

  • Population: variance = 32 ÷ 8 = 4, so the standard deviation is √4 = 2.
  • Sample: variance = 32 ÷ 7 = 4.571, so the standard deviation is √4.571 = 2.138.

The sample result is a bit larger. The standard deviation calculator lets you switch between the two with one click and shows the working for both. For the basics of the method, see standard deviation explained.

Why divide by n − 1 for a sample?

A sample tends to underestimate the spread of the population. The reason is that the sample mean is calculated from the same values. So the values are always closer to their own mean than to the true population mean. The squared distances from the sample mean come out too small on average.

Dividing by n − 1 instead of n makes the sum a little bigger and fixes this bias. Statisticians call n − 1 the degrees of freedom. Once you know the sample mean and n − 1 of the values, the last value is fixed, so only n − 1 values are free to vary.

A tiny case makes it clear. If you have one value, there is no spread to measure. The sample formula divides by 0, which says the spread cannot be estimated. The population formula would give 0, which wrongly claims that no spread exists. That is why a sample needs at least two values.

How big is the difference?

The difference is the ratio √(n⁄(n − 1)). It is large for small samples and shrinks as n grows.

nSample SD ÷ population SD
31.225
51.118
101.054
301.017
1001.005

For 3 values the sample result is about 22 percent larger. For 100 it is only half a percent larger. So the choice matters most when data is scarce.

Which one should you use?

Ask one question: did I measure every member of the group I care about?

  • Population: Use it when your list is the complete group. Examples are the scores of every student in one class when you only care about that class, or the heights of the five players on a basketball team when you want to describe that team.
  • Sample: Use it when your list is a selection used to learn about something larger. Examples are a survey of 200 voters, the weights of 12 apples from a crate, or 30 students picked from a school.

Be careful with textbook problems. Many say "a sample of" or "the population of" in the question. Look for that wording.

Can you see it in a worked example?

Take the heights, in centimeters, of 5 students picked from a school: 150, 155, 160, 165 and 170.

  1. The mean is 800 ÷ 5 = 160.
  2. The squared differences are 100, 25, 0, 25 and 100, and they add up to 250.
  3. Sample variance: 250 ÷ 4 = 62.5. Sample standard deviation: √62.5 = 7.91 cm.
  4. Population variance, if these five were everyone: 250 ÷ 5 = 50. Standard deviation: √50 = 7.07 cm.

Since these students are only a sample of the school, the right answer is 7.91 cm. It is our best estimate of the spread for the whole school. It is not a perfect one, and a bigger sample would give a better estimate.

What about variance?

Variance is the standard deviation squared. It has the same two versions. Population variance divides by N, and sample variance divides by n − 1. We usually report the standard deviation because it has the same unit as the data. A variance in square centimeters is harder to picture than a spread in centimeters.

What are common mistakes?

  • Using n for a sample. This underestimates the spread.
  • Using n − 1 for a full population. This overestimates the spread.
  • Computing the sample SD of one value. It cannot be done, since n − 1 is zero.
  • Mixing up the means. Use the mean of your data in both formulas.
  • Forgetting the square root. Variance is not the standard deviation.
  • Rounding the mean too early. Keep extra decimals until the end.

Practice problems

  1. For the data 4, 8 and 6, find both standard deviations. The mean is 6 and the sum of squares is 8. Population: √(8 ÷ 3) = 1.63. Sample: √(8 ÷ 2) = 2.
  2. A teacher gives all 25 students in a class a quiz and wants the spread for that class only. Which formula? Population.
  3. A pollster asks 1,000 people about a new law, to learn about a whole city. Which formula? Sample.
  4. For 10, 12, 14, find the sample standard deviation. The mean is 12, the sum of squares is 8, so s = √(8 ÷ 2) = 2.

Check each one with the calculator and compare the two modes.

FAQ

Frequently asked questions

01What is Bessel's correction?

It is the use of n − 1 instead of n in the sample variance. A sample's values sit closer to their own mean than to the true population mean, so dividing by n would underestimate the spread. Dividing by n − 1 corrects that bias on average.

02Does the choice matter for large data sets?

Less and less as the data grows. With 5 values, the sample standard deviation is about 12 percent larger than the population one. With 100 values, it is only about half a percent larger. For small samples, the choice makes a visible difference.

03What do I use if I am not sure?

Ask whether you measured everyone you care about. If you did, use population. If you measured some of them to learn about all of them, use sample. Most real data is a sample, so sample standard deviation is the safer default in science and surveys.

04What if I am not sure whether my data is a sample or a population?

Ask whether you want to describe only these values or to draw conclusions about a bigger group. If it is the bigger group, use the sample formula. In research and surveys that is almost always the case, so sample is the usual default.