Home » Statistics & Probability Calculators » Variance and Standard Deviation Calculator

Variance and Standard Deviation Calculator

Home › Statistics & Probability Calculators › Variance and Standard Deviation Calculator

Variance and Standard Deviation Calculator

This calculator finds the variance and standard deviation of a data set and lets you choose between the sample formula, which divides the sum of squared deviations by n − 1, and the population formula, which divides by n. The output shows every deviation from the mean, its square, the sum of squares and the final square root, which is exactly the working a statistics course asks for.

Use the sample version when your numbers are a sample drawn from a larger group and you want to estimate the spread of that group; dividing by n − 1 (Bessel’s correction) removes the downward bias. Use the population version when the numbers are the entire group of interest, for example the marks of every student in one class.

The standard deviation is in the same units as the data, which is why it is quoted more often than the variance. Roughly two thirds of values in a bell-shaped data set fall within one standard deviation of the mean, and about 95% within two. To compare spread between data sets with different means, see the coefficient of variation.

Separate values with commas, spaces or new lines.

Result and step-by-step solution

Sample variance (s²)4.125
Sample standard deviation (s)2.031
Mean5.875
Count (n)8
Sum of squared deviations28.875
  1. Find the mean
    x̄ = Σx ÷ n = 47 ÷ 8 = 5.875
  2. Square each deviation from the mean
    xx − x̄(x − x̄)²
    4−1.8753.5156
    82.1254.5156
    60.1250.0156
    5−0.8750.7656
    3−2.8758.2656
    71.1251.2656
    93.1259.7656
    5−0.8750.7656
  3. Sum the squared deviations
    Σ(x − x̄)² = 28.875
  4. Divide by n − 1 = 7
    s² = 28.875 ÷ 7 = 4.125
  5. Take the square root
    s = √4.125 = 2.031

For comparison, the population variance would be 3.6094 (SD 1.8998).

Frequently asked questions

Should I divide by n or n − 1?
Divide by n − 1 when the data is a sample and you want to estimate the variance of the population it came from. Divide by n when the data is the whole population. Most textbook and exam questions that say “a sample of” want n − 1.
What is the formula for standard deviation?
s = √[Σ(x − x̄)² ÷ (n − 1)] for a sample, and σ = √[Σ(x − μ)² ÷ n] for a population. Find the mean, subtract it from every value, square each result, add them up, divide, then take the square root.
Why is the variance in squared units?
Because each deviation is squared before averaging. Taking the square root gives the standard deviation, which is back in the original units and easier to interpret.
Does this match Excel's STDEV.S and STDEV.P?
Yes. The sample setting matches STDEV.S and VAR.S; the population setting matches STDEV.P and VAR.P.

Last reviewed: September 25, 2026. Calculations run in your browser and were validated against SciPy.

Scroll to Top