Choose a parameter and enter the values of statistical variables X and Y. The calculator will compute their covariance.
Our covariance calculator is a statistics tool that estimates the covariance between two random variables X and Y in probability & statistics experiments. Moreover, you need this covariance statistics calculator, if you want to:
In this article, you will learn about the covariance formula, how to calculate covariance, and much more that you need to know! Well, before knowing about this covariance calculator, let’s start with some basics.
In the term of statistics and mathematics, covariance definition elaborates as the measurement of the relationship between two random variables (X, Y). In simple words, covariance is said to be a measure of how much two random variables can vary together. Studies depict that the covariance concept is very similar to the variance concept. However, the statistical covariance tells you how two variables vary together while statistical variance tells you how a single variable varies. Well, calculating covariance becomes easy with the help of the above covariance calculator.
Covariance can be positive or negative. Positive covariance means the two data sets are likely to move in the same way. While a negative covariance indicates that as one data set rises, the other tends to fall. You can also find the sum of squares of a given dataset by using this online sum of squares calculator.
Our covariance calculator with probability helps you in statistics measurements by using the given sample and population covariance formulas:

Sample Cov (X, Y) = ∑ (xᵢ - x̄)(yⱼ - ȳ) N - 1
Population Cov (X,Y) = ∑ (xᵢ - x̄)(yⱼ - ȳ) N
In the above covariance equations;
Mean x:
\( = \frac{1}{n} \sum_{i=1}^{n} x_i \)
Mean y:
\( = \frac{1}{n} \sum_{i=1}^{n} y_i \)
The covariance calculator helps to find out the statistical relationship between the two sets of population data (X and Y). Also, this sample covariance calculator allows you to calculate covariance matrix and the covariance between two variables X and Y for a given correlation coefficient (Pearson’s) and standard deviations. Don’t fret; covariance calculation is quite easy with this advanced covariance statistics tool.
Read on!
Our statistics calculator is quite easy to use, you just have to follow the given steps:
Once you have added the above values, hit the calculate button, the covariance calculator shows the step-by-step solution in a couple of seconds:
Automatic Mean Calculation
Auto-calculates and displays the mean of both X and Y datasets.
Choose Covariance Type
Use a simple toggle option to select between sample or population covariance
Formula Display
Displays the mathematical formula used for covariance.
Calculate Means
Find the Mean for Dataset X and also the Mean for Dataset Y
Data Table
Provides a detailed table with (Xᵢ - X̄), (Yᵢ - Ȳ), and their product.
Step-by-Step Solution
Explains how the final covariance value is computed. The final covariance value is clearly highlighted.
Let’s take a look at covariance example:
Calculate the covariance for the given data sets.
Step 1: First of all, find the sample mean of data sets X & Y.
➦ For X
\( x̄ = \frac{4 + 7 + 10 + 13 + 16}{5} \)
\( x̄ = \frac{50}{5} \)
x̄ = 10
➦ For Y
\( ȳ = \frac{1 + 3 + 5 + 7 + 9}{5} \)
\( ȳ = \frac{25}{5} \)
ȳ = 5
Step 2: Now find the deviation (difference of data values from the mean) of sets X & Y and calculate the square of deviations.
| xᵢ | xᵢ - x̄ | yⱼ | (yⱼ - ȳ) | (xᵢ - x̄)(yⱼ - ȳ) |
|---|---|---|---|---|
| 4 | 4 - 10 = -6 | 1 | 1 - 5 = -4 | (-6) * (-4) = 24 |
| 7 | 7 - 10 = -3 | 3 | 3 - 5 = -2 | (-3) * (-2) = 6 |
| 10 | 10 - 10 = 0 | 5 | 5 - 5 = 0 | (0) * (0) = 0 |
| 13 | 13 - 10 = 3 | 7 | 7 - 5 = 2 | (3) * (2) = 6 |
| 16 | 16 - 10 = 6 | 9 | 9 - 5 = 4 | (6) * (4) = 24 |
Step 3: Calculate the summation of (xᵢ - x̄)(yⱼ - ȳ) terms.
Σ(xᵢ - x̄)(yⱼ - ȳ) = 24 + 6 + 0 + 6 + 24
Σ(xᵢ - x̄)(yⱼ - ȳ) = 60
Step 4: Now divide the above expression by N - 1 to get the result of sample covariance.
Σ(xᵢ - x̄)(yⱼ - ȳ) (N - 1) = 60 (5 - 1)
Σ(xᵢ - x̄)(yⱼ - ȳ) (N - 1) = 60 4 = 15
✅ Final Answer: Sample Covariance = 15
However, from this example you got a positive covariance, it means that the variables are positively related.

Note:
If you see the given denominator of the above covariance formula, you have the degrees of confidence. However, in the above covariance example, we had more than 2 terms, thus we used the formula n – 1. When you are going to find the covariance of two random variables, then you ought to divide the formula by n only.
From the above example of covariance you will come to know, if you had a positive covariance, which means there is a positive relationship between the variables or that said they are positively related. However, you can use our covariance calculator to calculate covariance from correlation. As a rule of thumb, a large covariance indicates that there may be a strong relationship between variables. Nevertheless, remember that you can’t compare variances over data sets that have several scales. You just have to think about comparing two datasets of variables where one is expressed in inches and the other one in pounds.

This is the problem with the interpretation of covariance outcomes, so as a far better approach is to account the correlation coefficient. So, you have to use the following formula instead:
Corr(X,Y) = Cov(X,Y) σXσY
However, you can confirm your outcomes in our calculate covariance from correlation.
Let’s start with covariance:
Now, ahead to Correlation:
The Correlation Coefficient has a different number of advantages over covariance for computing strengths of relationships, these are:
Unlike variance, which is non-negative, Covariance is something that can be negative or positive (or zero, of course). A positive covariance indicates that two random variables tend to vary in the same direction; a negative variance indicates that they vary in opposite directions, and zero means they don’t vary together.
The symbol for covariance is cov(X, Y).
When it comes to covariance, there is no minimum or maximum value, that’s why the values are more difficult to interpret. For instance, a covariance of 50 may indicate a strong or weak relationship as this actually depends on the units in which covariance is measured.
Covariance values are not standardized, according to statistical terms, the covariance can range from negative infinity to positive infinity. Thus, the value for a perfect linear relationship all depends on the data.
When it comes to compare data samples from different populations, the covariance (COV) is considered to find how much two random variables vary together. And, correlation is something that accounts to find when a change in one variable can result in a change in another. Remember that both covariance and correlation determine linear relationships between variables.
Well, when it comes to comparison, which is a better measure of the relationship between two variables, correlation is preferred over covariance as it is the measure that remains unaffected by the change in location and scale – and, also can be accounted to make a comparison between two pairs of variables.
Just stick to these given steps to create a covariance matrix in Excel or covariance table in Excel:
Variance is the mathematical term used in statistics and probability theory, it is referred to the spread of a dataset around its mean value.
Sometimes the covariance is said to be a measure of ‘linear dependence’ between the two random variables. That does not mean the same thing that is in the context of linear algebra.
From Wikipedia, the free encyclopedia - For a broader coverage of this topic, see Covariance and Correlation Coefficient
From dummies - Business Statistics By Alan Anderson - how to calculate Covariance and Correlation of Data Samples
An initiative by IIT IIM Graduates, EDUCBA (Corporate Bridge Consultancy Pvt Ltd) - Covariance Formula with Example - Population Covariance & Sample Covariance From XPLAIND
Related
Links
Home Conversion Calculator About Calculator Online Blog Hire Us Knowledge Base Sitemap Sitemap TwoSupport
Calculator Online Team Privacy Policy Terms of Service Content Disclaimer Advertise TestimonialsEmail us at
Contact Us© Copyrights 2025 by Calculator-Online.net