Standard Deviation Calculator

Paste or type a list of numbers and the calculator returns the standard deviation and variance, with a toggle between the sample (n − 1) and population (n) variants. Mean, sum of squared deviations and range are shown alongside.

#math#statistics#standard-deviation#variance#sigma

Comma, space, or newline-separated. Decimals and negatives are fine.

Sample standard deviation (s)

2.1380899353

Sample variance (s²)
4.5714285714
Mean (x̄)
5
Sum of squared deviations
32
Count (n)
8
Minimum
2
Maximum
9
Range
7

Calculated from 8 values. Sample divides by n − 1 (Bessel's correction); population divides by n.

How to use this calculator

Type or paste numbers into the input field. Separate them however you like — commas, spaces, tabs or new lines all work. Choose whether the data is a sample (most common — you are estimating spread from a subset) or the entire population. The headline result updates as you type and shows the standard deviation; the breakdown lists the variance, the mean, the sum of squared deviations from the mean, the count, the minimum, the maximum and the range. Decimals and negative numbers are handled correctly. Unrecognised tokens are ignored and reported under the result.

How the calculation works

The standard deviation measures how spread out the values are around the mean. Compute the mean x̄ of all values, then for each value the squared deviation (xᵢ − x̄)². Sum these squared deviations. For the population variant, divide by the count n and take the square root: σ = √(Σ(xᵢ − μ)² / n). For the sample variant, divide by n − 1 instead — this is Bessel's correction, which makes the result an unbiased estimator of the underlying population variance when the data is a sample. The variance is just the standard deviation squared (s² or σ²). All formulas follow OpenStax Introductory Statistics §2.7 and the NIST e-Handbook of Statistical Methods.

Worked example

For the dataset 2, 4, 4, 4, 5, 5, 7, 9 (eight values): the mean is 5. The deviations from the mean are −3, −1, −1, −1, 0, 0, 2, 4, whose squares are 9, 1, 1, 1, 0, 0, 4, 16. The sum of squared deviations is 32. Treating the data as a population, the variance is 32 ÷ 8 = 4 and the standard deviation is √4 = 2 exactly. Treating it as a sample, the variance is 32 ÷ 7 ≈ 4.5714 and the standard deviation is √(32 ÷ 7) ≈ 2.1381. The sample value is always slightly larger than the population value because dividing by n − 1 yields a larger fraction than dividing by n.

Frequently asked questions

What is the difference between sample and population standard deviation?

Both measure how spread out the values are around their mean. Population standard deviation (σ) divides the sum of squared deviations by the count n — it assumes the data is the entire population, so no estimation correction is needed. Sample standard deviation (s) divides by n − 1 instead — this is Bessel's correction, and it makes s² an unbiased estimator of the unknown population variance when the data is only a sample. In practice, real datasets are almost always samples, so the sample formula is the default for inferential statistics; use the population formula only when you genuinely have every member of the population.

Why divide by n − 1 for a sample instead of n?

The sample mean is computed from the same data you are measuring deviations from, which slightly under-estimates the true spread (the mean is, by construction, the point that minimises the sum of squared deviations within your sample). Dividing by n − 1 instead of n compensates for that and yields an unbiased estimator of the population variance. The correction matters most for small samples — for n = 5 the divisor goes from 5 to 4 (a 25% adjustment); for n = 1000 it goes from 1000 to 999 (a 0.1% adjustment) and the two variants converge.

What is variance and how does it relate to standard deviation?

Variance is the average squared deviation from the mean. Standard deviation is the square root of variance — it is the variance brought back to the original units of the data. Variance has the nice mathematical property that it adds for independent variables, which is why it appears throughout probability theory and statistics; standard deviation is more intuitive for reporting because its units match the data (pounds, seconds, dollars). The calculator shows both: s and s² for the sample variant, σ and σ² for the population variant.

What does a standard deviation actually tell me?

It quantifies how typical values cluster around the mean. For a roughly normal (bell-shaped) distribution, about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three — the "68–95–99.7 rule". A larger standard deviation means a wider, flatter distribution; a smaller one means a tighter clustering. For skewed or unusual distributions the rule of thumb breaks down, but the standard deviation is still a useful single number summarising spread.

Can standard deviation be negative or zero?

Never negative — it is defined as a square root of an average of squared quantities, which cannot be negative. It is zero only when every value in the dataset is identical (every deviation from the mean is zero, so the sum of squared deviations is zero). Any variation at all in the data produces a positive standard deviation.

What if I only have one number?

Population standard deviation is defined as zero — a single value has no spread. Sample standard deviation is undefined because the formula divides by n − 1 = 0. The calculator surfaces this directly: with one value and the sample setting selected, it returns an em-dash and a note telling you to either add another value or switch to the population variant.