Skip to content

Advertisement

Covariance calculator

Paste paired X and Y values and choose whether they form a sample or the complete population.

Covariance: —

Fill in the fields above — the result is computed on this page.

Number of pairs
—
Mean X
—
Mean Y
—
Cross-deviation sum
—
Denominator
—
Pearson correlation r
—

Covariance components

Row X Y X − mean X Y − mean Y Deviation product
Fill in the fields above — the result is computed on this page.
What these numbers mean
  • The positive or negative sign describes the direction of joint variation.
  • Correlation is easier to compare across variables measured on different scales.

Covariance and correlation describe linear association and do not establish causality. The order of X and Y must refer to the same cases.

How to use this page
  1. Paste matching X and Y values.
  2. Choose sample or population.
  3. Read covariance and inspect the components table.

What this page does not do: Covariance and correlation describe linear association and do not establish causality. The order of X and Y must refer to the same cases.

Further reading

Covariance measures the direction of joint variation between two variables. A positive value means high X values tend to accompany high Y values, while a negative value indicates the opposite direction.

Its magnitude depends on the units and scale of both variables. The calculator therefore also reports Pearson correlation, which standardises the result to the range from −1 to 1 when both variables have nonzero spread.

Frequently asked questions

When should I divide by n − 1?

Use it when the data is a sample and covariance estimates the population covariance. Select n for the complete population.

Why is covariance not limited to −1 and 1?

It retains the variables' units and scale. Pearson correlation is the standardised counterpart.

See also

← All calculators

Advertisement
Offline app and draw notifications

My saved selections

Selections saved only in this browser. Numbers are shown exactly as saved; this is not a lottery ticket.

Open the My saved selections hub
Restore with preview

Restore in the hub: review the file and confirm first. Both old backups and the complete selections + journal backup are supported. Nothing is uploaded.