Population vs Sample Standard Deviation — When to Use σ vs s

By CalcMulti Editorial Team··7 min read

There are two versions of the standard deviation formula, differing only in the denominator: population standard deviation (σ) divides by N; sample standard deviation (s) divides by n−1. The difference matters because using the wrong version produces a biased estimate — systematically too small or too large.

This guide explains exactly when to use each version, why n−1 (Bessel's correction) gives an unbiased estimate, and how this affects real calculations.

Population SD (σ)
VS
Sample SD (s)

Side-by-Side Comparison

PropertyPopulation SD (σ)Sample SD (s)
Formulaσ = √[ Σ(xᵢ − μ)² / N ]s = √[ Σ(xᵢ − x̄)² / (n−1) ]
DenominatorN (total population size)n−1 (one less than sample size)
Mean usedPopulation mean μ (known)Sample mean x̄ (estimated from data)
When to useYou have data for EVERY member of the groupYou have a SUBSET; estimating the population
BiasExact (no estimation needed)Unbiased estimator of σ
Symbolσ (lowercase sigma)s
Excel functionSTDEV.P() or STDEVP()STDEV.S() or STDEV() (default in Excel)
Python/NumPynp.std(data, ddof=0)np.std(data, ddof=1)
Practical use frequencyRare (need entire population)Very common (almost all real analysis)
Relationship to varianceσ = √σ²s = √s²

The Key Decision: Do You Have the Full Population?

The choice is conceptually simple: population SD (divide by N) when your data IS the full population; sample SD (divide by n−1) when your data is a SAMPLE drawn from a larger population.

Full population examples: All 435 members of the US House of Representatives (you have data on every member). All 50 state capitals in the US. All employees in a specific 10-person team (and you want statistics only about that team).

Sample examples: 500 survey respondents representing all US adults. 30 blood pressure measurements from clinical trial patients. Product quality measurements from 100 items out of a production run of 10,000.

In nearly every practical analysis — surveys, experiments, research studies, data science — you are working with a sample. Use s (divide by n−1) unless you are certain you have data on every single member of the group you care about.

Why n−1? Bessel's Correction Explained

When you calculate the sample mean x̄ from your data and then compute deviations (xᵢ − x̄), you lose one degree of freedom. Here is the intuition:

The n deviations (x₁ − x̄), (x₂ − x̄), ..., (xₙ − x̄) must sum to exactly zero: Σ(xᵢ − x̄) = 0. This is a mathematical constraint. Because the last deviation is determined by all the others (it must make the sum zero), there are only n−1 independently varying deviations.

If you divide the sum of squared deviations by n instead of n−1, the resulting variance estimate is systematically too small — it underestimates the population variance. Dividing by n−1 corrects this bias. The resulting s² is called an unbiased estimator of σ²: its expected value equals σ² no matter what the true σ is.

The correction matters most for small samples. At n = 5, dividing by n produces a variance estimate that is 20% too small on average. At n = 10, it is 10% too small. At n = 100, only 1% too small — essentially negligible.

Numerical Example — Seeing the Difference

Dataset: 4, 7, 13, 2. n = 4.

Mean: x̄ = (4 + 7 + 13 + 2) / 4 = 26 / 4 = 6.5.

Squared deviations: (4−6.5)² = 6.25 | (7−6.5)² = 0.25 | (13−6.5)² = 42.25 | (2−6.5)² = 20.25.

Sum of squared deviations: 6.25 + 0.25 + 42.25 + 20.25 = 69.

Population variance (÷N): σ² = 69/4 = 17.25. Population SD: σ = √17.25 ≈ 4.15.

Sample variance (÷n−1): s² = 69/3 = 23. Sample SD: s = √23 ≈ 4.80.

The sample SD (4.80) is larger than the population SD (4.15) because of the n−1 correction — it compensates for underestimation.

Decision: If this is all 4 employees in a small company and you only care about this group, use σ = 4.15. If this is a sample from a larger population you want to generalise to, use s = 4.80.

How Different Calculators and Software Handle This

Different tools default to different formulas — and this is a common source of confusion.

ToolDefault (if no option specified)How to get the other version
Excel STDEV()Sample SD (n−1)Use STDEVP() for population
Excel STDEV.S()Sample SD (n−1)Use STDEV.P() for population
Python numpy.std()Population SD (÷N, ddof=0)Use ddof=1 for sample
Python pandas .std()Sample SD (n−1)Use ddof=0 for population
R sd()Sample SD (n−1)Use sqrt(mean((x-mean(x))^2)) for population
Calculator (σ or σₙ button)Population SDUse s or σₙ₋₁ button for sample
Calculator (s or σₙ₋₁ button)Sample SD— this is usually what you want
Google Sheets STDEV()Sample SD (n−1)Use STDEVP() for population

When the Difference is Negligible

For large samples, the difference between σ and s becomes very small. The ratio s/σ = √(N/(N−1)). At n = 100, this ratio is √(100/99) ≈ 1.005 — less than 0.5% difference. At n = 1,000, the difference is less than 0.05%.

Practical rule: for n ≥ 50, the choice between population and sample SD is unlikely to meaningfully change any conclusions. The distinction is most important — and should always be made correctly — for small samples (n < 30).

However: even for large samples, conceptual correctness matters. If you are describing statistics of a specific group (e.g., all players on a sports team), population SD is technically correct. If you are estimating variability in a broader population (e.g., all professional players in a league from a sample of 50), sample SD is correct.

Summary

Use sample SD (divide by n−1) for virtually all practical data analysis, since you are almost always working with a subset and trying to estimate the population. Use population SD (divide by N) only when you have data on every single member of the complete population you are describing.

  • Default rule: use s (n−1) — in practice you almost always have a sample
  • Population SD gives the exact spread of your specific dataset; sample SD estimates the broader population spread
  • Bessel's correction (n−1) compensates for the bias introduced by estimating μ from the same data
  • The difference is most important for small samples (n < 30); negligible for n > 100
  • Always check your software's default — Excel and pandas use n−1 by default; NumPy uses N by default

Frequently Asked Questions

Educational use only. Content is based on publicly documented mathematical formulas and reviewed for accuracy by the CalcMulti Editorial Team. Last updated: February 2026.