Variance Calculator

Calculate the variance of a data set. Supports both population and sample variance and shows the spread around the mean.

Comma or space separated (minimum 2 values)
Sample Variance (s²)
4.571429
Divides Σ(x−x̄)² by n−1 = 7
Population Variance (σ²)
4.000000
Divides Σ(x−x̄)² by N = 8
Sample Std Dev (s)
2.138090
√(sample variance) — spread measure
Population Std Dev (σ)
2.000000
√(population variance)
Mean (x̄)
5.000000
Sum = 40.00, n = 8
Median
4.500000
Middle value of sorted data
Coeff. of Variation
42.76%
Relative variability (std dev / mean × 100)
Standard Error
0.755929
s / √n — precision of the mean
95% CI for Mean
[3.5184, 6.4816]
Confidence interval using z-approximation
Range
7.000000
Min: 2.0000, Max: 9.0000
IQR
3.000000
Q1: 4.0000, Q3: 7.0000
Sum of Sq. Deviations
32.000000
Σ(x − x̄)²
Deviation from Mean
2.00
-3.000
4.00
-1.000
4.00
-1.000
4.00
-1.000
5.00
+0.000
5.00
+0.000
7.00
+2.000
9.00
+4.000
Deviation Table (8 values)
#Value (x)x − x̄(x − x̄)²
12.0000-3.00009.0000
24.0000-1.00001.0000
34.0000-1.00001.0000
44.0000-1.00001.0000
55.0000+0.00000.0000
65.0000+0.00000.0000
77.0000+2.00004.0000
89.0000+4.000016.0000
Σ40.0000032.0000
Frequency Distribution
ValueCountRelative %Bar
2.0000112.5%
4.0000337.5%
5.0000225.0%
7.0000112.5%
9.0000112.5%
Five-Number Summary & Box Plot Reference
StatisticValue
Minimum2.0000
Q1 (25th percentile)4.0000
Median (Q2)4.5000
Q3 (75th percentile)7.0000
Maximum9.0000
IQR (Q3 − Q1)3.0000
Lower Fence (Q1 − 1.5·IQR)-0.5000
Upper Fence (Q3 + 1.5·IQR)11.5000
Planning notes, formulas, and examples

About the Variance Calculator

The Variance Calculator computes both the population variance (σ²) and sample variance (s²) for any data set. Variance measures the average of the squared deviations from the mean.

Variance is a fundamental concept in statistics. It quantifies how far a set of numbers is spread out from their average value. A variance of zero means all values are identical; a large variance means they are widely scattered.

While variance is harder to interpret intuitively because it uses squared units, it is mathematically convenient and forms the basis for standard deviation, ANOVA, regression analysis, and many other statistical methods.

When This Page Helps

Variance is the foundation for many statistical tests. This calculator computes both population and sample variance and shows all intermediate steps.

How to Use the Inputs

  1. Enter numbers separated by commas.
  2. View both population and sample variance.
  3. See the standard deviation (square root of variance).
  4. Review the mean and sum of squared deviations.
  5. Use the results in further analysis like ANOVA or regression.
Formula used
σ² = Σ(xᵢ − μ)² / N (population) s² = Σ(xᵢ − x̄)² / (n−1) (sample)

Example Calculation

Result: s² = 4.571

Mean = 5. Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16. Sum = 32. Sample variance = 32/7 ≈ 4.571.

Tips & Best Practices

  • Population variance divides by N; sample variance divides by n−1.
  • Variance is always non-negative (zero means no variation).
  • Variance has squared units, making it harder to interpret than std dev.
  • Adding a constant to all values does not change the variance.
  • Multiplying all values by k multiplies the variance by k².
  • Variance is additive for independent random variables.

Variance in Portfolio Theory

Harry Markowitz's Modern Portfolio Theory uses variance as the measure of risk. The goal is to find portfolios that minimize variance for a given expected return.

ANOVA and Variance

Analysis of Variance (ANOVA) compares group means by partitioning total variance into within-group and between-group components, allowing statistical testing of mean differences.

Degrees of Freedom

Sample variance divides by n−1 (not n) because the sample mean constrains one degree of freedom. This Bessel's correction provides an unbiased estimate of population variance.

Variance also appears in quality control, forecasting, and experimental work where you need to compare how tightly different samples cluster around their mean.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • Variance is the average of squared deviations from the mean. It measures how spread out data values are around the center.