Skip to content
Zesona
Variance CalculatorLocal

Variance Calculator

Compute variance exactly, always reporting both the sample (n-1) and population (n) definitions because they are different numbers.

  • Free
  • No sign-up
  • Runs in your browser

Input

Runs in your browser

0 characters

Separate with commas, spaces or new lines. A column pasted from a spreadsheet works. Processed in your browser.

The usual case; matches Excel VAR.S

How many digits to show when the answer is irrational. An exact answer ignores this.

Fill in Values to continue.

Enter your input to see the result

Everything happens on this device. No upload, no account, no network request.

How to use this tool

  1. 1

    Paste your values and say whether they are a sample or the whole population.

  2. 2

    Both definitions are reported regardless, because quoting a variance without saying which was used is not a checkable claim.

Questions about Variance Calculator

Sample or population - which do I want?

A sample, almost always. Use the n - 1 version when your data is a sample from a larger group you want to say something about, which is the usual situation; it is what Excel’s VAR.S and NumPy with ddof=1 give. Use the n version only when the data is the entire group you care about - the marks of every student in a class you are describing and not generalising from.

Why does dividing by n - 1 correct a bias?

Because the deviations are measured from the sample mean, which is itself pulled toward the data, so they come out slightly too small. Dividing by n - 1 instead of n compensates exactly, in the sense that the result’s long-run average equals the true population variance. The correction matters most on small samples: with 8 values it is a 14% difference.

Why is this exact when a spreadsheet’s is not?

Because the arithmetic runs on exact fractions. There is also a structural difference: the textbook shortcut E[x^2] - E[x]^2 is algebraically equivalent but numerically disastrous, and in floating point it can return a negative variance for data with a large mean and small spread. The deviations are accumulated directly here.

Is my data sent anywhere?

No. This runs as JavaScript in your browser tab: there is no network request carrying your numbers, nothing reaches a server log, and it keeps working with your connection off. You can confirm it in the browser’s network panel.

Does the Variance Calculator work offline?

Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Variance Calculator keeps working with the network switched off and nothing is ever sent to a server.

Other tools you might reach for next.