Covariance Calculator

Calculate covariance between two datasets using either the sample or population formula.

Enter paired datasets of equal length. Values can be separated by commas, spaces, or line breaks.

Result will appear here.
Metric Value

Privacy: calculations run locally in your browser. No values are stored or transmitted.

How it works

Covariance compares paired deviations from each dataset’s mean.
Population covariance divides by n.
Sample covariance divides by n − 1.

Examples

  • If X and Y both tend to rise together, covariance is usually positive
  • If one tends to rise while the other falls, covariance is usually negative

FAQ

  • What does covariance measure?

    Covariance measures how two variables vary together. Positive covariance suggests they tend to move in the same direction, while negative covariance suggests opposite movement.

  • What is the difference between sample and population covariance?

    Population covariance divides by n. Sample covariance divides by n − 1.

  • Do both datasets need the same number of values?

    Yes. Covariance requires paired observations, so both lists must have the same length.

  • Are calculations stored?

    No. Everything runs locally in your browser.

Related tools