Standard Deviation and Variance Calculator

Paste your numbers and choose sample or population to get the standard deviation, variance and mean.

Standard Deviation Calculator

Separate with spaces, commas or new lines. At least two numbers.

Tip: press Ctrl+Enter (Cmd+Enter on Mac) inside a text box to run.

Your result will appear hereFill in the fields and press “Calculate”.

Formula

  • mean x̄ = Σx ÷ n
  • population: σ = √(Σ(x − x̄)² ÷ n)
  • sample: s = √(Σ(x − x̄)² ÷ (n − 1))
  • Variance is the standard deviation squared
  • n is the number of values

The standard deviation is the typical distance of a value from the mean.

Worked example

Seven values, as a sample

Numbers
4 8 6 5 3 7 9
Treat the numbers as
A sample (divide by n − 1)

Sample standard deviation (s)

2.1602469

Sample variance (s²): 4.66666667

Population standard deviation (σ): 2

Mean: 6

How it works

Standard deviation measures how spread out numbers are around their mean. Find the mean, square each value's distance from it, add the squares, divide, and take the square root. A small standard deviation means the values cluster near the mean; a large one means they are scattered.

The only choice is the divisor. If your numbers are the entire group you care about, divide by n (population). If they are a sample drawn from a larger group — the usual case — divide by n − 1, which corrects the tendency of a sample to understate the spread (Bessel's correction). For the data 4, 8, 6, 5, 3, 7, 9 the mean is 6 and the sample standard deviation is about 2.16. For up to 20 values the table shows each deviation so you can follow along.

The standard error shown is s ÷ √n, which estimates how far the sample mean may be from the true mean. For plain averages, the median and the mode use the Average Calculator; for weighted data try the Weighted Average Calculator, and to see probabilities for repeated trials try the Probability Calculator.

Assumptions and limits

  • Results use the usual two-pass formula for numerical stability.
  • Up to 5,000 values; plain numbers only, without thousands separators.