Smekys
Ad Space

Variance Calculator

Free variance calculator: compute population and sample variance, mean, and standard deviation from any comma-separated data set.

Enter Values

Step 1: how many observations you have (1 to 8). Step 2: fill only that many boxes; boxes below your count are ignored.

value

First observation in your data set.

value

Second observation in your data set.

value

Third observation in your data set.

value

Fourth observation in your data set.

value

Fifth observation in your data set.

value

Sixth observation in your data set.

value

Seventh observation in your data set.

value

Eighth observation in your data set.

Population describes the whole group. Sample estimates a larger population (Bessel correction, divide by N-1).

Result

Mean (x̄, same units as your data)
18
Number of Data Points (N)
8
Population Variance (σ², squared units)
24
Sample Variance (s², squared units)
27.43
Variance (your ddof choice)
24
Population Std Dev (σ, same units)
4.9
Sample Std Dev (s, same units)
5.24

Variance tells you how spread out your data is around its average. A variance near zero means every value is nearly identical; a large variance means the points swing wildly above and below the mean. This calculator computes both the population variance (σ²) — when your data covers the entire group you care about — and the sample variance (s²) — when your data is only a small sample drawn from a bigger population. It also returns the mean, the count, the minimum–maximum range, and both standard deviations (the square roots of the variances), so you never have to convert by hand.

Type up to 8 numbers, one per box, and the result updates instantly. Negatives and decimals are welcome.

How to Use

  1. Set the Number of Data Points (1 to 8), then type each observation into the numbered boxes — for example 10, 12, 23, 23, 16, 23, 21, 16. Any boxes beyond your point count are ignored.
  2. Choose the Variance Type. Leave it at Population for the whole group (e.g., all 8 test scores in one classroom). Switch to Sample when your list is a sample of a larger population (e.g., surveyed customers out of 50,000).
  3. Read the result card. Population Variance (σ²) divides the sum of squared deviations by N; Sample Variance (s²) divides by N − 1 (Bessel's correction), which removes the natural bias of estimating spread from a sample.
  4. Use Population Std Dev (σ) and Sample Std Dev (s) when you want spread expressed in the same units as your original data — dollars, points, percent — rather than squared units.
  5. Compare the two variances side by side. With small samples the gap between σ² and s² is large; with hundreds of points it nearly vanishes. That gap is your cue that Bessel's correction matters.

The Variance Formula

Population and sample variance start from the same building blocks: the mean μ and the squared distance of every point from that mean.

σ² = Σ(xᵢ − μ)² / N (population)

s² = Σ(xᵢ − x̄)² / (n − 1) (sample)

Where:

  • μ (or x̄) is the arithmetic mean of the data.
  • xᵢ is each individual data point.
  • N (or n) is the number of data points.
  • Σ means "sum over all points."

Worked example on the classic textbook data set 10, 12, 23, 23, 16, 23, 21, 16: the mean is 144 / 8 = 18.0. The squared deviations from 18 are 64, 36, 25, 25, 4, 25, 9, 4, which sum to 192. Population variance is 192 / 8 = 24.0, and population standard deviation is √24 ≈ 4.899. Sample variance is 192 / 7 ≈ 27.43, and sample standard deviation is √27.43 ≈ 5.237.

Notice that squaring the deviations makes variance penalize extreme outliers disproportionately: one value far from the mean dominates the result. That is exactly why standard deviation — the square root — is usually the more interpretable number in reports, while variance remains the preferred input for ANOVA, regression, and portfolio math.

Population vs Sample: Which Should You Pick?

The choice hinges on what your list represents:

  • Population (ddof = 0) — you have measured every member of the group. Examples: the ages of all 12 employees in a small startup, the final exam scores of one specific class, or today's closing prices for exactly the 30 Dow Jones stocks. Dividing by N is exact.
  • Sample (ddof = 1) — you only have a subset. Examples: the heights of 50 randomly sampled adults when the whole adult population is millions, or 3 months of sales used to estimate a whole year's volatility. Dividing by n − 1 corrects the fact that the sample mean sits a little too close to the observed points, which otherwise would make your spread underestimate the true spread.

When in doubt and your data comes from a survey, experiment, or sensor — use sample variance. It is the conservative choice and the default in Excel (VAR.S), Sheets (VAR.S), and numpy when ddof=1.

Examples

Example 1 — Test scores in a classroom. Eight students scored 10, 12, 23, 23, 16, 23, 21, 16 out of 25 points. Treating the class as the whole population (ddof = 0), the variance is 24.0 points² and the standard deviation is 4.90 points. In percentage terms that is a spread of roughly 20% around the mean — wide enough that the teacher should differentiate instruction.

Example 2 — Monthly sales dollars. A small shop's weekly revenue over seven weeks is $4,200, $5,100, $3,800, $6,200, $4,900, $5,500, $4,700. The mean is about $4,914, population variance is 546,939 dollars², and population standard deviation is $739 — so weekly revenue typically swings by about $740 either side of average. If those seven weeks are a sample of the whole year, switch ddof to 1 and the sample variance rises to about 638,095, sample sd $799.

Example 3 — Data with negatives. Product temperature deviations measured as −5, 0, 5, 10, −3, 8 degrees. The mean is 2.5, population variance ≈ 30.92, population standard deviation ≈ 5.56°. Negative inputs never produce a negative variance, because every deviation is squared — a common worry this calculator handles automatically.

Example 4 — All identical values. Entering 5, 5, 5, 5 correctly returns variance 0.0 and standard deviation 0.0, not an error or NaN. Zero variance is a valid, meaningful result: every observation equals the mean.

FAQ

How do I calculate variance step by step?

First find the mean of the data. Then subtract the mean from every number and square each result. Sum all those squared values. Finally, divide by the number of data points N for population variance, or by N − 1 for sample variance. The square root of the result is the standard deviation.

What is the difference between population variance and sample variance?

Population variance divides the sum of squared deviations by N and is used when your data covers the entire group. Sample variance divides by N − 1 (Bessel's correction) and is used when your data is a sample, because it corrects the bias that a sample mean sits artificially close to the observed points. Sample variance is always slightly larger than population variance on the same data.

Why is variance squared and can it be negative?

Variance squares each deviation so that values below the mean do not cancel values above it and so that larger deviations dominate. Squaring also means variance can never be negative — the smallest possible value is zero, achieved only when every data point is identical. To get back to the original units, take the square root (standard deviation).

When should I use variance instead of standard deviation?

Use variance inside formulas — ANOVA, regression coefficients, portfolio risk, and statistical tests all combine squared deviations. Use standard deviation in communication, because it is expressed in the same units as the data (dollars, points, percent) and is easy to interpret on a chart. This calculator gives you both at once.

How do I handle negative numbers and decimals in my data?

Just type them in. This calculator accepts negatives and decimals in any box. Because every deviation is squared, negative values raise the variance exactly as positive values of the same size do — sign does not matter.

What does a variance of zero mean?

A variance of zero means every number in your data set is exactly equal. There is no spread at all. This is normal for engineered or rounded data (e.g., a sensor that always returns the same reading), and the calculator returns it cleanly rather than showing NaN.

How many data points do I need?

At least two. With one point the mean is defined but the spread is not mathematically meaningful, and sample variance (which divides by n − 1) would divide by zero. Enter two or more numbers; for sample variance you really want at least 10–30 observations before the estimate becomes stable.

Related Calculators

Disclaimer

This variance calculator is provided for informational purposes only and does not constitute statistical, financial, or scientific advice. Results are computed directly from the data you enter using the standard formulas σ² = Σ(xᵢ − μ)² / N and s² = Σ(xᵢ − x̄)² / (n − 1). Always double-check critical analyses against authoritative statistics software and consider whether your data represents a population or a sample before applying the result to a real-world decision. For our editorial standards see the About page, and for data handling see the Privacy Policy; we do not store the data points you enter on this page.

Related Calculators

Disclaimer

Results are estimates for illustration only. Verify important figures independently.