Variance Calculator — Step-by-Step Solutions
The Variance Calculator computes the spread of a dataset by measuring how far each value lies from the mean. It supports population variance (dividing by N), sample variance with Bessel's correction (dividing by n-1), variance from a frequency table, and grouped data variance using class midpoints.
Enter your data values to see the variance, standard deviation, mean, and sum of squares with detailed step-by-step working. The calculator complements the Standard Deviation Calculator by focusing on variance-specific features and input formats.
Your calculations will appear here
How to Use the Variance Calculator
- Select a calculation mode: Population Variance, Sample Variance, From Frequency Table, or Grouped Data Variance.
- For Population and Sample Variance, enter your data values separated by commas (e.g. 4, 8, 6, 5, 3, 7). Population variance divides by N; sample variance divides by n-1.
- For Frequency Table, enter the values and their corresponding frequencies in separate fields. Choose whether to treat the data as a population or sample.
- For Grouped Data, enter the lower bounds, upper bounds, and frequencies for each class interval. The calculator uses class midpoints to estimate the variance.
- Results include variance, standard deviation, mean, and a full step-by-step breakdown of the calculation.
Formula and Theory
Variance measures the average squared deviation of each data point from the mean. It quantifies how spread out the values in a dataset are. A variance of zero means all values are identical; larger variance indicates greater dispersion.
Population variance uses the formula sigma squared = sum of (xi - mu) squared divided by N, where mu is the population mean and N is the total number of values. This is used when you have data for the entire population.
Sample variance uses Bessel's correction, dividing by n-1 instead of n: s squared = sum of (xi - x bar) squared divided by (n-1). This corrects the downward bias that occurs when estimating population variance from a sample. The denominator n-1 represents the degrees of freedom.
For grouped data, variance is estimated using class midpoints as representative values. Each midpoint is weighted by its frequency. This approach is common when data is presented in frequency distributions or histograms rather than as individual observations.
Worked Examples
Example 1: Population variance of a small dataset
Problem: Find the population variance of {2, 4, 4, 4, 5, 5, 7, 9}.
Solution: Mean = 40/8 = 5. Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16. Sum = 32. Variance = 32/8 = 4.
Answer: Variance = 4, SD = 2
Example 2: Sample variance
Problem: Find the sample variance of {3, 7, 7, 19}.
Solution: Mean = 36/4 = 9. Squared deviations: 36, 4, 4, 100. Sum = 144. Sample variance = 144/3 = 48.
Answer: Variance = 48, SD = 6.93
Example 3: Variance from a frequency table
Problem: Values: 1, 2, 3, 4, 5 with frequencies: 3, 5, 8, 4, 2. Find the population variance.
Solution: Weighted mean = (3+10+24+16+10)/22 = 63/22 = 2.864. Weighted SS = 3(1-2.864) squared + 5(2-2.864) squared + ... = 28.409. Variance = 28.409/22 = 1.291.
Answer: Variance = 1.291
Example 4: Grouped data variance
Problem: Classes: 0-10, 10-20, 20-30 with frequencies: 5, 12, 3. Find the population variance.
Solution: Midpoints: 5, 15, 25. Weighted mean = (25+180+75)/20 = 14. SS = 5(5-14) squared + 12(15-14) squared + 3(25-14) squared = 405+12+363 = 780. Variance = 780/20 = 39.
Answer: Variance = 39
Frequently Asked Questions
What is the difference between variance and standard deviation?
When should I use population vs sample variance?
Why does sample variance divide by n-1 instead of n?
Can variance be negative?
How does this differ from the Standard Deviation Calculator?
Related Statistics Calculators
Probability Calculator
Calculate probability of events, complements, unions, and intersections. Free online probability calculator for statistics.
Standard Deviation Calculator
Calculate standard deviation, variance, mean, and more for any dataset. Supports population and sample statistics. Free online tool.
Z-Score Calculator
Calculate z-scores, find values from z-scores, and determine probabilities. Free online z-score calculator with bell curve visualisation.
Binomial Calculator
Calculate binomial probabilities, cumulative distributions, and expected values. Free online binomial distribution calculator with bar chart.
Normal Distribution Calculator
Calculate probabilities for normal distributions. Find areas under the bell curve, percentiles, and inverse values. Free online tool.
Correlation Calculator
Calculate Pearson correlation coefficient, R-squared, and regression line. Free online correlation calculator with scatter plot.