standarddeviationcalculator.net

Variance calculator

Enter your data to get the variance, along with the standard deviation, the mean and the rest of the summary. The working is shown in full, so you can check it against your own arithmetic.

Separate values with commas, spaces, tabs or new lines — paste a column straight from a spreadsheet and it will parse. Decimals and negatives are fine.

Treat the data as
Variance — sample 9.26786
Count (n)8
Mean (x̄)15.875
Standard deviation3.04432
Variance9.26786
Sum127
Σ(x − x̄)²64.875
Standard error1.07633
Coefficient of variation0.191768
Relative SD (%RSD)19.1768%
Minimum12
Maximum21
Range9
Median (Q2)15.5
Q113.75
Q317.5
IQR3.75
x̄ = 15.88 −1σ +1σ 6.742 25.01

The shaded bands are one, two and three standard deviations either side of the mean. 5 of 8 values — 63% — fall inside the innermost band.

Show the working, step by step

What variance measures

Variance is the average of the squared distances between each value and the mean. It answers the same question as the standard deviation — how spread out is this data? — but stops one step earlier, before the square root that would return the answer to the original units.

Sample: s² = Σ(x − x̄)² / (n − 1) Population: σ² = Σ(x − μ)² / N

Because it is built from squares, variance is always zero or positive, and it grows with the square of the scale of the data: double every value and the variance quadruples, while the standard deviation merely doubles.

Variance or standard deviation — which should you report?

For describing data to a reader, use the standard deviation. Its units match the data, so it can be compared directly against the mean and against individual values.

For doing further mathematics with the spread, use the variance. Its defining advantage is that variances of independent quantities add:

Var(X + Y) = Var(X) + Var(Y) (for independent X and Y)

No such rule holds for standard deviations. This additivity is what makes analysis of variance, portfolio risk decomposition and the whole machinery of linear models work, and it is the reason variance survives despite being harder to interpret.

A worked example

Data: 4, 8, 6, 5, 3. Sum = 26, n = 5, mean = 5.2.

xx − x̄(x − x̄)²
4−1.21.44
82.87.84
60.80.64
5−0.20.04
3−2.24.84
Σ014.8

Note that the middle column sums to exactly zero — that always happens, and it is precisely why the deviations must be squared before averaging. Dividing 14.8 by n − 1 = 4 gives a sample variance of 3.7; dividing by N = 5 gives a population variance of 2.96. The corresponding standard deviations are 1.9235 and 1.7205.

Variance in Excel and Google Sheets

You wantExcel / Sheets
Sample variance=VAR.S(A1:A20)
Population variance=VAR.P(A1:A20)
Sample standard deviation=STDEV.S(A1:A20)
Population standard deviation=STDEV.P(A1:A20)

The older VAR() and STDEV() functions still work and are the sample versions. VARA() and STDEVA() differ in that they count text as 0 and booleans as 0 or 1, which is rarely what you want. The full Excel guide is here.

Related calculators

Common questions

What is the difference between variance and standard deviation?

The standard deviation is the square root of the variance. They contain identical information; they differ only in units. If your data is in kilograms, the variance is in kilograms squared and the standard deviation is in kilograms.

That is why reports quote standard deviations: "the mean weight was 70 kg, SD 4 kg" is readable, whereas "variance 16 kg²" is not.

Why use variance at all if standard deviation is easier to read?

Because variances add and standard deviations do not. For two independent quantities, Var(X + Y) = Var(X) + Var(Y) — but the standard deviation of the sum is not the sum of the standard deviations. Every technique that decomposes variation into parts, including ANOVA and portfolio risk models, relies on that additivity.

Can variance be negative?

No. It is an average of squared quantities, so it cannot go below zero. A variance of exactly 0 means every value in the dataset is identical.

If software hands you a small negative variance, it is a floating-point artefact of the "shortcut" computational formula, not a real result. This calculator avoids that failure mode.

Sample or population variance?

Divide by n − 1 for a sample, by N for a population. Use sample unless your numbers are genuinely the whole group you care about. Full comparison here.

Written and reviewed by our editorial team. Last updated . Method and sources: how these numbers are computed.