Variance Calculator

Find sample or population variance from a list of values, with the matching standard deviation, distribution chart, formula, and clear steps.

Enter your values

STATISTICS

Enter your data

Use each value as one observation in your data set.

Separate numbers with commas, spaces, semicolons, or new lines. Decimals and negative values are allowed.

Ctrl + Enter also calculates
Try an example
Your variance result will appear here.Enter your observations and calculate to see variance, standard deviation, and the working.
Overview

What is a variance calculator?

Variance is the average of squared distances from a data set's mean. Population variance describes a complete group and divides by N; sample variance estimates a larger population and commonly divides by n − 1.

Important terms

Population variance
The mean of squared deviations for a complete population, written σ² and calculated with denominator N.
Sample variance
An estimate of population spread from a sample, written s² and calculated with denominator n − 1 under the usual sampling assumptions.
Squared deviation
The square of the difference between an observation and the mean: (xᵢ − mean)².
Standard deviation
The nonnegative square root of variance, expressed in the same units as the original values.

When this method is useful

  • Describe variability in a complete population or a sample.
  • Compare how spread out measurements or scores are around their mean.
  • Check the intermediate squared-unit measure used in statistical models and analysis.
Formula

Formula and variables

σ2=1N∑i=1N(xi−μ)2,s2=1n−1∑i=1n(xi−xˉ)2\sigma^2=\frac{1}{N}\sum_{i=1}^{N}(x_i-\mu)^2,\qquad s^2=\frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})^2
xᵢ
the i-th observation
μ / x̄
the population mean μ or sample mean x̄
N / n
the population size N or sample size n
σ² / s²
population variance or sample variance

Find the mean, subtract it from each observation, square the differences, and add them. Divide by N for a complete population or by n − 1 for a sample variance estimate. Variance uses squared units; taking its square root gives standard deviation in the original units.

Domain note: Enter finite real observations. Population mode permits one value; sample mode requires at least two. Each entered value counts once; frequency weights are not applied.

How it works

How to use this calculator

  1. 1

    Enter numbers separated by commas, spaces, semicolons, or line breaks.

  2. 2

    Choose population if the values are the whole group, or sample if they represent a subset of a larger group.

  3. 3

    Calculate the mean and sum of squared deviations, then divide using the selected denominator.

  4. 4

    Read variance in squared units and use the displayed standard deviation for the original units.

Worked examples

Step-by-step examples

Example 1

Problem: Find the population variance of 2, 4, 6, 8.

Substitution: The mean is (2 + 4 + 6 + 8) / 4 = 5. The squared deviations are 9, 1, 1, and 9, totaling 20.

Result: σ² = 20 / 4 = 5; the standard deviation is √5 ≈ 2.2361.

The population variance is 5 squared units. Its square root, about 2.2361, is the spread measured in the data's original units.

Example 2

Problem: Find sample variance for 3, 5, 7.

Substitution: The mean is 5 and squared deviations total 8. Divide by n − 1 = 2.

Result: s² = 8 / 2 = 4; s = 2.

The sample variance estimates the broader population's variability using the sample correction.

Example 3

Problem: Find population variance for 5, 5, 5, 5.

Substitution: Every observation equals the mean, so all squared deviations are zero.

Result: σ² = 0.

The values show no variation.

Method knowledge

Rules, edge cases, and related ideas

Variance squares distance from the mean

Squaring makes positive and negative deviations contribute positively and gives larger deviations more influence.

Population and sample use different denominators

A complete population uses N. The common sample variance estimator uses n − 1 because the mean is estimated from the same observations.

Variance changes with units

If measurements are converted by multiplying by k, variance is multiplied by k². Standard deviation scales by |k|.

Edge cases and limitations

  • Sample variance is undefined with fewer than two observations.
  • A population containing one value has variance zero.
  • Identical values have zero variance.
  • Nonnumeric tokens and non-finite values are rejected rather than silently skipped.
  • Up to 5,000 observations are accepted per calculation.

How this differs from a related concept

Variance and standard deviation both describe spread around the mean. Variance averages squared deviations and has squared units; standard deviation is the square root of variance and uses the data's original units. Range uses only the minimum and maximum and can miss how the remaining observations are distributed.

Interpretation

Understand the result

A larger variance means observations are more dispersed around the mean, but variance is measured in squared units. For a directly interpretable spread in the original units, use its square root: standard deviation. A variance value alone does not reveal the distribution's shape or whether it is normal.

Common mistakes

  • Using N for a sample variance estimate instead of n − 1.
  • Interpreting variance as if it were in the original units rather than squared units.
  • Confusing variance with standard deviation; one is the square of the other.
  • Assuming variance describes distribution shape or proves normality.
  • Ignoring outliers, which can have a large effect because deviations are squared.

Frequently asked questions

What is the difference between sample and population variance?

Population variance divides by N when all members of the group are included. Sample variance usually divides by n − 1 to estimate the variance of a larger population from a sample.

Why is sample variance divided by n − 1?

The sample mean is estimated from the observations, which tends to make the squared deviations too small. Bessel's correction uses n − 1 and gives an unbiased estimator of population variance under standard independent random-sampling assumptions.

Can variance be negative?

No. Squared deviations are nonnegative, so their average is nonnegative.

Why is variance in squared units?

Each deviation is squared before averaging. Taking the square root produces standard deviation in the original units.

Is variance the same as standard deviation?

No. Standard deviation is the square root of variance. Variance uses squared units; standard deviation uses the data's original units.

References & technical sources

Keep calculating

Related calculators