Standard Deviation Calculator
Standard deviation measures how spread out a set of numbers is: small when the values huddle near the mean, large when they scatter. Paste or type your list and this tool returns both flavours — the population standard deviation (σ) for when your list is the whole group, and the sample standard deviation (s) for when it is only a sample — together with both variances and the working behind them.
The sums run as exact fractions, never rounded mid-way, so the variance is exact; the standard deviation prints exactly when it lands on a rational number and in simplified radical form, with the decimal beside it, when it does not.
Up to 10,000 numbers. Decimals and negatives are fine; anything that is not a number is refused and named.
Population standard deviation (σ)
2
Population variance σ² = 4 — use this when your list is the whole group.
Sample standard deviation (s)
4√14 / 7 ≈ 2.1380899353
Sample variance s² = 4.5714285714 — use this when your list is a sample of a bigger group.
How it is worked out
- Count n = 8; sum = 40; mean x̄ = 5 (exact — the sums run as fractions, never rounded mid-way).
- Sum of squared deviations from the mean = 32.
- Population variance divides by n: σ² = 4; σ is its square root.
- Sample variance divides by n − 1 instead: s² = 4.5714285714 — the n − 1 corrects the sample's tendency to understate the spread.
- A square root prints exactly when the variance is a perfect square; otherwise it prints in simplified radical form with the value beside it, to 10 decimal places.
Embed this calculator on your website →
The formula
σ = √( Σ(x − x̄)² ÷ n ) · s = √( Σ(x − x̄)² ÷ (n − 1) )
- x̄ (the mean) — the sum of the values divided by how many there are; every deviation is measured from it.
- Σ(x − x̄)² — each value's distance from the mean, squared (so negatives cannot cancel), then added up. Squaring also punishes far-away values more than near ones.
- n versus n − 1 — a population divides by its full count n; a sample divides by n − 1 (Bessel's correction), because a sample tends to sit closer to its own mean than the wider group does. A sample of one value has no spread to estimate, so s is stated as not defined rather than faked.
- variance — the quantity inside the square root; it is in squared units, which is why the standard deviation (its root) is usually the number you quote.
Worked example: for 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the squared deviations add to 32, so σ² = 32 ÷ 8 = 4 and σ = 2 exactly, while s² = 32 ÷ 7 and s ≈ 2.1380899353 — the default data in the tool above.
How it works
Why two answers? They are not two opinions about the same thing. If you measured every student in one class, that class is your population and σ describes it exactly. If you measured ten shoppers to guess about all shoppers, your list is a sample, and s is the honest estimate for the group you did not measure — the n − 1 divisor is what keeps that estimate from being systematically too small.
Reading the size. The standard deviation is in the same units as your data. For roughly bell-shaped data, about two-thirds of values usually fall within one standard deviation of the mean and about 95% within two — a rule of thumb about shape, not a guarantee for any particular list.
Examples
- 2, 4, 4, 4, 5, 5, 7, 9 — the classic textbook set: σ = 2 exactly, s = 4√14 / 7 ≈ 2.1380899353.
- Identical values — 7, 7, 7 gives σ = s = 0: no spread at all, correctly.
- A single value — the population SD is 0, and the sample SD is reported as not defined instead of dividing by zero.
Frequently asked questions
Should I use the population or the sample standard deviation?
Population (σ) when your numbers are everything you care about — every student in the class, every day of last month. Sample (s) when your numbers are a selection meant to stand for a larger group you did not measure. When in doubt for real-world data, s is the more common and more conservative choice.
Why does the sample version divide by n − 1 instead of n?
Deviations are measured from the sample's own mean, and that mean was itself fitted to the sample, so the deviations come out a touch too small on average. Dividing by n − 1 instead of n inflates the result just enough to correct that bias — it is called Bessel's correction.
What is the difference between variance and standard deviation?
Variance is the average squared deviation; standard deviation is its square root. They carry the same information, but variance is in squared units (square centimetres, squared dollars), which is awkward to say out loud — standard deviation is back in the original units, so it is the one usually reported.
Why does my result show a square-root expression like 4√14 / 7?
Because that is the exact answer. Most standard deviations are irrational numbers whose decimals never end; when the variance is not a perfect square this tool prints the simplified radical form and a 10-decimal value beside it, instead of pretending a rounded decimal is exact.
How many numbers can I paste?
Up to 10,000 values, separated by commas, spaces, semicolons, or line breaks. An entry that is not a number is refused and named, rather than silently skipped — a skipped value would quietly change your statistics.
Related calculators
Descriptive Statistics Calculator
LiveThe full summary of a data set in one pass: count, sum, mean, median, mode, quartiles, IQR, range, variance, and standard deviation — with the quartile method printed.
Average and Weighted Average Calculator
LiveCalculate simple and weighted averages and see each value's contribution.
Math Helpers
LiveThe everyday operations in one place: percentage of a number, powers, square and cube roots, factorials, and logarithms — each with its rule stated.

