Standard Deviation Calculator
Calculate standard deviation for both population (σ, ÷n) and sample (s, ÷n−1) from any data set. Also shows the mean, variance, sum, range, and a step-by-step deviation table.
Sample s = √[ Σ(x−x̄)² ÷ (n−1) ] — use for samples (nearly always). · Population σ = √[ Σ(x−μ)² ÷ n ] — only if you have ALL the data. · Excel STDEV() = sample · STDEVP() = population.
How to Calculate Standard Deviation (Step by Step)
- Find the mean: add all values and divide by n.
x̄ = Σx ÷ n - Find each deviation: subtract the mean from each value,
(x − x̄). - Square each deviation:
(x − x̄)², then sum them:Σ(x − x̄)². - Divide: by
nfor population variance σ², or byn−1for sample variance s². - Square root: the standard deviation is
√variance.
Population vs Sample: Which One Do I Use?
Use population standard deviation (σ, ÷n) only when your data covers the entire group you care about — every employee in a company, every product made in one shift. Use sample standard deviation (s, ÷n−1) when your data is a sample used to estimate a larger population — a survey of 200 voters, test scores from one class representing all students. In nearly all real analysis you have a sample, so ÷n−1 is the safe default.
Why ÷(n−1)? Bessel's Correction
A sample tends to cluster slightly closer to its own mean than the full population does, so dividing by n would underestimate the true spread. Dividing by n−1 — Bessel's correction — inflates the result just enough to make the sample standard deviation an unbiased estimator of σ. This is why Excel, R, and most scientific calculators default to ÷n−1 for the "s" key.
Standard Deviation by Country, Tool & Curriculum
| Country / Tool | Taught / Default Formula | Calculator Key | Software |
|---|---|---|---|
| 🇺🇸 US (AP Stats, Excel) | Sample (÷n−1) | Sx on TI-84 | STDEV() in Excel |
| 🇬🇧 UK (A-Level, Casio) | Sample (÷n−1) | σn−1 on Casio | sd() in R |
| 🇩🇪 Germany (Gymnasium) | Sample (÷n−1) | s on calc | numpy std(ddof=1) |
| 🇯🇵 Japan (高校数学B) | Population (÷n) | σn on Casio FX | numpy std(ddof=0) |
| 🇨🇳 China (高中数学) | Population (÷n) | σn on calc | STDEVP() in Excel |
| 🇮🇳 India (CBSE/ISC) | Population (÷n) | σ on Casio fx-82 | STDEVP() in Excel |
Frequently Asked Questions
What is the difference between population and sample standard deviation?
Population standard deviation (σ) divides the sum of squared deviations by n and is used when your data covers the ENTIRE group. Sample standard deviation (s) divides by n−1 (Bessel's correction) and is used when your data is a sample drawn from a larger population. In practice the sample formula (÷n−1) is almost always correct, because you rarely have data on the complete population.
Why divide by n−1 for sample standard deviation?
Dividing by n−1 instead of n is called Bessel's correction. It compensates for the fact that a sample's spread tends to underestimate the true population spread, making s an unbiased estimator of σ. This is the default in Excel STDEV(), Python statistics.stdev(), R sd(), and the s/Sx key on Casio and TI calculators.
Which standard deviation does Excel use?
Excel STDEV() and STDEV.S() use the sample formula (÷n−1). STDEVP() and STDEV.P() use the population formula (÷n). Python's numpy.std() defaults to population (÷n) unless you pass ddof=1; pandas .std() and R's sd() default to sample (÷n−1). Always confirm which one a tool uses before reporting a result.
How do school curricula differ on standard deviation?
US AP Statistics and UK A-Level introduce sample standard deviation (÷n−1) early because they focus on inferential statistics. Japan (数学B) and China (高中数学) teach population standard deviation (÷n) first, treating the data set as the population to be described. India's CBSE/ISC also commonly uses ÷n. The arithmetic is identical apart from the divisor.
What does the empirical (68-95-99.7) rule say?
For roughly normal data, about 68% of values lie within 1 standard deviation of the mean, 95% within 2, and 99.7% within 3. This is why standard deviation is used to flag outliers and define confidence intervals.
What does a standard deviation actually tell you?
Standard deviation measures how spread out the data is around the mean, in the same units as the data. A small value means values cluster tightly near the mean; a large value means they are widely scattered. For roughly normal data, about 68% of values fall within one standard deviation of the mean and about 95% within two (the empirical rule).
Sources & Methodology
Population (÷n) and sample (÷n−1) standard deviation and variance are computed client-side from the squared deviations about the mean. Curriculum and software defaults reflect published exam-board specifications and documented function behaviour.
- NIST/SEMATECH e-Handbook of Statistical Methods — Standard Deviation
- Microsoft Support — STDEV vs STDEVP functions
- NumPy documentation — numpy.std (ddof parameter)
Standards and figures reviewed June 2026.