Resources · Education
Sample vs Population Standard Deviation
Standard deviation comes in two flavors. The population version is for when your data covers the entire group you care about. The sample version is for when your data is only a slice of a larger group. The math is almost identical; the choice you make affects the answer. This guide explains both, when to use each, and how the choice shows up in the standard deviation calculator and in Excel functions like STDEV.S and STDEV.P.
6 min read
What is population standard deviation?
Population standard deviation is the spread measure you use when your data set is the entire group you are analyzing. Every employee in a small company. Every test score in a single class. Every part produced in one batch.
It is calculated by finding each value's squared distance from the mean, averaging those squared distances, and taking the square root. The denominator is N, the total count.
The symbol for population standard deviation is σ (sigma).
What is sample standard deviation?
Sample standard deviation is the spread measure you use when your data is a portion of a larger group, and you want to estimate the spread of that larger group from your sample. Survey responses, polls, scientific samples, and most everyday data analysis fall in this bucket.
The math is the same as population standard deviation except for the denominator. Instead of dividing by N, you divide by n − 1, where n is the size of the sample.
The symbol for sample standard deviation is s.
The main difference between sample and population standard deviation
The single difference: the denominator.
- Population: divide squared deviations by N.
- Sample: divide by n − 1.
That tiny change carries a meaningful interpretation. Population standard deviation describes the spread of a known, complete group. Sample standard deviation estimates the spread of a larger group from a slice of it, with a small bump in the denominator to keep that estimate unbiased.
For most data sets, sample standard deviation comes out slightly larger than population standard deviation on the same numbers. The gap shrinks as the sample size grows.
When to use population standard deviation
Use population standard deviation when your data covers the entire group you care about. Common cases:
- Every grade in a single classroom you are reporting on.
- Every part produced in one specific manufacturing run.
- Every employee at a small, well-defined company.
- Every transaction in a fixed time window you have full data for.
The key question to ask yourself: is the group I am analyzing complete in my data, or am I trying to draw conclusions about a larger group I did not measure? If the data is the whole group, population standard deviation is correct.
When to use sample standard deviation
Use sample standard deviation when your data is a portion of a bigger group, and you want the result to represent that bigger group. Common cases:
- A survey of 200 customers from a base of 50,000.
- A scientific study of 30 samples drawn from a much larger pool.
- 30 days of stock prices used to describe a stock's typical behavior.
- A few graded test papers used as a stand-in for the whole class.
Sample standard deviation is the right choice in most real-world analysis because most data is not exhaustive. Even when it feels like you have everything, your data usually represents only one slice of a larger ongoing process.
Why sample standard deviation uses n minus 1
A sample, by nature, is missing some of the values from the larger population. Those missing values include some that would have been further from the mean than the values you happened to capture. As a result, the spread you measure from the sample tends to be a little smaller than the true population spread.
Dividing by n − 1 instead of n nudges the result up slightly to compensate. The adjustment is small (you are only changing the denominator by one) but it makes sample standard deviation an unbiased estimator of the true population spread.
This adjustment is called Bessel's correction. It matters most when sample sizes are small. With 5 values, dividing by 4 instead of 5 changes the answer noticeably. With 500 values, dividing by 499 instead of 500 makes almost no difference.
Sample vs population standard deviation formula
Both formulas have the same shape. Only the denominator changes:
Population: σ = √( Σ(x − μ)² / N )
Sample: s = √( Σ(x − x̄)² / (n − 1) )
The mean is written as μ (mu) for the population and x̄ (x-bar) for the sample, but they are calculated the same way (sum the values, divide by the count). The difference between the two formulas is entirely in the denominator. For a glossary of these and the other symbols (σ, s, N, n, n − 1, Σ), see Standard Deviation Symbol.
For a step-by-step walkthrough of each formula with worked examples, see Standard Deviation Formula. Variance has its own pair of population and sample formulas that work the same way; for the relationship between variance and standard deviation, see Variance vs Standard Deviation.
Simple example with numbers
Use the same small data set used across the other guides:
2, 4, 4, 4, 5, 5, 7, 9
- Mean = 5
- Sum of squared deviations = 32
- Count = n = 8
From there, both standard deviations fall out from the same intermediate sum:
Population
32 / 8 = 4 then √4
σ = 2
Sample
32 / 7 ≈ 4.57 then √4.57
s ≈ 2.14
Same data, two different numbers. Which one is right depends on whether those eight values are the whole group or a sample of a larger group.
STDEV.S vs STDEV.P in Excel
Excel exposes the two flavors as two separate functions:
- STDEV.S is sample standard deviation. The .S stands for sample.
- STDEV.P is population standard deviation. The .P stands for population.
Variance follows the same naming convention: VAR.S is sample variance, VAR.P is population variance.
For a practical Excel walkthrough with example formulas like =STDEV.S(A2:A9) and =STDEV.P(A2:A9), see How to Calculate Standard Deviation in Excel.
Which one should you use?
Default to sample standard deviation. Most everyday data is a sample of something larger, even when it does not feel that way. Statistical software, scientific calculators, and most online tools default to the sample formula for the same reason.
Use population standard deviation only when you genuinely have measurements for the entire group you are reporting on, and you have no intention of generalizing the result to anyone outside that group.
For a longer plain-language overview of what standard deviation means in either form, see What Is Standard Deviation?
Quick comparison table
A side-by-side view of the two flavors:
| Population | Sample | |
|---|---|---|
| Symbol | σ | s |
| Denominator | N | n − 1 |
| What it describes | Spread of the entire group | Estimated spread of a larger group |
| When to use | Data covers everyone or everything | Data is a slice of a bigger group |
| Excel function | STDEV.P | STDEV.S |
| Most common in real-world stats | No | Yes |
Quick summary
- Population standard deviation describes the spread of an entire group. Symbol σ, denominator N.
- Sample standard deviation estimates the spread of a larger group from a sample. Symbol s, denominator n − 1.
- The n − 1 in the sample formula is Bessel's correction. It nudges the estimate up so it represents the larger population correctly.
- In Excel, STDEV.S is sample and STDEV.P is population.
- Default to sample standard deviation when in doubt. It is the right choice for most real-world data.
- The standard deviation calculator reports both versions side by side from any list of numbers.
Run the numbers
Three calculators that report sample and population spread measures side by side.
Standard Deviation Calculator
Mean, population and sample standard deviation, and both variances from a list of numbers.
Variance Calculator
Population and sample variance, mean, count, and standard deviation in one step.
P Value Calculator
Convert a z-score (in standard deviation units) to a one-tailed or two-tailed p-value.
Frequently asked questions
The denominator. Population standard deviation divides the sum of squared deviations by N (the total count). Sample standard deviation divides by n − 1 (one less than the count). Sample standard deviation is slightly larger and is the right choice when your numbers are a sample of a bigger population.
Use sample standard deviation when your data is a portion of a larger group. Surveys, scientific samples, customer studies, and most everyday data analysis use the sample formula because the underlying population is bigger than what you measured.
Use population standard deviation when your data covers the entire group you care about. Every employee in a small company, every test score in a single class, every item produced in one batch. If you measured everyone, the population formula is correct.
A sample tends to underestimate how spread out the larger population really is. Dividing by n − 1 instead of n nudges the estimate up a bit to compensate. This adjustment is called Bessel's correction. The effect is largest with small samples and shrinks as the sample size grows.
Sample. The .S in the name stands for sample. STDEV.S divides by n − 1 and is the function to reach for when your Excel data is a sample of a larger group.
Population. The .P in the name stands for population. STDEV.P divides by n and is correct only when your Excel data covers the entire group you are analyzing.
Default to sample standard deviation. Most real-world data is a sample of a larger population, even when it does not feel that way. Use population standard deviation only when you genuinely have data for everyone or everything in the group.
Yes. The standard deviation calculator reports both versions side by side from a single list of numbers, along with the mean and both variances, so you can pick the value that matches your context without running the formula twice.