In Excel: use =COVARIANCE.S(array1, array2) for a sample — it measures whether two variables move together, in units that make the number hard to interpret alone.
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
array1 | required | The first set of values. |
array2 | required | The second set, the same size as array1. |
Related functions
6 pairs
R² = 0.9962
Intercept = 0.1667
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
Covariance measures joint variability: positive when two variables rise together, negative when one rises as the other falls. Its weakness is scale — the result is in the product of the two variables' units, so a covariance of 4,200 means nothing without knowing what is being measured. That is exactly why CORREL exists, dividing covariance by the two standard deviations to produce a bounded -1 to 1 figure. Covariance earns its place in portfolio mathematics, where the covariance matrix, not the correlation matrix, is what combines into portfolio variance. COVARIANCE.S is the sample form; COVARIANCE.P assumes a full population. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. For “find covariance in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
Two return series in B2:B100 and C2:C100: =COVARIANCE.S(B2:B100, C2:C100) returning 0.0032 says they move together, but the size is uninterpretable on its own. Normalising it: =COVARIANCE.S(B,C)/(STDEV.S(B)*STDEV.S(C)) reproduces =CORREL(B,C) exactly, which is the figure to report. Covariance is the quantity portfolio maths runs on, and knowing it is uninterpretable alone is what keeps it out of reports. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. The short version of “find covariance in excel”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.
Common mistakes
- Reporting a raw covariance, which is uninterpretable without the units; report the correlation instead.
- Ranges of different lengths, which returns
#N/A. - Using COVARIANCE.P on sample data, which understates the figure the same way VAR.P does.
Frequently asked questions
What is the difference between covariance and correlation?
Correlation is covariance divided by both standard deviations, which bounds it between -1 and 1 and makes it comparable across datasets.
Which should I report?
Correlation, nearly always. Covariance is for the maths, not the narrative.
When does covariance matter directly?
Portfolio variance, which combines covariances rather than correlations.
Other ways people ask this
On the way here you may have searched this as “how to find the covariance on excel”, “find covariance in excel” and “finding covariance in excel” — it is all the same task, and this page is the single, complete answer to it.
Why do people search for this in so many different ways?
Because the same task has many names. “how to find the covariance on excel”, “find covariance in excel”, “finding covariance in excel” all point at the one operation explained on this page, which is why they all lead here.