What Is Covariance?
Covariance is a statistical measure of how two variables move in relation to each other. For investors, the variables are usually the returns of two assets, such as two stocks, measured over the same time periods. If the two assets tend to rise above their average returns at the same time and fall below them at the same time, their covariance is positive. If one tends to rise when the other falls, covariance is negative. A value near zero suggests little consistent relationship between their movements.
Covariance is closely related to variance, which is the special case where a variable is compared with itself. Variance measures how spread out a single series is, while covariance measures how two series move together.
How Covariance Is Calculated
For two series of paired observations, covariance is found by taking each pair's deviation from its series' average, multiplying the two deviations, and averaging the products:
Cov(X, Y) = sum of (Xi - mean of X) × (Yi - mean of Y), divided by n - 1
Here n is the number of paired observations. Dividing by n - 1 is the usual convention for sample data. Because covariance is expressed in the product of the two variables' units, its size is hard to interpret on its own. A covariance figure may look large or small depending on the data. For that reason, analysts often rescale it by dividing by the two standard deviation values, which produces the correlation coefficient, a measure that always falls between -1 and +1.
Why It Matters for Portfolios
Covariance is central to portfolio construction. The risk of a combined portfolio depends not only on the risk of each holding but also on how the holdings move together. When two assets have low or negative covariance, combining them can reduce overall portfolio volatility. This is the basic logic behind diversification. Modern portfolio theory, developed by Harry Markowitz, uses a covariance matrix of asset returns to estimate portfolio risk for a given level of expected return.
Limitations
Covariance is estimated from historical data, and relationships between assets can change over time, often strengthening during periods of market stress. It captures only linear association and says nothing about cause. It is also sensitive to outliers and to the time period chosen.
Updated October 21, 2026. For general education only; not financial, tax or legal advice.