Covariance Calculator

Enter two paired data sets to calculate their covariance.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

Covariance measures the direction in which two variables move together: a positive covariance means that when one variable is above its mean, the other tends to be above its mean too, while a negative covariance means they tend to move in opposite directions. It is computed as the average of the products of each variable's deviation from its own mean, using either the population formula (dividing by n) or the sample formula (dividing by n − 1, Bessel's correction) depending on whether the data represents an entire population or a sample drawn from it.

Covariance is the building block behind the Pearson correlation coefficient (correlation is covariance normalized by the two variables' standard deviations) and underlies core techniques in finance — such as portfolio variance and the covariance matrix used in Modern Portfolio Theory to diversify risk between assets — as well as in statistics, machine learning (principal component analysis), and the sciences wherever analysts need to quantify how two measured quantities co-vary.

This calculator takes two paired data sets and computes their sample or population covariance directly from the raw values.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators