Variance Calculator with Frequency

This variance calculator with frequency finds the mean, variance and standard deviation of a frequency table, showing the weighted working row by row.

For grouped data, use the class midpoints.

Whole numbers, one for each value, in the same order.

Checks on your data

  • The total frequency is 15.
  • Every value has at least one observation.
  • For grouped data, enter class midpoints. The variance is then an estimate. Open the histogram calculator →

Results

Sample variance (s²)
5.638095
divides by N − 1
Population variance (σ²)
5.262222
divides by N
Sample standard deviation (s)
2.37447
Population standard deviation (σ)
2.29395
Mean (Σfx ÷ N)
5.066667
Total frequency N
15
Σfx
76
Σf(x − mean)²
78.93333
Frequency of each value
0242: 3234: 5456: 4648: 28210: 1101
Frequency table
xff·xx − meanf(x − mean)²
236-3.066728.213
4520-1.06675.6889
64240.933333.4844
82162.933317.209
101104.933324.338
Show step-by-step solution
  1. N = Σf = 15 and Σfx = 76.
  2. Mean = 76 ÷ 15 = 5.066667.
  3. Σf(x − mean)² = 78.93333 (see the table).
  4. Sample variance = 78.93333 ÷ (15 − 1) = 5.638095.
  5. Population variance = 78.93333 ÷ 15 = 5.262222.
MeanΣfx / Σf
Sample varianceΣf(x − x̄)² / (N − 1)
Population varianceΣf(x − μ)² / N

What Is Variance?

A frequency table records each distinct value once, along with how many times it occurs. To find its variance you weight every squared deviation from the mean by that frequency, then divide by N or N − 1.

Enter the values in one box and their frequencies in the other. The calculator returns the mean, the sample variance, the population variance and both standard deviations, plus a table with f·x and f(x − mean)² for each row.

For grouped data such as class intervals, enter the class midpoints as the values. The answer is then an estimate, because the exact values inside each class are not known.

How to Use the Variance Calculator

  1. Enter the distinct values in the first box.
  2. Enter the matching frequencies in the second box.
  3. Pick the sample or population result, depending on whether the table is a sample or the whole group.

Variance Formula

Mean

xˉ=∑fx∑f\bar{x}=\frac{\sum fx}{\sum f}

Sample variance

s2=∑f(x−xˉ)2N−1s^2=\frac{\sum f(x-\bar{x})^2}{N-1}

Population variance

σ2=∑f(x−μ)2N\sigma^2=\frac{\sum f(x-\mu)^2}{N}

Shortcut

σ2=∑fx2N−μ2\sigma^2=\frac{\sum fx^2}{N}-\mu^2

Variance Variables Explained

SymbolMeaningNotes
xA distinct value, or a class midpoint
fFrequency of that valueWhole number, 0 or more
NTotal frequency, Σf
x̄ or μMean, Σfx ÷ N
s² and σ²Sample and population varianceDivide by N − 1 or N

Variance Worked Example

With the example values loaded in the calculator above, the steps are:

  1. N = Σf = 15 and Σfx = 76.
  2. Mean = 76 ÷ 15 = 5.066667.
  3. Σf(x − mean)² = 78.93333 (see the table).
  4. Sample variance = 78.93333 ÷ (15 − 1) = 5.638095.
  5. Population variance = 78.93333 ÷ 15 = 5.262222.

Result: Sample variance (s²) = 5.638095; Population variance (σ²) = 5.262222.

Worked example

Values 2, 4, 6, 8, 10 with frequencies 3, 5, 4, 2, 1 give N = 15 and Σfx = 6 + 20 + 24 + 16 + 10 = 76, so the mean is 5.0667.

Σfx² = 12 + 80 + 144 + 128 + 100 = 464, so Σf(x − mean)² = 464 − 76² ÷ 15 = 78.9333. Dividing by 14 gives the sample variance 5.6381, and dividing by 15 gives the population variance 5.2622.

Grouped data and class midpoints

If your data are in classes such as 0–10 and 10–20, use the midpoint of each class as x. The result is an estimate, because the true values inside each class are unknown.

Where Variance Is Used

Frequency table homework

Check each row of f·x and f(x − mean)² against your own working.

Grouped data

Estimate variance and SD from class midpoints and counts.

Survey results

Summarise spread when responses are already tallied by value.

Common Variance Mistakes to Avoid

  • Check that Σf equals the number of observations you started with.
  • Use the sample formula unless the table describes every member of the group.

Variance Terms and Definitions

Frequency
How many times a value occurs.
Class midpoint
The centre of a class interval, used as its value in grouped data.

Variance FAQs

How do you find variance from a frequency table?

Find the mean with Σfx ÷ Σf, then add f × (x − mean)² for each row and divide by N for a population or N − 1 for a sample.

What is N in a frequency table?

N is the sum of the frequencies, which is the total number of observations.

Is the result exact for grouped data?

No. With class midpoints it is an estimate of the true variance.

Can a frequency be 0?

Yes, it simply adds nothing. Negative or fractional frequencies are not allowed here.

How is the standard deviation found?

Take the square root of the variance. Both versions are shown.

Does it match the variance of the raw list?

Yes. Entering each value as many times as its frequency in a normal variance calculator gives the same answer.

Related calculators

Last updated 2026-11-09. See our disclaimer.