Covariance from correlation:
formula and worked example
Multiply the correlation back by both spreads to return to the units of the original data.
Calcylator Editorial Team
Updated · 4 min read
When you need covariance rather than correlation
Correlation is easy to quote, but many calculations need covariance, because covariance carries the actual scale. The variance of a sum of two variables, the risk of a two-asset portfolio, and the entries of a covariance matrix all use covariance, not correlation.
Published sources often give only the correlation and the spreads, since correlation is the more readable number. To use them in a model you rebuild the covariance, which is simply the reverse of the standardising step.
The result keeps the combined units of the variables. If x is in kilometres and y is in minutes, covariance is in kilometre-minutes, which is awkward but correct.
The formula and what goes in
Multiply the correlation by the standard deviation of x and the standard deviation of y.
- r:
- R
- std_x:
- Std x
- std_y:
- Std y
- R: the correlation coefficient, between -1 and 1, 0.6 in the example.
- Std x: the standard deviation of the first variable, 4 in the example.
- Std y: the standard deviation of the second variable, 3 in the example.
Both standard deviations should be computed under the same convention, sample or population, and should match the one used to produce the correlation. If either standard deviation is zero, one variable never changes, and the covariance is zero whatever the correlation says.
Worked example: r of 0.6 with spreads 4 and 3
Two variables are correlated at 0.6, with standard deviations of 4 and 3.
R
0.6
Std x
4
Std y
3
Covariance from correlation
7.2 covariance
A correlation of 0.6 with standard deviations of 4 and 3 gives 0.6 × 4 × 3, which is 0.6 × 12 = 7.2.
- Multiply the standard deviations: 4 × 3 = 12.
- Multiply by the correlation: 0.6 × 12 = 7.2.
The covariance is 7.2. The ceiling for these spreads is 12, reached only when r equals 1, so 7.2 sits at 60% of the maximum.
Putting the covariance to work
The usual next step is the variance of a combined quantity. For the sum of x and y, add the two variances and twice the covariance. With the numbers here: 4² + 3² + 2 × 7.2 = 16 + 9 + 14.4 = 39.4, giving a standard deviation of about 6.3.
Compare that with the case of no correlation, where the variance of the sum would be 25 and the standard deviation 5. Positive covariance makes the total more variable, because high and low outcomes tend to arrive together. With a negative covariance, the opposite happens and variability falls, which is the logic of diversification.
The sign of the covariance carries across from r, so a negative correlation always gives a negative covariance, and zero correlation gives zero.
It also helps to turn the covariance into a plain-language statement. A covariance of 7.2 between x and y does not say much by itself, but knowing that it is 60% of the largest possible value for these spreads tells you the pair moves together fairly firmly while still leaving a good deal of independent variation.
How the correlation moves the covariance
With the spreads fixed, covariance is proportional to r. Every 0.1 on the correlation corresponds to 1.2 of covariance here, because 0.1 × 12 = 1.2.
| Scenario | R | Calculated result |
|---|---|---|
| Original assumptions | 0.6 | 7.2 covariance |
| R increased by 10% | 0.66 | 7.92 covariance |
The table is a reminder that the scale factor comes from the spreads. Doubling both standard deviations would multiply the covariance by four, even with the correlation unchanged. That is also why two datasets with the same correlation can have wildly different covariances, and why covariances should not be compared across variables measured in different units.
Slips when rebuilding covariance
- Multiplying by the variances instead of the standard deviations, or by only one of the two spreads.
- Passing a correlation expressed in percentage terms, such as 60, rather than 0.6.
- Combining a sample correlation with population standard deviations, or the reverse, which mixes conventions.
- Using a correlation from one period or population with spreads measured from another, so the three numbers no longer describe the same data.
A diversification check
Two investments have standard deviations of 10 and 20 percentage points of annual return and a correlation of -0.3. What is the covariance and what does it do to the sum?
- Multiply: -0.3 × 10 × 20 = -60.
- Variance of the sum: 100 + 400 + 2 × (-60) = 380.
- That is below the 500 you would get with no correlation.
The negative covariance reduces the combined variance, which is how mixing weakly related assets lowers risk.
Common questions
What is the formula for covariance from correlation?
Covariance equals the correlation coefficient multiplied by the standard deviation of x and the standard deviation of y. It is the reverse of dividing covariance by the product of the standard deviations.
What is the largest covariance two variables can have?
The product of their standard deviations. That happens when the correlation is exactly 1. Similarly, the most negative covariance is minus that product, reached when the correlation is -1.
Does covariance have units?
Yes. Its units are the product of the units of the two variables, for instance rupee-kilograms. That is why covariance is hard to compare across datasets and why correlation is usually reported alongside it.
Why would I need covariance if I have the correlation?
Because calculations such as the variance of a sum, portfolio risk or regression slopes use covariance directly. Correlation is a reporting convenience; covariance is the form needed for most formulas.
Can covariance be negative?
Yes. A negative correlation gives a negative covariance, meaning that when one variable is above its average the other tends to be below. A covariance of zero indicates no linear relationship.
Was this guide helpful?
Continue reading
View all blogsPercentile rank estimate: formula and worked example
Estimate a percentile rank as the share of a group scoring below a value, with a 37-of-50 example, a sensitivity table and how ties are handled.
4 min read
Relative risk: formula, example and practical interpretation
Relative risk compares the chance of an outcome in an exposed group with an unexposed group. See the formula, a 1.5x example and how to read it.
4 min read
Absolute risk reduction: formula and worked example
Absolute risk reduction shows how many percentage points a treatment cuts from the control group's event rate. Formula, 4-point example, pitfalls.
4 min read




