Variance Calculator
Calculate the variance of a dataset.
Runs locally in your browser
Your inputs are processed locally in your browser and are not uploaded or stored by us.
Calculate the variance of a dataset. Variance represents the average squared deviation from the mean.
How to calculate variance
- Enter numeric values into the dataset list.
- Select whether your data is an entire "Population" or just a "Sample".
- Click "Calculate" to find the variance.
Variance Formulas
Population σ² = Σ(xᵢ − μ)² / N
Sample s² = Σ(xᵢ − x̄)² / (N − 1)
Population variance divides by N, used when the data represents the complete population. Sample variance divides by N − 1 to provide an unbiased estimator for a larger population. The calculator uses a numerically stable one-pass variance algorithm to accumulate the squared deviations, reducing precision loss. Note that variance is expressed in squared units (e.g., if measurements are in meters, variance is in square meters).
Calculating population variance
Dataset2, 4, 4, 4, 5, 5, 7, 9
TypePopulation
Mean = 5
Squared deviations from 5: 9, 1, 1, 1, 0, 0, 4, 16
Sum of squared deviations = 32
Population variance = 32 / 8
Result: 4
Notes
- Population calculations require >= 1 value; sample calculations require >= 2 values.
- For a constant list (e.g., 5, 5, 5), the variance is exactly 0.
- A tiny negative internal result caused only by floating-point noise near zero may be normalized to zero.
- These statistics use JavaScript floating-point numbers, so some decimal results may be approximate.
- Your calculator inputs are processed locally in your browser and are not uploaded or stored by us.