Variance Calculator

Enter your numbers, select sample or population, and calculate the variance, sum of squares, mean, and view the complete step-by-step table.

  • Runs on your device
  • Keyboard-first
  • Free, no sign-up

Separate values with commas, spaces, or line breaks (e.g., 2, 4, 4, 4, 5, 5, 7, 9)

Calculation type

Variance

—

Standard deviation
—
Mean (average)
—
Observations (n)
—
Sum of squares (SS)
—
Degrees of freedom (df)
—
Sum of values (Σx)
—

Calculated on your device. Nothing you type is sent anywhere.

Cite
APA: Mr. Behairy. (2026). Variance Calculator. Anubis Calc. https://calculatoranubis.com/en/variance-calculator
MLA: Mr. Behairy. "Variance Calculator." Anubis Calc, 2026, https://calculatoranubis.com/en/variance-calculator.
Embed

Copy this snippet to embed this calculator on your site or blog for free:

<iframe src="https://calculatoranubis.com/en/embed/variance-calculator" width="100%" height="520" style="border:0;border-radius:18px" loading="lazy" title="Variance Calculator"></iframe>
<p><a href="https://calculatoranubis.com/en/variance-calculator" rel="noopener">Variance Calculator — Anubis Calc</a></p>

How it works

Variance is a foundational statistical measurement that quantifies the degree of dispersion or spread in a data set relative to its mean. In statistical analysis, probability modeling, financial risk management, and scientific research, calculating variance represents the vital step of determining how widely individual observations vary from the expected central value.

Sample Variance s² = Σ(x − x̄)² ÷ (n − 1) Population Variance σ² = Σ(x − μ)² ÷ N  ·  Standard Deviation = √Variance

Worked example. Consider the data set: 2, 4, 4, 4, 5, 5, 7, 9. The total sum of the values is 40 and the count is n = 8, producing an arithmetic mean of 5. Calculating each observation’s deviation from 5 and squaring it gives: 9, 1, 1, 1, 0, 0, 4, 16. The sum of squared deviations (Sum of Squares, SS) equals 32. When treated as a sample (using n − 1 = 7 degrees of freedom), the sample variance is 32 ÷ 7 = 4.5714 (with a sample standard deviation of 2.1381). When treated as an entire population (dividing by N = 8), the population variance is 32 ÷ 8 = 4.0000 (with a population standard deviation of 2.0000).

Step-by-step instructions: how to calculate variance by hand

  1. Compute the mean (average): add all values together and divide by the total number of observations (n).
  2. Find individual deviations: subtract the calculated mean from each individual data point (x − x̄). The algebraic sum of all deviations always equals zero.
  3. Square each deviation: multiply each deviation by itself (x − x̄)². Squaring ensures that negative deviations do not cancel out positive deviations.
  4. Sum the squared deviations: add all squared values together to obtain the Sum of Squares (SS = Σ(x − x̄)²).
  5. Divide by degrees of freedom: divide the sum of squares by (n − 1) if analyzing a sample, or by N if you possess data for the entire population. The resulting quotient is the variance.

Sample variance vs population variance: Bessel’s correction

Understanding when to use sample variance versus population variance is essential for unbiased statistical inference:

  • Population Variance (σ²): applied when your data encompasses every single member of the target group under study (such as all students in a specific classroom, or all manufactured components in a test batch). Here, divide by N.
  • Sample Variance (s²): applied when working with a subset or sample selected from a wider population (such as 100 randomly surveyed voters representing a national electorate). Dividing by n − 1 (known as Bessel’s correction) mathematically corrects for the sample's inherent tendency to underestimate true population dispersion.

Variance vs standard deviation: key distinctions

While variance and standard deviation both express dispersion, they serve complementary purposes. Variance is measured in squared units (e.g., dollars squared, centimeters squared), making it mathematically advantageous for regression analysis and analysis of variance (ANOVA). Standard deviation is the square root of variance, returning the measurement to the original data's linear units for intuitive practical interpretation.

To examine standard deviation in detail, visit our standard deviation calculator. To find central tendencies including median and mode, use the average calculator, and to standardize individual scores against the distribution, open the z-score calculator.

Sources & assumptions

Real numbers only; sample calculation divides by n − 1, population divides by n; interactive working table displays up to 200 values.

Reviewed by: Mr. Behairy (Accountant, Financial Auditor & Tax Specialist) · Editorial policy · Formulas reviewed:

Frequently asked questions

What is variance in statistics?

Variance is the average of squared differences from the mean, representing the degree to which individual numbers in a dataset differ from their arithmetic average.

What is the formula for sample variance?

The formula is s² = Σ(x − x̄)² ÷ (n − 1), where x is each data value, x̄ is the sample mean, and n is the sample size.

Why do we divide by n − 1 instead of n for a sample?

Sample data tends to be closer to the sample mean than to the true population mean. Dividing by n − 1 (Bessel’s correction) corrects this bias to provide an accurate estimate of population variance.

Can variance be negative?

No. Because each deviation is squared before summing, variance is always zero or positive. It equals zero only when every value in the dataset is identical.

What is the difference between variance and standard deviation?

Variance measures dispersion in squared units, while standard deviation is the square root of variance, returning the metric back to the original units of the data.

How do you calculate variance in Excel or Google Sheets?

Use =VAR.S(range) for sample variance, or =VAR.P(range) for population variance. This calculator provides identical results along with step-by-step working.

How do I enter my numbers into the calculator?

You can separate numbers with commas, spaces, or line breaks. You can also copy and paste an entire column directly from Excel or Google Sheets.