Covariance Calculator

Work out the covariance of two variables for a sample or population, and whether they move together.

Your details

Separate the values with commas or spaces

Separate the values with commas or spaces

Your data stays in your browser

Result

Enter both variables in the same order, then press “Calculate”.

Analysis and suggestions

Once calculated, this shows what your result means and suggestions based on your numbers.

Behind the result

Work out the covariance of two variables for a sample or population, and whether they move together.

Example · تغاير العينة = Σ(x − x̄)(y − ȳ) ÷ (n − 1) | تغاير المجتمع = Σ(x − μx)(y − μy) ÷ N

cov = 35.2

How it is calculated

Comprehensive Calculator Guide

This calculator works out the covariance of two variables for a sample or population, how much they move together, with both means and the correlation for comparison. Study hours and marks for six students have a sample covariance of 35.2, positive because both rise together.

Covariance

It averages the products of paired deviations; sample divides by n − 1, population by N. Its size depends on units, so divide by both SDs to get the correlation; finance uses covariance directly for portfolio risk.

How to Use

  1. Enter the first variable.
  2. Enter the second in the same order and choose sample or population.
  3. Press “Calculate” to see the covariance, means and correlation.

Formula Used

s_xy = Σ(x − x̄)(y − ȳ) ÷ (n − 1)

Practical Examples

Example 1
Study and marks: 35.2.
Example 2
Heat and coffee: −237.5.

Important Tips

  • Sign for direction, r for strength.
  • Align the pairs.
  • Population for complete data.

Common Mistakes to Avoid

  • Reading a big covariance as strong.
  • Comparing across units.
  • Mixing n and n − 1.

Frequently Asked Questions

What is covariance?
How two variables move together.
Vs correlation?
Correlation is standardised.
Negative?
One falls as the other rises.

Read Also

Results are estimates for educational purposes and may vary depending on your situation and data sources.