What it is:
Variance is a statistical measure of how much a set of observations differ from each other.
In accounting and financial analysis, variance also refers to how much an actual expense deviates from the budgeted or forecast amount.
How it works/Example:
For example, let's say Company XYZ
The average of these prices is $21.33. To calculate the variance, we see how "far away" each day's stock price is from $21, like this:
Notice that some of the differences are negative. Because we're going to calculate the average difference, the negative numbers create a mathematical problem (they'll the positive numbers and screw up the calculation). To avoid this, we square each difference so that each difference is positive, like this:
The last step is simply calculating the average of those squared differences, which is $9.42, and then taking the square root of that number to get the amount by which Company XYZ stock tends to vary from its average price.
The square root is $3.07, meaning that when Company XYZ deviates from that $21 average, it tends to do so by about $3.07.
Why it matters:
Variance is a measure of volatility because it measures how much a stock fluctuates. Accordingly, the higher the variance, the riskier the stock.