Variance Calculator: Tame the Spread Free in 2 Steps

Variance Calculator s² & σ²

Find the sample and population variance of any data set, with the standard deviation too.

Separate with commas, spaces or new lines.

Sample variance (s²)
Population variance (σ²)
Sample SD (s)
Population SD (σ)
Mean (x̄)
Count (n)
Show working (LaTeX)

This free variance calculator finds the sample (s²) and population (σ²) variance of any data set, and shows the standard deviation and the working too.

How to use the variance calculator

Paste your numbers into the variance calculator above and press Calculate. It returns both the sample variance and the population variance, plus the mean and standard deviation, with the formula shown step by step. This variance and standard deviation calculator handles decimals and negatives and accepts a pasted spreadsheet column.

variance calculator bell curve showing how far data spreads around the mean
Variance measures how far the values spread from the mean.

What is variance?

Variance is the average of the squared distances between each value and the mean; a larger variance means more spread. See the variance reference for more.

Definition. The variance is the mean squared deviation from the average: $\sigma^2=\frac{1}{N}\sum (x_i-\mu)^2$.

Variance formula

Population variance divides by N; sample variance divides by n−1 (Bessel’s correction):

$$\sigma^2=\frac{\sum (x_i-\mu)^2}{N}\qquad s^2=\frac{\sum (x_i-\bar{x})^2}{n-1}$$

How to calculate variance step by step

  1. Find the mean of the data.
  2. Subtract the mean from each value and square it.
  3. Average the squared deviations (divide by N or n−1).
⚠️ Sample vs populationUse n−1 for a sample and N for a whole population. The sample setting (n−1) is the right default for most real-world data.

Worked example

For 4, 8, 6, 5, 12, 9 the mean is 7.3333; the sample variance is about 8.2667 and the population variance about 6.8889.

Variance vs standard deviation

The standard deviation is the square root of the variance, expressed in the original units. Variance is in squared units, which is why we often report the standard deviation instead.

Why variance matters in machine learning

In machine learning for beginners, variance drives feature scaling, PCA (which keeps the directions of highest variance) and the bias–variance tradeoff. It also underpins the z-score.

🤖 ML insight

PCA keeps the directions of maximum variance and discards low-variance directions to reduce dimensionality while losing as little information as possible.

Frequently asked questions

Does this variance calculator give sample or population variance?
Both — sample (divide by n−1) and population (divide by N) at once.
What is the difference between variance and standard deviation?
Standard deviation is the square root of the variance, in the original units.
Why divide by n−1 for a sample?
Bessel’s correction removes the bias that makes a sample understate the true spread.
Can variance be negative?
No. Because it sums squared values, variance is always zero or positive.
Is the variance calculator free?
Yes, completely free and browser-based.

When to use variance

Variance shines whenever you need one number for how spread out data is, and it adds up nicely: for independent variables, the variance of a sum equals the sum of the variances. That property makes it the natural measure behind risk in finance and noise in measurements.

Two cautions. Because deviations are squared, it is heavily influenced by outliers — one extreme value can dominate it. And its units are squared (dollars squared, centimetres squared), which is why people usually quote the square root instead. For a quick, intuitive read of spread, report the standard deviation alongside it.

Variance calculator: summary

This variance calculator gives the sample and population variance with the working shown. Pair it with the standard deviation calculator and the mean calculator.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top