Skip to main content
OS Authority

Calculate standard deviation and variance

Paste a list of numbers and choose sample or population. Calculate standard deviation, variance, mean and count without uploading your data.

Calculations run in your browser. The values you enter are not uploaded or stored by this tool.

How it works

  1. Paste numbers separated by spaces, commas, semicolons or new lines. Use a decimal point and omit thousands separators.
  2. Choose Sample for an estimate from sampled observations, or Population for the complete population being described.
  3. Read standard deviation, variance, mean and count, then copy the results.

Sample and population use different divisors

The mean is the sum of the observations divided by their count n. Population variance divides the sum of squared deviations from that mean by n. Sample variance divides it by n − 1. Standard deviation is the square root of variance. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5; population variance is 4 and population standard deviation is 2. The sample variance is 32/7 and sample standard deviation is about 2.1381.

How to enter a numeric list

Use 1.5 for a decimal, not 1,5. Commas are list separators, so 1,000 is interpreted as two observations, 1 and 0; enter 1000 for one thousand. Scientific notation such as 1e3 is accepted. Fractions, percentages, NaN and Infinity are rejected rather than silently omitted. Limits on characters and observations are shown beside the input and may be lower on low-memory devices.

Numerical accuracy and interpretation

The calculation uses an offset-centered Welford algorithm to reduce cancellation when observations are close together but large. It still uses floating-point numbers, so values beyond their representable precision cannot be recovered. Calculations that overflow, or underflow so that distinct observations would falsely appear to have zero variance, are rejected. Try expressing the values in a different consistent unit. Standard deviation has the same units as the observations; variance has squared units. Neither result alone proves normality or identifies an outlier.

Worked examples

Standard Deviation Calculator worked examples
NumbersFormulaMeanVarianceStandard deviation
2, 4, 4, 4, 5, 5, 7, 9Population (n)542
2, 4, 4, 4, 5, 5, 7, 9Sample (n − 1)54.57142.1381
-2, 0, 2Sample (n − 1)042
5, 5, 5Population (n)500

Frequently asked questions

Should I choose sample or population?

Choose Population when describing every observation in the population of interest. Choose Sample when using sampled observations to estimate population variance. The sample calculation uses n − 1, so it requires at least two numbers.

Can I calculate standard deviation for one number?

Population standard deviation for one observation is zero. Sample standard deviation is undefined because the divisor n − 1 is zero; the calculator shows an explanation instead of a result.

What do repeated values do?

Every entered observation counts, including duplicates. Identical observations have zero variance and zero standard deviation.

Are negative numbers allowed?

Yes. For −2, 0 and 2 the mean is zero, sample variance is 4 and sample standard deviation is 2.

Sources

Last reviewed: October 18, 2026

Related tools