Sample vs Population Standard Deviation, Explained
Updated November 2026. Standard deviation answers a simple question: how spread out are the numbers around their mean? The reason it is so often mis-stated is that there are two usual formulas, and they differ by one number in the denominator. A sample vs population standard deviation calculator is only useful if you know which of those formulas you need, and why. This guide works both by hand on a short data set, then shows how to repeat the arithmetic in the official Standard Deviation and Variance (Sample vs Population) tool in Free Technology Calculators, a free web toolkit of 669 calculators from My Advisers, also available as an Android app. An overview of the My Advisers tools is in this blog’s tools guide.
The official tool name already flags the confusion: sample versus population. Use the population formula when the data set is the entire group you care about. Use the sample formula when the data set is a sample from a larger group, and you want an estimate of that larger group’s spread. Swapping them does not look dramatic on a tiny example, but it changes the result, and it changes every later calculation that treats the result as σ or as s.
The two formulas, written clearly
Let the numbers be x1, x2, …, xn, and let the mean be x̄ (or μ when you are treating the set as a population).
The mean, in both cases, is the sum of the observations divided by n:
x̄ = (x1 + x2 + … + xn) / n
Variance is the average of the squared deviations from that mean. Standard deviation is the square root of variance, so it is back in the same units as the original numbers.
Population variance uses n in the denominator:
σ² = Σ (xi − μ)² / n
Population standard deviation is σ = √σ².
Sample variance uses n − 1 in the denominator:
s² = Σ (xi − x̄)² / (n − 1)
Sample standard deviation is s = √s².
The n − 1 form is the usual unbiased estimator of a larger population’s variance when you only have a sample, often called Bessel’s correction. It is not a “more accurate” description of the sample you already hold. If the five numbers in front of you are the entire population, n − 1 is the wrong denominator.
A worked data set: five observations
Take the five numbers 12, 15, 18, 20 and 25. These might be, for illustration only, five daily unit counts, five test scores, or five measured lengths in the same unit. Nothing in the arithmetic depends on that story. The sum is 90, so the mean is 90 / 5 = 18.
| Observation x | Deviation (x − 18) | Squared deviation (x − 18)² |
|---|---|---|
| 12 | −6 | 36 |
| 15 | −3 | 9 |
| 18 | 0 | 0 |
| 20 | 2 | 4 |
| 25 | 7 | 49 |
| Sum | 0 | 98 |
Population variance = 98 / 5 = 19.6. Population standard deviation σ = √19.6 ≈ 4.427.
Sample variance = 98 / 4 = 24.5. Sample standard deviation s = √24.5 ≈ 4.950.
The squared-deviation total is the same in both calculations. Only the denominator changes. The sample value is larger, as it always will be for n > 1, because you are dividing by a smaller number. If a report says “the standard deviation is 4.4” without saying which formula was used, you cannot tell whether the author computed σ or rounded something else. Write the formula, or write the words “sample” or “population,” next to the figure.
When to use the population formula, and when to use the sample formula
- Use the population formula when the n observations are the complete set you mean to describe: every student in a class of five, every working day in a short closed period you are not generalising from, every item in a batch that has been fully measured. You are describing that set, not inferring a larger one.
- Use the sample formula when the n observations are drawn from a larger group, and the spread you care about is the spread of that larger group: a sample of customers, a sample of parts from a long production run, a sample of days from a year. The n − 1 denominator is there so that s² is an unbiased estimate of the population variance under the usual assumptions.
- Do not mix the two in the same report without labelling them. A chart that uses σ in one panel and s in another, with the same legend, is a mistake, not a refinement.
- Do not use either formula as a promise about the future. These are descriptive (or, for s, inferential about a current population). They are not a forecast.
If you are unsure, ask what “the group” is. If you can name a larger group that you did not fully measure, you are usually in the sample case. If you cannot, and you only want a description of the numbers you have, you are in the population case.
Using a sample vs population standard deviation calculator without mixing modes
Open the Standard Deviation and Variance (Sample vs Population) calculator in Free Technology Calculators. Enter the observations, choose the sample mode or the population mode deliberately, and compare the two outputs with the hand calculation above if you are confirming a method. For 12, 15, 18, 20 and 25 you should see the same split: a population standard deviation near 4.427 and a sample standard deviation near 4.950, with variances 19.6 and 24.5. If the tool offers both, do not take the first number it shows until you have checked which denominator it used.
The official tool name exists because this pair of formulas is often confused. Use that as a reminder, not as a reason to report both numbers to a client and let them pick the more convenient one.
Related quantities you should not confuse with standard deviation
Variance is the square of the standard deviation. It is useful in later formulas, but it is not in the original units. Saying “the variance is 24.5 units” when you mean the spread of a length is usually the wrong quantity to quote to a non-specialist; quote s or σ, and keep variance for the working.
Mean absolute deviation uses absolute values rather than squares. It is a different statistic. A calculator that only offers standard deviation will not produce it by accident, but a hand calculation that forgets to square the deviations will.
Range is the largest value minus the smallest (here, 25 − 12 = 13). It uses only two observations and is very sensitive to a single extreme value. Standard deviation uses every observation, and still can be pulled by extremes because deviations are squared.
A later statistic that depends on a correct standard deviation is the z-score, (x − mean) / (standard deviation). If you put s in the denominator where the method asked for σ, or the other way around, the z-score changes. In this data set, the observation 25 has (25 − 18) / 4.427 ≈ 1.58 if you use σ, and (25 − 18) / 4.950 ≈ 1.41 if you use s. Those are not the same number, and they should not be reported as if they were.
Practical checks before you publish a figure
- Count n again. Using n − 1 when n is already wrong will not save the result. For n = 1 the sample formula is not defined, because you would divide by zero.
- Confirm the mean. A typo of 18 as 19 will change every deviation.
- Confirm whether the set is a sample or a population, in words, before you press the mode button.
- Keep enough decimal places in the working, then round only the figure you report, and say how you rounded.
- If the data are not all in the same unit, stop. Standard deviation of a mixed list of rupees and kilograms is meaningless.
Spreadsheet labels, and a second three-point check
Desktop spreadsheets often expose both formulas under easy-to-confuse names, such as a function that uses n and a function that uses n − 1. The names vary by tool and by language pack. Do not choose a function by habit. Read whether it divides by n or by n − 1, then match that to the question you are asking. If you already computed the five-point example by hand, enter 12, 15, 18, 20 and 25 into the official calculator and into your spreadsheet, and require both tools to reproduce σ ≈ 4.427 and s ≈ 4.950 before you trust either tool on a larger file.
A second, smaller check is useful when you are teaching the formula. For the three numbers 4, 4 and 10, the mean is 6. The squared deviations are 4, 4 and 16, which sum to 24. Population variance is 24 / 3 = 8, so σ = √8 ≈ 2.828. Sample variance is 24 / 2 = 12, so s = √12 ≈ 3.464. The two results are further apart, as a share of the mean, than they were for n = 5, which is a reminder that the n versus n − 1 choice matters more when the list is short. If n were 1, only the population formula could be written (the single deviation is zero, so σ is zero); the sample formula would divide by zero and is not defined.
Keep units on the reported standard deviation: “4.95 units a day,” not a bare 4.95, and not a variance quoted as if it were a spread in the original unit. Then, if a later z-score or a process limit needs this figure, you will still know which formula produced it.
If you publish a standard deviation, publish n as well. A figure of 4.95 from five observations is a different claim from a figure of 4.95 from five hundred, even when the formula is the same. The calculator will not add that sentence for you.
Frequently asked questions
Why is the sample standard deviation larger?
Because the same sum of squared deviations is divided by n − 1 rather than n. The usual statistical reason is to correct the downward bias of a sample variance that used n. It is not a bonus “safety margin” to apply on a complete population.
Which formula do school problems usually want?
It depends on the problem statement. If it says the data are a sample, or asks for an estimate of a population, use n − 1. If it says the data are a population, or asks you only to describe that list, use n. If the statement is silent, do not guess in silence: state the formula you used.
Does “Standard Deviation and Variance (Sample vs Population)” compute both?
The official tool is named to distinguish the two. Choose the mode that matches the question you are asking, and check the first result against a worked example such as the one above.
Can I use this for very small n, such as three points?
The formulas are defined for a population of three, and for a sample of three (with n − 1 = 2). The result is very sensitive to each point. A small n is a reason to be modest in any claim about a larger group, not a reason to switch formulas quietly.
Is this financial or scientific advice?
No. It is an explanation of two standard descriptive formulas and of an officially named calculator. How you should measure a particular process, examination or experiment depends on that field’s own method.
Disclaimer
The figures in this article are worked examples for education only, using the data set and formulas stated. They are not advice about a particular data set, product, examination or process. Confirm the mode (sample or population) before you rely on a calculator result, and use the methods your course, laboratory or profession requires.
References
- My Advisers, Free Technology Calculators (official tool name: Standard Deviation and Variance (Sample vs Population)): https://myadvisers.in/free-technology-calculators/.
- NIST/SEMATECH, e-Handbook of Statistical Methods (summary statistics, including the standard deviation): https://www.itl.nist.gov/div898/handbook/eda/section3/eda35.htm.
- Google Play, Free Technology Calculators: https://play.google.com/store/apps/details?id=com.myadvisers.freetechnologycalculators.
Comments
Post a Comment