How to Calculate Variance
At its simplest, calculating variance is a four-step process: find the mean of your data set, subtract that mean from each value, square each of those differences, then average the squared differences.
The reason you square the differences is to eliminate negative values. Without squaring, positive and negative deviations would cancel each other out, and you'd end up with a sum of zero no matter how spread out your data actually is. Squaring ensures every deviation contributes positively to the final result.
The slight wrinkle is in that last step. When you're working with a full population, you divide by the total number of values. When you're working with a sample drawn from a larger population, you divide by one less than the number of values. That distinction matters, and we'll dig into it more below.