Sample Sd Calculator
Paste a dataset and this calculator returns the sample standard deviation s, computed with the n minus 1 denominator that defines a sample, alongside the population standard deviation for comparison. You also get both variances, count, sum, mean, min, max, range, coefficient of variation, standard error, a per-value deviations table and a numbered step-by-step working you can check by hand.
Separate values with commas, spaces, or new lines.
Every figure is rounded to four decimal places for display; the underlying division and square root run at full precision. The headline result is the sample SD (s). The population SD on the next line uses the same data with the n denominator, so you can see exactly what the n minus 1 correction changes.
Quick Answer
For the dataset 5, 10, 15, 20, 25, the sample standard deviation is s = 7.9057 and the sample variance is 62.5. The mean is 15, the sum of squared deviations is 250, and 250 ÷ (5 − 1) = 62.5, whose square root is 7.9057. The same data treated as a whole population gives σ = 7.0711, which is why the denominator choice matters.
Key takeaways
- Sample SD divides the sum of squared deviations by n − 1, not n. That single change is the whole difference between s and σ.
- For the same data, s is never smaller than σ. The two are equal only when every value is identical and both are zero.
- This tool shows its working: a deviations table for every value, numbered substitution steps, and a computational-formula cross-check of the sum of squares.
- The standard error (s ÷ √n) and coefficient of variation ride along in the same results panel, so one paste gives the full sample summary.
- Quick Answer
- How to use the sample standard deviation calculator
- The sample standard deviation formula and the n minus 1 denominator
- Worked example: 5, 10, 15, 20, 25 step by step
- Sample or population: picking the right denominator
- Reading the rest of the results panel: CV, standard error and the 1 SD band
- The computational cross-check and the four-decimal display
- What competing calculators miss
- Frequently asked questions
- Add This Calculator to Your Website
- References
How to use the sample standard deviation calculator
Paste your numbers, click Calculate, and read the first line. The results stay hidden until you calculate.
- Enter the dataset: type or paste at least two numbers into the dataset box, separated by commas, spaces or line breaks. The worked example (5, 10, 15, 20, 25) is pre-filled.
- Click Calculate: the results panel opens with the sample standard deviation first, followed by the sample variance, the population figures for comparison, and the rest of the summary.
- Check the working: the numbered steps under the results substitute your numbers into each stage of the formula, and the deviations table lists every value, its deviation from the mean, and its squared deviation.
- Copy or share the result with the buttons in the results box. Copy takes the summary and the step-by-step working together.
Two input problems stop the calculation with a plain message. A token with no leading number, such as the word abc in “abc, 5”, returns ““abc” is not a number. Use commas, spaces, or lines between values.” Fewer than two valid numbers returns “Enter at least 2 numbers.” One honest parsing note: the reader takes a leading number where it finds one, so 5abc counts as 5. Proofread pasted data before you trust the output.
The sample standard deviation formula and the n minus 1 denominator
The sample standard deviation is the square root of the sum of squared deviations divided by n − 1. In symbols: s = √[Σ(x − mean)² ÷ (n − 1)], where the mean is the ordinary average of the sample.
Sample variance: s² = Σ(x − x̄)² ÷ (n − 1)
Population version: σ = √[ Σ(x − μ)² ÷ n ]
Dividing by n − 1 is called Bessel’s correction. A sample tends to sit closer to its own mean than the full population sits to the true population mean, so dividing by n would systematically understate the spread. Shrinking the denominator by one inflates the result just enough to make s² an unbiased estimate of the population variance, which is the treatment the standard textbook discussion in OpenStax Introductory Statistics, section 2.7 gives: divide by n − 1 “because the data is a sample” and the sample variance estimates the population variance. Everything starts from the mean, so if you only need the average itself, the sample mean calculator covers that step on its own.
The correction bites hardest on small samples. With n = 2, the sample variance is double the population variance for the same pair (dividing by 1 instead of 2). With n = 100 the two denominators differ by about 1%, and the choice barely moves the answer. That is also why a single value can never have a sample standard deviation: n − 1 would be zero, and the tool asks for at least two numbers instead of dividing by zero.
Worked example: 5, 10, 15, 20, 25 step by step
Five values, mean 15, sum of squared deviations 250. Run through the calculator above, the sample SD comes out at 7.9057 and every intermediate figure below matches the tool’s own step display.
| Value | Deviation (x − mean) | Squared deviation |
|---|---|---|
| 5 | −10 | 100 |
| 10 | −5 | 25 |
| 15 | 0 | 0 |
| 20 | 5 | 25 |
| 25 | 10 | 100 |
| Sum of squares | 250 | |
The full results panel for this dataset reads: sample SD 7.9057, sample variance 62.5, population SD 7.0711 (variance 50), count 5, sum 75, mean 15, min 5, max 25, range 20, coefficient of variation 52.70%, standard error 3.5355, and a mean ± 1 SD band of 7.0943 to 22.9057. A second check with the classic textbook dataset 2, 4, 4, 4, 5, 5, 7, 9 gives s = 2.1381, s² = 4.5714 and σ = 2, which matches the hand calculation (sum of squared deviations 32, divided by 7, square rooted).
Sample or population: picking the right denominator
Use n − 1 when your numbers are a subset standing in for a larger group, and n only when your numbers are the entire group you care about. Five days of sales sampled from a quarter are a sample; the final grades of one named class, with nobody missing, are a population.
| Question | Sample (s) | Population (σ) |
|---|---|---|
| Denominator | n − 1 | n |
| Your data is | A subset used to estimate a bigger group | The complete group, nothing left out |
| Worked example result | 7.9057 | 7.0711 |
| Typical use | Experiments, surveys, quality samples, class samples | A full census, every machine on one line, one complete class |
This page leads with s because the page is the sample tool, but it prints σ directly underneath so a wrong-denominator mistake is easy to catch before you quote a figure. If your data really is the whole population and you want the population treatment as the headline, the standard deviation on a calculator page is built around that framing. One correction to a claim older versions of this page made: s is not “always a little larger” than σ. It is never smaller, and when every value in the dataset is identical the two are exactly equal, because both are zero.
Reading the rest of the results panel: CV, standard error and the 1 SD band
Three extra lines turn the SD into something you can compare and quote. The coefficient of variation is s divided by the mean, times 100: a percentage version of spread. The standard error is s divided by √n: a precision score for the sample mean itself. The mean ± 1 SD band is the interval one SD either side of the mean.
The coefficient of variation earns its keep when units differ. A filling machine with s = 2 grams on a 500 gram mean (CV 0.40%) is far more consistent than a scale with s = 2 kilograms on a 40 kilogram mean (CV 5%), even though both SDs read “2”. The dedicated coefficient of variation calculator goes deeper on that ratio. Two honest limits from the tool itself: the CV uses the absolute value of the ratio, so a negative mean still reports a positive CV, and when the mean is exactly zero the tool prints “n/a (mean is zero)” instead of dividing by zero.
The standard error answers a different question: how much would the sample mean wobble if you sampled again? For the worked example it is 3.5355 (7.9057 ÷ √5). It shrinks as n grows, which is the arithmetic behind larger samples giving tighter estimates, and it is the building block for the margin of error in a confidence interval calculator. The 1 SD band needs the most care: about 68% of values fall inside it only for roughly bell-shaped data, as the Australian Bureau of Statistics guide to measures of spread puts it. For skewed data or a handful of values, treat the band as a scale marker, not a headcount.
The computational cross-check and the four-decimal display
The tool computes the sum of squares twice and shows both results. The direct route squares each deviation and adds them; the computational form, Σx² − n·mean², reaches the same total from the raw squares, and the step display prints the substitution (for the worked example: 1375 − 5 × 15² = 250).
Why bother? Because the two routes fail differently. A transcription slip in one value usually breaks the agreement and flags itself before you quote a wrong SD. The cross-check follows the same summary-statistics practice described in the NIST/SEMATECH e-Handbook section on measures of scale: spread estimates deserve a second, independent look because they are sensitive to the tails of the data. Display rounding is the other quiet detail. Every figure is rounded to four decimal places for display (62.5, not 62.5000, and 2 for a population SD of exactly 2), while the calculation itself keeps full precision, so a variance you see as 0.0067 still feeds an exact square root. With very messy decimals the two sum-of-squares routes can disagree in the last displayed decimal purely from floating-point residue; the deviation route is the one the headline s comes from.
What competing calculators miss
Standard deviation is a crowded keyword, and most rivals do the core division correctly. The gaps are in the working, the extras, and occasionally the arithmetic itself:
- Calculator Soup’s standard deviation calculator: the benchmark for showing work, with sample and population formulas set out cleanly. Gap: it stops at SD, variance, count, mean and sum of squares. No standard error, no coefficient of variation, no cross-check that the sum of squares was computed two ways.
- Turn2Engineering: the richest panel in this set, with quartiles, z-scores, outlier flags and a frequency shorthand (10:3). Gap: results update automatically as you type, so there is no deliberate calculate step to verify a pasted dataset against, and the extras push the headline sample result down the page.
- Mathos AI: clear steps and an honest independent check (squaring the result back to the variance). Gap: the check verifies the last step only; a wrong sum of squares upstream would still pass it.
- RapidTables and the quick-tool clones (Akyno, Afza, Gameplotly): fast, minimal, sample/population toggle, thin summaries. One of them publishes a worked example giving the standard deviation of 85, 90, 78, 92, 88 as 5.27, which matches neither the sample value (5.4589) nor the population value (4.8826) for that data. Always re-run a rival’s example numbers before trusting its tool.
- The gap this page fills: the sample result first, the population result directly beneath it, a deviations table for every value, a two-route sum-of-squares cross-check, and CV plus standard error in the same panel, with nothing calculated until you click Calculate.
Frequently asked questions
s = √[Σ(x − mean)² ÷ (n − 1)]. Find the mean, subtract it from each value, square each deviation, add the squares, divide by n − 1, then take the square root. For 5, 10, 15, 20, 25 the sum of squared deviations is 250, the sample variance is 250 ÷ 4 = 62.5, and s = √62.5 = 7.9057.
That is Bessel’s correction. A sample tends to sit closer to its own mean than the full population sits to the true mean, so dividing by n would understate the spread. Dividing by n − 1 corrects that bias and makes the sample variance an unbiased estimate of the population variance.
Sample SD divides the sum of squared deviations by n − 1 and estimates the spread of a larger population from a subset. Population SD divides by n and describes exactly the complete set you have. For the same data, s is never smaller than σ; the two are equal only when every value is identical, when both are zero.
Sample variance is the value you take the square root of to get s: the sum of squared deviations divided by n − 1. In the worked example it is 250 ÷ 4 = 62.5. Its units are the original units squared, which is why the standard deviation, back in the original units, is the figure people usually quote.
It expresses spread as a percentage of the mean: CV = s ÷ mean × 100. The worked example gives 52.70%. Because it is a percentage, it can compare variability across datasets measured in different units. When the mean is exactly zero the tool shows n/a (mean is zero) instead of dividing by zero.
The standard error is s ÷ √n. It measures how precisely the sample mean estimates the population mean: larger samples give smaller standard errors. For 5, 10, 15, 20, 25 it is 7.9057 ÷ √5 = 3.5355.
It is the interval one sample SD either side of the mean, here 7.0943 to 22.9057. In roughly bell-shaped data about 68% of values fall inside that band. For skewed data or very small samples, treat it as a scale marker rather than a guaranteed share of values.
A token with no leading number stops the calculation: abc in “abc, 5” returns the message that “abc” is not a number. Fewer than two valid numbers returns “Enter at least 2 numbers.” Note that the reader takes a leading number where it finds one, so 5abc counts as 5; check pasted data carefully.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- OpenStax, Rice University. Introductory Statistics 2e, Section 2.7: Measures of the Spread of the Data (sample and population SD formulas, the n − 1 denominator, deviations table method). Accessed October 24, 2026.
- OpenStax, Rice University. Introductory Statistics 2e, Section 1.1: Definitions of Statistics, Probability, and Key Terms (population, sample, statistic and parameter definitions behind the sample/population choice). Accessed October 24, 2026.
- National Institute of Standards and Technology. NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.5.6: Measures of Scale (standard deviation as a scale estimate, its sensitivity to non-normal tails, range comparison). Accessed October 24, 2026.
- Australian Bureau of Statistics. Measures of Spread (sample variance s² with the n − 1 denominator, population variance with N, the 68% within one SD statement for normal data). Accessed October 24, 2026.
- Statistics Canada. Calculating the Variance and Standard Deviation (Power from Data, Section 4.5.3) (step-by-step variance working, SD sensitivity to extreme values, zero SD when all values are equal). Accessed October 24, 2026.
