Standard Deviation Calculator
Free standard deviation calculator: paste any dataset and get population σ, sample s, mean, variance, and count instantly, with full theory and worked steps.
Standard Deviation Calculator
Background.
The Quanta standard deviation calculator takes any list of numbers — pasted as a JSON array, copied out of a spreadsheet column, or typed in as a comma-separated line — and returns the two standard-deviation flavours (population σ and sample s), the corresponding variances, the mean, and the sample size in a single pass. Standard deviation is the most important measure of dispersion in all of statistics: it tells you, in the same units as the original data, how far a typical observation sits from the mean. Where the range looks only at the two extreme values and the interquartile range looks only at the middle 50%, the standard deviation uses every observation, weights each one by the square of its distance from the mean, and produces a single number that is mathematically tractable enough to drive every confidence interval, every hypothesis test, every z-score, and every quoted volatility on a stock chart you will ever see.
The distinction between the population and sample versions is the one thing students most often get wrong. Use the population formula (divide by n) when your data is the entire population you care about — every employee on a single payroll, every keystroke logged on one keyboard, every game played by a team in one season. Use the sample formula (divide by n−1, Bessel's correction) when your data is a sample drawn from a larger population that you would like to make inferences about — 500 voters out of a country of millions, 30 light bulbs out of a production run of 100,000, ten test scores out of a class of forty. The n−1 divisor exists because the sample mean is itself estimated from the data and is therefore by construction closer to the sample than the unknown population mean would be; dividing by n−1 corrects for that systematic underestimate and makes s² an unbiased estimator of σ². The correction is large for tiny samples (n = 2 makes the divisor half of n) and negligible by the time n passes a few hundred, which is why for big-data work the two answers agree to many decimal places and you can stop worrying about which to use.
For small samples — exactly the regime where statisticians worry the most — the n−1 vs n choice changes the answer materially, which is why every serious statistics package, spreadsheet, and pocket calculator exposes both.
Once you have σ or s in hand, the 68–95–99.7 rule (also known as the empirical rule) does the rest of the heavy lifting for any roughly normally distributed dataset: about 68% of values lie within one standard deviation of the mean, about 95% within two, and about 99.7% within three. A test score 2σ above the class mean is in the top 2.5%; a stock daily return 3σ below the recent mean is the kind of event the financial press calls a "three-sigma event" and Wall Street risk desks track obsessively. Z-scores formalise this — z = (x − mean) / σ tells you in standard-deviation units how unusual a value is, and z-scores are directly comparable across datasets with completely different units, which is why they are the lingua franca of standardised testing, six-sigma manufacturing quality control, and effect-size reporting in medicine.
The calculator above and the explainer below cover every variant of the question: when to use σ versus s, why the divisor changes, how to read the empirical rule, how to convert between standard deviation and variance, why standard deviation is a far more informative summary of spread than the range, and how the same formula powers everything from psychometric test design to portfolio risk management to Six Sigma defect tracking. Worked examples cover classroom test scores, S&P 500 daily returns, manufacturing tolerances, and the canonical [2, 4, 4, 4, 5, 5, 7, 9] textbook dataset that gives a clean σ = 2.0 and is the easiest way to verify by hand that the calculator is doing the right thing.
What is standard deviation calculator?
Standard deviation is a measure of how spread out the values in a dataset are around their mean — reported in the same units as the original data. Formally, the standard deviation is the square root of the variance, where the variance is the average squared deviation of each value from the mean. There are two versions in everyday use, distinguished by what they divide the sum of squared deviations by. The population standard deviation, σ (Greek lowercase sigma), divides by n — the total number of observations — and is the right choice when the dataset includes every member of the population of interest. The sample standard deviation, s, divides by n−1 instead of n, an adjustment known as Bessel's correction, and is the right choice when the dataset is a sample drawn from a larger population about which you want to make inferences. The reason the sample formula uses n−1 rather than n is technical but worth understanding. The sample mean x̄ is itself computed from the data, so the deviations (xᵢ − x̄) are by construction smaller, on average, than the deviations (xᵢ − μ) from the true (unknown) population mean μ would be. Dividing the sum of squared deviations by n therefore systematically underestimates σ². Dividing by n−1 exactly compensates for that bias and makes s² an unbiased estimator of σ². The intuition is that fixing the sample mean uses up one "degree of freedom" — once x̄ is known, only n−1 of the deviations can vary freely; the last one is determined by the constraint Σ(xᵢ − x̄) = 0. The variance is itself a useful quantity — it is additive for independent variables (Var(X + Y) = Var(X) + Var(Y) when X and Y are independent), a property the standard deviation does not have — but variance is reported in squared units, which makes it hard for humans to interpret directly. Standard deviation is the human-friendly version: a standard deviation of $5 in a dataset of daily expenditures means a typical day deviates from the mean by about $5, full stop. For roughly normally distributed data the standard deviation has a clean probabilistic interpretation via the empirical rule: about 68% of observations fall within one standard deviation of the mean, 95% within two, and 99.7% within three. This is the basis of Z-scores, control charts, Six Sigma quality benchmarks, and most introductory hypothesis testing. For non-normal distributions the empirical rule is only approximate, but Chebyshev's inequality still guarantees at minimum that at least 1 − 1/k² of any distribution's mass lies within k standard deviations of the mean, no matter how weird the shape — at least 75% within 2σ, at least 89% within 3σ.
How to use this calculator.
- Paste your dataset into the input box. Either format works: a JSON array like [2, 4, 4, 4, 5, 5, 7, 9] or a plain comma-separated list like 2, 4, 4, 4, 5, 5, 7, 9. Whitespace and line breaks between values are ignored. You need at least two values for the sample standard deviation; a single value has zero deviation by definition.
- Decide which standard deviation you need before reading the result. If your data is the entire population of interest (every employee on a payroll, every game in a season, every unit from a production run that has ended), use the population standard deviation σ. If your data is a sample drawn from a larger population about which you want to make inferences, use the sample standard deviation s — this is the more common case in practice and the value that feeds into confidence intervals and hypothesis tests.
- Verify the parsed count (n) in the results panel matches the number of values you intended to enter. A mismatch usually means a stray character — a letter, an unmatched bracket, two commas in a row — confused the parser and at least one value was dropped or merged.
- Read the mean alongside the standard deviation. The two together describe the location and the spread of the data. A useful sanity check: about two-thirds of values should fall between (mean − s) and (mean + s) for roughly normal data, and almost all (≈95%) within (mean − 2s) and (mean + 2s).
- Use the variance (the square of the standard deviation) when you are combining independent random variables — variances add, standard deviations do not. For example, the variance of a sum of two independent random returns is the sum of the individual variances, but the standard deviation of the sum is the square root of that — about 41% larger than either individual standard deviation, not twice as large.
- For inferential statistics (confidence intervals, t-tests, z-scores) feed the sample standard deviation into the relevant formula: a 95% confidence interval for the mean is approximately x̄ ± 1.96·s/√n for large n, or x̄ ± t·s/√n with a t-multiplier from a t-table for small n. A z-score for a single value x is (x − x̄)/s.
The formula.
Both standard deviations share the same skeleton: compute the mean, compute the squared deviation of each value from the mean, sum those squared deviations, divide by a divisor that depends on which formula you want, then take the square root. The mean is x̄ = (1/n)·Σᵢ₌₁ⁿ xᵢ. The squared deviation of value xᵢ from the mean is (xᵢ − x̄)². The sum of squared deviations, often abbreviated SS, is Σᵢ₌₁ⁿ (xᵢ − x̄)². The population variance is σ² = SS / n, and the population standard deviation is σ = √(SS/n). The sample variance is s² = SS / (n−1), and the sample standard deviation is s = √(SS/(n−1)). The only difference is the divisor — n for the population formula, n−1 for the sample formula — but that single change has a real effect for small samples. For n = 2 the sample formula divides by 1 instead of 2, doubling the variance; for n = 10 it divides by 9 instead of 10, an 11% inflation; by n = 100 the gap is 1% and shrinking; by n = 1,000 it is 0.1%. The n−1 divisor is known as Bessel's correction, after Friedrich Bessel's 1838 paper on the topic, and it exists because the sample mean x̄ is itself an estimate computed from the data. Once x̄ is fixed, the deviations (xᵢ − x̄) must sum to zero by construction, so they have only n−1 degrees of freedom; dividing by n−1 corrects the systematic underestimate this causes. Internally the calculator parses your input as JSON first, falls back to splitting on commas if JSON parsing fails, coerces every token to a number, and rejects any input containing a non-numeric token (so a typo like "5.0o" raises an error instead of being silently dropped). The mean is computed in one linear pass; the sum of squared deviations is computed in a second linear pass. This two-pass algorithm is numerically more stable than the algebraically equivalent single-pass "computational" formula Σx² − n·x̄² when the values are large or close together, so the calculator uses two passes deliberately. Empty datasets and datasets of a single value are rejected for the sample standard deviation (division by zero), but a single value still has a well-defined population standard deviation of zero.
A worked example.
The canonical textbook dataset chosen specifically because the answer comes out clean. The eight values sum to 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40, so the mean is 40 / 8 = 5.0. Now compute the squared deviation of each value from 5: (2−5)² = 9, (4−5)² = 1 three times, (5−5)² = 0 twice, (7−5)² = 4, (9−5)² = 16. The sum of squared deviations is 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32. The population variance is 32 / 8 = 4, so the population standard deviation σ = √4 = 2.0 exactly. The sample variance uses n−1 = 7 in the denominator: 32 / 7 ≈ 4.571, so the sample standard deviation s ≈ √4.571 ≈ 2.138. Notice the gap: for n = 8 the sample formula inflates the variance by a factor of 8/7 ≈ 1.143 and the standard deviation by √(8/7) ≈ 1.069 — about 7% larger. That gap is exactly what Bessel's correction does, and it shrinks toward zero as n grows. For real-world interpretation, imagine these eight values are the daily late-arrival minutes of one employee for a single week (treating the week as the entire population) — a population standard deviation of 2 minutes around a mean of 5 means most days are within 3 to 7 minutes late, with the 9-minute day being the worst outlier at exactly 2σ above the mean. Apply the empirical rule: if these arrival times were normally distributed (they're too few to tell here, but bear with the example), about 68% of days should fall between 3 and 7 minutes late, 95% between 1 and 9 minutes, and 99.7% between −1 and 11 minutes.
Frequently asked questions.
What is the difference between population and sample standard deviation?
What is Bessel's correction and why is the divisor n−1?
What is the 68-95-99.7 rule?
What is the difference between variance and standard deviation?
How do I compute a z-score from the standard deviation?
Why is standard deviation a better measure of spread than the range?
How is standard deviation used in finance and investing?
How is standard deviation used in manufacturing and quality control?
What does it mean if the standard deviation is zero?
Why do my Excel STDEV and STDEVP functions give different answers?
References& sources.
- [1]NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.2 — Confidence Limits for the Mean. Authoritative U.S. National Institute of Standards and Technology reference for sample mean, sample standard deviation, and the n−1 divisor used in inferential statistics.
- [2]Casella, George and Berger, Roger L. Statistical Inference, 2nd edition. Duxbury / Cengage, 2002 — the standard graduate-level reference. Theorem 5.2.4 proves that s² with the n−1 divisor is the unbiased estimator of σ².
- [3]Bessel, Friedrich Wilhelm. "Untersuchungen über die Wahrscheinlichkeit der Beobachtungsfehler." Astronomische Nachrichten 15, 1838, pp. 369–404 — the original 1838 derivation of the n−1 correction, now universally known as Bessel's correction.
- [4]OpenStax. Introductory Statistics. Rice University, 2022 — peer-reviewed open-access textbook. Chapter 2.7 covers variance and standard deviation; Chapter 6 covers the empirical (68–95–99.7) rule and z-scores.
- [5]Khan Academy. "Sample standard deviation." Statistics and probability — high-quality free explainer aligned to the same definitions used by NIST and OpenStax, useful as a student-facing companion.
- [6]NIST/SEMATECH e-Handbook of Statistical Methods, §6.3 — Univariate and Multivariate Control Charts. Reference for the use of process mean ± 3σ control limits in statistical process control and Six Sigma quality programmes.
- [7]Wasserman, Larry. All of Statistics: A Concise Course in Statistical Inference. Springer, 2004 — peer-reviewed graduate text. Chapter 6.3 covers variance and standard deviation, Chebyshev's inequality, and the unbiasedness of the sample variance under Bessel's correction.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 313 calculators remain free
- No billing is enabled