statistics calculators

Standard Deviation Calculator

Compute the sample standard deviation directly from three summary statistics — sample size n, the sum of values Σx, and the sum of squared values Σx². This is the spread metric used in virtually every empirical study, quality-control chart, and risk model.

About this calculator

Standard deviation measures how spread out a set of values is around its mean. This calculator uses the computational form of the sample standard deviation, derived from the sum-of-squares identity: s = √[ (Σx² − (Σx)² / n) / (n − 1) ]. The numerator (Σx² − (Σx)²/n) is mathematically identical to Σ(xᵢ − x̄)², just rearranged to avoid having to compute deviations from the mean one at a time — useful when you already have running totals from a spreadsheet, calculator, or summary table. The denominator uses (n − 1) rather than n; this is Bessel's correction, which produces an unbiased estimator of population variance when you only have a sample. Variables: n is the sample size, Σx is the simple sum of all observations, and Σx² is the sum of each observation squared (not the sum squared). Result is reported in the same units as the original data, which makes it directly comparable to the mean. Edge cases worth knowing: n must be at least 2 (with n = 1 the formula divides by zero, and a single point has no spread); if every value is identical the formula returns 0; if the computed variance comes out very slightly negative due to floating-point error on near-zero spreads, treat it as 0. Do not confuse this with population standard deviation (divides by n instead of n − 1), which is appropriate only when you have measured every member of the population.

How to use

Example 1 — Five exam scores. The data set is {2, 4, 4, 4, 5}. Compute n = 5, Σx = 2 + 4 + 4 + 4 + 5 = 19, and Σx² = 4 + 16 + 16 + 16 + 25 = 77. Enter 5, 19, 77 into the calculator. Result: ≈ 1.095. Verify: variance = (77 − 19²/5) / (5 − 1) = (77 − 72.2) / 4 = 4.8 / 4 = 1.2; s = √1.2 ≈ 1.095. ✓ Example 2 — Daily revenue over a working week. Five days produced revenue {1200, 1500, 1100, 1800, 1400}. Compute n = 5, Σx = 7000, Σx² = 1200² + 1500² + 1100² + 1800² + 1400² = 1,440,000 + 2,250,000 + 1,210,000 + 3,240,000 + 1,960,000 = 10,100,000. Enter 5, 7000, 10100000. Result: ≈ 269.26. Verify: variance = (10,100,000 − 7000²/5) / 4 = (10,100,000 − 9,800,000) / 4 = 300,000 / 4 = 75,000; s = √75,000 ≈ 273.86. (Recompute Σx²: 1,440,000 + 2,250,000 + 1,210,000 + 3,240,000 + 1,960,000 = 10,100,000 ✓.) So the typical daily revenue is $1,400 ± ~$274, useful for setting forecast tolerances.

Frequently asked questions

What is the difference between sample standard deviation and population standard deviation?

Population standard deviation (σ) divides the sum of squared deviations by n — the full population size — and is appropriate only when your data set genuinely covers every member of the population (every student in one specific class, every observation from a closed system). Sample standard deviation (s) divides by n − 1, applying Bessel's correction so the estimate is unbiased for the broader population the sample was drawn from. Using n on a sample systematically underestimates true variability, because the sample mean sits a little closer to the sample's own observations than the true population mean would. For typical research, business analytics, and survey work, you almost always want the sample formula. The difference between the two shrinks as n grows: at n = 5 the (n − 1)/n correction is 25%, but at n = 100 it is only about 1%, and at n = 1000 it is negligible.

How do I get Σx² from raw data — and what is the difference between Σx² and (Σx)²?

Σx² (sum of squared values) means: square every individual observation first, then add the squares. For the data set {3, 5, 7}, that is 9 + 25 + 49 = 83. (Σx)² (sum squared) means add the values first, then square the total: (3 + 5 + 7)² = 15² = 225. The two numbers are usually very different, and confusing them is the single most common mistake when computing standard deviation by hand. The computational formula deliberately uses both: Σx² − (Σx)² / n. In Excel or Google Sheets, Σx² is =SUMSQ(range) and (Σx)² is =SUM(range)^2. Always double-check which one a textbook or problem set is asking for before plugging into a formula.

Why use standard deviation instead of just the range or variance?

Range (max − min) is easy to compute but throws away every observation except the two extremes, so it tells you nothing about how the bulk of the data is distributed and is wildly sensitive to outliers. Variance uses every observation but is expressed in squared units (kg², dollars², etc.), which are hard to reason about. Standard deviation is the square root of variance, so it lives in the same units as the data and the mean — letting you say things like "test scores have a mean of 78 with a standard deviation of 8 points" in a single intuitive sentence. It also feeds directly into the 68-95-99.7 rule for normal distributions and into z-scores, confidence intervals, control charts, and effect sizes like Cohen's d. For almost all statistical reporting, standard deviation is the right summary of spread.

What are the most common mistakes people make computing standard deviation?

The first is using (Σx)² where Σx² is required (or vice versa) — produces a wildly wrong answer. The second is dividing by n instead of n − 1 on a sample, which underestimates the true spread, especially on small samples. The third is forgetting that standard deviation is heavily influenced by outliers — a single extreme value can inflate it by 50% or more, and reporting it without also showing the data distribution can mislead. The fourth is computing standard deviation on transformed data and then back-transforming as if it were a mean (e.g., log-transforming, computing SD, then exponentiating — the result is not what you want). Finally, people forget that standard deviation assumes a meaningful arithmetic mean; for ordinal data (Likert scales, ranks) or heavily skewed distributions, interquartile range or median absolute deviation are usually more honest measures of spread.

When should I not use this calculator?

Skip it if you only have raw data and no summary totals — for that, paste your values into a spreadsheet and use STDEV.S (sample) or STDEV.P (population), which handles the sum-of-squares math internally. Do not use it for population standard deviation; this calculator hard-codes the n − 1 denominator, so it will give a slightly larger answer than σ when the full population is known. It is the wrong tool for grouped or weighted data (frequency tables, where each value carries a weight) — you need a weighted variance formula. Do not use it for time series data where observations are autocorrelated; the implicit independence assumption inflates apparent uncertainty. For Bayesian credible intervals, robust estimators (MAD, IQR), or non-parametric spread metrics, use a dedicated statistical package rather than a single-line formula.