Covariance Calculator
Co-spread with both divisors: population covariance over n beside sample covariance over n − 1, the correlation reconstruction live, and the units card that keeps the raw number honest.
Covariance Calculator
Results recalculate instantly on every keystroke. Nothing you type is transmitted.
What this result does not account for
- Measures LINEAR co-spread only — the x² counterexample applies
- Constant lists refused (Sxx or Syy = 0 kills the reconstruction)
In short: For x = 1..8 and y = 52, 55, 58, 61, 66, 64, 70, 72: Sxy = 119, so the sample covariance is 119/7 = 17 exactly and the population covariance is 119/8 = 14.875 — the same n vs n − 1 split the variance page teaches, applied to co-spread. The units are x-units × y-units, which is why covariance alone cannot say how STRONG a relationship is: standardize it — r = cov/(sx·sy) = 17/(2.449490×7.066015) = 0.982197, the correlation page’s number to the last digit. Swap the two lists and nothing moves: covariance is symmetric, it never asks which variable came first.
Formula
cov(x,y) = Σ(xᵢ−x̄)(yᵢ−ȳ) / (n−1) · r = cov / (sx·sy)
The numerator Sxy is the same product-sum the correlation and regression pages build; only the divisor is new. Both divisors are printed so the n vs n − 1 choice is never silent.
Worked Example
- Paste two numeric lists of the same length (2 to 500 pairs).
- Quote the sample covariance for sample data; the population figure is printed beside it for a census.
- Use the reconstruction card to convert to the unit-free correlation.
- Read the units card before comparing covariances between data sets.
Defaults: cov_s = 17 exactly, cov_p = 14.875, sx = 2.449490, sy = 7.066015, reconstructed r = 0.982197. A constant list is refused — no spread, no co-spread to measure.
Strengths & Limits Of This Model
Where this engine is strong
- Both divisors printed side by side — no silent n vs n − 1 choice
- Reconstruction card ties the number to the correlation page to the last digit
Where it stops
- Raw covariance is unit-bound and cannot be compared across data sets
- No significance test here — the correlation page owns the t test
Practical Use Cases
Finance
co-movement of two assets before any ratio
Lab
do instrument and reference drift together?
Teaching
the n vs n − 1 split, second life
Methodology & Editorial Standards
Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.
This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.
Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.
Covariance Calculator — 8 Expert FAQs
8 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.
Why two covariance numbers?
The divisor. Dividing by n gives the population covariance (14.875 on the defaults); by n − 1 the sample covariance (17) — the same split the standard-deviation and variance pages teach, applied to co-spread. Data you treat as a SAMPLE should quote the n − 1 figure.
Covariance is 17 — is that big?
Unanswerable in covariance units: the number scales with BOTH variables’ units (x-units × y-units). Rescale yards to miles and the same relationship collapses to a tiny covariance. Size the STRENGTH through the standardized cousin — r = cov/(sx·sy), reconstructed live on the card below.
How is this different from the correlation page?
Correlation is covariance after standardization: r = cov/(sx·sy). That page owns the unit-free number, its bands and its significance test; this page owns the raw co-spread and shows the reconstruction so the two can be checked against each other — same data, r = 0.982197 in both places, to the last digit.
What does negative covariance mean?
That the lists move in OPPOSITE directions: above-average x pairs with below-average y. The sign is the direction; the magnitude is unit-bound. Zero covariance means no LINEAR co-movement — the correlation page’s x² card shows why that is not the same as unrelated.
Why does a constant list get refused?
A constant has no spread of its own: Sxx = 0 makes the correlation reconstruction 0/0, and one side of every product is zero. No spread, no co-spread to measure — the page names the dead list rather than printing a decorated 0.
Does covariance prove one list drives the other?
No — it is symmetric: Σ(xᵢ−x̄)(yᵢ−ȳ) never asks which came first, and swapping the lists changes nothing. Causality needs a design — an experiment, an instrument, a randomization — not a second moment.
Can I enter categories or dates?
Numbers only. Dates must become day counts; categories would have to become codes, and coded categories make covariance meaningless — the arithmetic invents an order the labels never had. These formulas are for measured quantities.
Why does the sample divisor appear again here?
Because co-spread is built from the same deviations as spread itself: covariance is to two lists what variance is to one. The n vs n − 1 decision means the same thing here as on the variance page — census arithmetic for a population, n − 1 for a sample — and both are printed so the choice cannot be made silently.