Variance Calculator
Compute sample and population variance, standard deviation, and squared deviations for any dataset or grouped frequency distribution.
๐ What is Variance?
Variance is a statistical measure of the spread or dispersion of a dataset around its mean. It quantifies how far the individual values in a dataset are from the average. A variance of zero means all values are identical. Larger variance indicates greater variability. Variance is calculated by finding the mean of all squared deviations from the mean, which ensures that positive and negative deviations do not cancel each other out. The square root of variance gives the standard deviation, which is expressed in the same units as the original data and is more commonly reported in practice.
Variance appears throughout applied statistics and data science. In finance, portfolio variance measures how much investment returns fluctuate, and the variance of a diversified portfolio depends on the covariances between individual assets. In quality control, variance (or standard deviation) defines process capability: a tightly controlled manufacturing process has low variance in its output measurements. In A/B testing, the variance of the metric being tested determines the required sample size and the power of the statistical test. In machine learning, the bias-variance tradeoff describes how model complexity affects the balance between underfitting and overfitting.
There are two distinct types of variance: population variance and sample variance. Population variance (sigma squared) divides the sum of squared deviations by n, the total number of values, and is appropriate when your data represents the entire population. Sample variance (s squared) divides by n-1 and is appropriate when your data is a sample drawn from a larger population, which is the typical situation in research and data analysis. The n-1 denominator, known as Bessel's correction, corrects for the tendency of samples to underestimate population spread, making sample variance an unbiased estimator of population variance.
This calculator accepts raw data (a list of individual numbers) in Dataset mode, or summarized data in Grouped Frequency mode where you enter class midpoints and their corresponding frequencies. Both modes produce sample variance, population variance, standard deviations, and a complete deviation table showing the contribution of each value to the total sum of squared deviations. The deviation table is particularly useful for manually verifying calculations or for understanding how each data point influences the overall spread.
๐ Formula
Population variance uses n in the denominator instead of n-1:
For grouped frequency data: