Variance calculator

Paste a list of numbers or a frequency table to get the sample or population variance and standard deviation, with every step of the working.

  • Free, no sign-up
  • Step-by-step working
  • Runs in your browser
  1. 1 Copy and paste your data
  2. 2 Choose an option
  3. 3 Click “Calculate”
  4. 4 Read the result
How to use the Variance calculator: 1. Copy and paste your data (copy the cells in Excel or Google Sheets, then paste them into the box). 2. Choose an option (Sample). 3. Click “Calculate”. 4. Read the result (Sample variance: s² = 4).

Tip: No need to type: copy your numbers from Excel, Google Sheets or a CSV file and paste them straight into the box.

This is example data so you can see how the tool works. Replace it with your own: copy your numbers from Excel or Google Sheets and paste them in, or type them.

Step 1: Paste or type your data

Your data is

Paste a column from Excel or Google Sheets, or separate values with commas, spaces or new lines.

Step 2: Sample or population? (if unsure, keep Sample)

Is your data a sample or a whole population?

Step 3: Your variance

Above the mean Below the mean. Taller bars add more to the variance.

How to use the variance calculator

  1. Copy your numbers from Excel or Google Sheets and paste them in, or type them separated by commas or spaces. If you have a frequency table, choose Values with frequencies and paste the two columns.
  2. Choose Sample (the usual choice) or Population if your data are the whole group.
  3. Click Calculate variance.
  4. Read the variance and standard deviation, and see both the sample and population versions side by side.
  5. The chart shows how much each value adds to the variance; the steps show the deviation table and the shortcut formula.

Variance formulas

Variance is the average squared distance from the mean. For a sample and for a whole population:

s2 = Σ(x − x)2n − 1 , σ2 = Σ(x − μ)2N

The top line, the sum of squared deviations (SS), can also be found with the shortcut formula, which avoids subtracting the mean from every value:

SS = Σx2 − (Σx)2n

s2, σ2
Sample variance and population variance
x, μ
The mean of the sample or of the population
n, N
The number of values in the sample or population
SS
The sum of squared deviations from the mean
n − 1
Degrees of freedom: dividing by it makes the sample variance an unbiased estimate (Bessel's correction)

Worked example

Find the variance of eight quiz scores: 4, 8, 6, 5, 3, 7, 9, 6.

  1. Find the mean
    x = 488 = 6
  2. Subtract the mean from each score and square it
    (−2)² + 2² + 0² + (−1)² + (−3)² + 1² + 3² + 0² = 4 + 4 + 0 + 1 + 9 + 1 + 9 + 0 = 28
  3. Check with the shortcut: Σx² = 316 and Σx = 48
    SS = 316 − 48²8 = 316 − 288 = 28
  4. Divide by n − 1 = 7 for the sample variance (or by 8 for the population)
    s2 = 287 = 4 , σ2 = 288 = 3.5

What it means: the sample variance is 4 points², so the standard deviation is √4 = 2 points: a typical score is about 2 points from the mean of 6. The standard deviation calculator focuses on that final step and how to read it.

How to interpret variance

  • Bigger variance means more spread. A variance of 0 means every value is identical.
  • It's in squared units. Scores in points give a variance in points², so compare variances with each other, and use the standard deviation to describe spread in plain terms.
  • Outliers have a big effect, because deviations are squared: a value 10 away from the mean adds 100, while one 2 away adds only 4. The chart above the results shows which values dominate.
  • Compare carefully. To compare spread between data sets on different scales, use the coefficient of variation (standard deviation ÷ mean).

Frequently asked questions

What is the difference between sample and population variance?

Population variance (σ²) divides the sum of squared deviations by N, the number of values, and is used when your data are the whole group. Sample variance (s²) divides by n − 1 instead, which corrects for the fact that a sample’s values sit a little closer to their own mean than to the population mean. Use sample variance for almost all real data, such as surveys and experiments.

What is the difference between variance and standard deviation?

The standard deviation is the square root of the variance. Variance is in squared units (dollars², cm²), which is hard to picture, so people usually report the standard deviation, which is back in the original units. Variance is still important in the math: variances of independent variables add up, and it’s the basis of ANOVA and regression.

Can variance be negative?

No. It is an average of squared numbers, so it is always zero or positive. It is zero only when every value is the same. If you get a negative variance, it’s almost always a rounding problem with the shortcut formula Σx² − (Σx)²/n; keep more decimal places or use the deviation method.

How do I calculate variance from a frequency table?

Multiply each value by its frequency to find the mean, Σfx / Σf. Then for each value, square its deviation from the mean and multiply by the frequency: f(x − x̄)². Add those up and divide by Σf − 1 for a sample, or Σf for a population. Choose “Values with frequencies” in this calculator to do it automatically.

How do I calculate variance in Excel or Google Sheets?

Use =VAR.S(A2:A20) for the sample variance and =VAR.P(A2:A20) for the population variance. The older names VAR and VARP give the same results. Google Sheets uses the same functions. For the standard deviation, use STDEV.S and STDEV.P.

Why divide by n − 1?

Because you measure deviations from the sample mean, which is calculated from the same data, so the deviations come out slightly too small on average. Dividing by n − 1 instead of n (Bessel’s correction) makes the sample variance an unbiased estimate of the population variance. The n − 1 is also called the degrees of freedom.

Last reviewed November 13, 2026