Sample vs Population Standard Deviation: The Short Answer
Use the sample standard deviation (s, divide by n−1) when your numbers are a subset you use to describe a larger group. Use the population standard deviation (σ, divide by N) only when your numbers are the entire group you care about. For the same list of at least two values that are not all equal, s is larger than σ by a factor of √(n ÷ (n−1)): 5.41% at n = 10 and under 2% from n = 30.
Sample (n-1) mode: s ≈ 2.138090 for 2, 4, 4, 4, 5, 5, 7, 9. Replace them with your own numbers.
Population (N) mode: σ = 2 for the same eight values.
Population (N)
Sample (n-1)
Symbols: Σ = add up, x = each value, μ = population mean, x̄ = sample mean, N = number of values in the population, n = number of values in the sample. Variance is in squared units (points²); the standard deviation is back in the original units (points).
Worked Example: The Same 8 Numbers Both Ways
2, 4, 4, 4, 5, 5, 7, 9Take eight quiz scores out of 10. The arithmetic is identical up to the divisor. What changes is the question you are asking. If these are all 8 students in one tutoring group and you only want to describe that group, they are a population, and μ = x̄ = 5. If they are 8 students picked from a school of 400 and you want to estimate the spread for the whole school, they are a sample: s is an estimate of the school's unknown σ, not the school's σ itself.
Step 1–2: Find the mean and the squared deviations
| Score x | x − x̄ | (x − x̄)² |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| Mean x̄ = 5 | Sum = 0 | Σ(x − x̄)² = 32 |
Step 3: Divide to get the variance, then take the square root
Population: σ² = 32 ÷ 8 = 4 points², σ = √4 = 2 points. Sample: s² = 32 ÷ 7 ≈ 4.571429 points², s = √(32 ÷ 7) ≈ 2.138090 points.
Computed with this site's calculator on 2026-11-02. The only difference between the two rows is the divisor, so s ÷ σ = √(8 ÷ 7) ≈ 1.0690. Each button opens the same eight scores in the calculator with that mode already selected.
| Treat the 8 scores as | Divide Σ(x − x̄)² by | Variance | Standard deviation |
|---|---|---|---|
Population (the whole group)Open in Population (N) mode | Divide Σ(x − x̄)² byN = 8 | Varianceσ² = 4 | Standard deviationσ = 2 |
Sample (part of a larger group)Open in Sample (n-1) mode | Divide Σ(x − x̄)² byn − 1 = 7 | Variances² ≈ 4.571429 | Standard deviations ≈ 2.138090 |
How Much Does n−1 Change the Answer?
Here σ means the population-formula result for the same list. The ratio s ÷ σ depends only on n, not on the values, so the table below holds for any list of at least two values that are not all equal. With 8 values the sample SD is 6.90% larger, which matches 2.138090 ÷ 2 above.
The gap is large for very small lists and shrinks as n grows: under 2% from n = 30, about 0.50% at n = 100 and 0.05% at n = 1,000. It never changes which formula answers your question.
| n (number of values) | s ÷ σ | Sample SD is larger by |
|---|---|---|
| 2 | 1.4142 | 41.42% |
| 3 | 1.2247 | 22.47% |
| 5 | 1.1180 | 11.80% |
| 10 | 1.0541 | 5.41% |
| 30 | 1.0171 | 1.71% |
| 100 | 1.0050 | 0.50% |
| 1,000 | 1.0005 | 0.05% |
When to Use Each
| Your situation | Use | Divide by |
|---|---|---|
| You have every value in the group, such as all 25 scores in one class | Population SD (σ) | N |
| You only want to describe the data in hand, not generalize | Population SD (σ) | N |
| You measured part of a larger group, such as 100 widgets from a day's 10,000 | Sample SD (s) | n-1 |
| You need a t-based confidence interval or t-test for a mean and σ is unknown | Sample SD (s) | n-1 |
If you are unsure
Sample vs Population SD in Excel, Google Sheets, Python, R and TI-84
Every tool offers both versions, but the defaults differ. NumPy and pandas, often used together, have opposite defaults.
| Tool | Sample SD (n−1) | Population SD (N) | Default to watch |
|---|---|---|---|
| Excel | Sample SD (n−1)STDEV.S (older: STDEV) | Population SD (N)STDEV.P (older: STDEVP) | Default to watchNone: pick by name |
| Google Sheets | Sample SD (n−1)STDEV.S or STDEV | Population SD (N)STDEV.P or STDEVP | Default to watchNone: pick by name |
| Python statistics | Sample SD (n−1)statistics.stdev() | Population SD (N)statistics.pstdev() | Default to watchNone: pick by name |
| NumPy | Sample SD (n−1)np.std(x, ddof=1) | Population SD (N)np.std(x) | Default to watchddof=0, population |
| pandas | Sample SD (n−1)Series.std() | Population SD (N)Series.std(ddof=0) | Default to watchddof=1, sample |
| R | Sample SD (n−1)sd(x) | Population SD (N)n <- length(x); sd(x) * sqrt((n - 1) / n) | Default to watchstats::sd uses n−1; no population-mode argument |
| TI-84 (1-Var Stats) | Sample SD (n−1)Sx | Population SD (N)σx | Default to watchShows both |
Checked on 2026-11-02: with Python 3.14.5, NumPy 2.4.2 and pandas 3.0.0 on the eight scores above, np.std() returned 2.0 and statistics.pstdev() returned 2.0 (population), while pandas Series.std() and statistics.stdev() returned 2.138089935… (sample), which is 2.138090 to six decimals. The Excel, Google Sheets, R and TI-84 rows follow each vendor's documentation (see Sources); R and a physical TI-84 were not run. Guides: Excel STDEV.S vs STDEV.P, Google Sheets, R sd(), Excel and Python, TI-84 Sx and σx.
Why the Sample Formula Divides by n−1 (Bessel's Correction)
Sample values sit closer to their own mean x̄ than to the unknown population mean μ, so Σ(x − x̄)² comes out systematically too small. Dividing by n−1 instead of n, known as Bessel's correction, makes the sample variance an unbiased estimate, under independent random sampling, of the population variance.
Degrees of freedom
The square root of the unbiased variance, s, still slightly underestimates σ on average. The correction removes the bias in the variance, not in the standard deviation. See Bessel's correction explained for the derivation.
Further Reading
Sources
References and further authoritative reading used in preparing this article.
- Statistical population — Wikipedia
- NIST/SEMATECH e-Handbook: Measures of Scale
- Bessel's correction — Wikipedia
- Microsoft Support: STDEV.S function
- NumPy documentation: numpy.std (ddof defaults to 0)
- pandas documentation: Series.std (ddof defaults to 1)
- R documentation: sd (denominator n − 1)
- Python documentation: statistics.stdev and pstdev
- Google Docs Editors Help: Google Sheets function list (STDEV.S, STDEV.P)
- Texas Instruments: Sx and σx in 1-Var Stats (TI-83/84 Plus family)