# What Is Covariance? Definition and Example

> Covariance measures how two investments move together. Here is the formula, a worked example with real fund data, and why correlation is usually easier to read.

Source: https://www.exent.ai/learn/covariance · Reviewed by David, Senior Analyst, Exent · Published Nov 19, 2026 · Updated Nov 19, 2026

## Key takeaways

- Covariance measures whether two assets’ returns tend to move in the same direction (positive), opposite directions (negative) or independently (near zero).
- Covariance = correlation × volatility of A × volatility of B. Its size depends on both volatilities, so it is hard to compare across pairs.
- Using Exent’s 5‑year data, the S&P 500 and Nasdaq‑100 had a covariance of about 0.030 (correlation 0.92); the S&P 500 and gold about 0.005 (correlation 0.17).
- Covariance is the input that portfolio risk models and optimizers actually use.

## What is covariance?

Covariance is a statistic for how two variables move together. In investing, it describes whether two holdings tend to have good and bad months at the same time. The sign tells the direction; the size mixes strength of the link with how volatile each asset is.

## How is covariance calculated?

From returns: average the products of each period’s deviations from the mean. In practice, it is easiest as **Cov(A,B) = ρ × σA × σB**, where ρ is the [correlation coefficient](https://www.exent.ai/learn/correlation-coefficient) and σ is volatility. For a two‑asset portfolio, variance = wA²σA² + wB²σB² + 2·wA·wB·Cov(A,B).

## Example: S&P 500 with the Nasdaq‑100 and with gold

| Pair | Correlation | Volatilities | Covariance |
| --- | --- | --- | --- |
| SPY and QQQ | 0.92 | 15.7% and 20.9% | 0.92 × 0.157 × 0.209 ≈ 0.030 |
| SPY and GLD | 0.17 | 15.7% and 17.2% | 0.17 × 0.157 × 0.172 ≈ 0.005 |

Exent’s data: 5‑year annualized volatility and 60‑month correlation, as of Sep 30, 2026. Gold’s covariance with the S&P 500 was about one‑sixth of the Nasdaq‑100’s, which is why it did more to lower a stock portfolio’s risk.

## Why does it matter for a self‑directed investor?

Every portfolio risk number, from volatility to the [efficient frontier](https://www.exent.ai/learn/efficient-frontier), is built from covariances between holdings. Understanding it explains why adding a volatile but unrelated asset can make a portfolio calmer. See [portfolio correlation](https://www.exent.ai/resources/portfolio-correlation).

## Common mistakes

- **Comparing raw covariances.** A large number may just mean volatile assets; use correlation to compare strength.
- **Treating estimates as stable.** Covariances shift with the window and tend to rise in crises.
- **Mixing frequencies.** Daily and monthly covariances must be annualized the same way before combining.

## See how your holdings move together with Exent

1. Upload a screenshot of your holdings, or a CSV, Excel, PDF or Google Sheet; no brokerage login.
2. Exent groups holdings that move together into correlation clusters.

Exent is our product: [Exent portfolio check](https://www.exent.ai/portfolio)

## Frequently asked questions

### What is the difference between covariance and correlation?

Correlation is covariance divided by both volatilities, so it is scaled from -1 to 1. Covariance keeps the units and is harder to compare.

### What does a negative covariance mean?

The two assets have tended to move in opposite directions, so holding both lowers portfolio volatility.

### What is a covariance matrix?

A table of the covariance between every pair of holdings, with each holding’s variance on the diagonal. Portfolio optimizers use it to estimate risk.

---

Educational content, not investment advice. Past performance does not guarantee future results.
