How to use this calculator
Enter two data sets of equal length in Data Set X and Data Set Y, separated by commas or spaces, with each X value paired to the Y value in the same position. Choose Sample or Population covariance, then click Calculate. Click Clear to reset the fields to the example data.
What covariance measures
Covariance describes the direction of a linear relationship between two variables. For paired data (x, y), the formula is:
Cov(X,Y) = Σ(x − x̄)(y − ȳ) / (n − 1) for a sample, or divide by n instead of n − 1 for a full population.
Each term multiplies how far a given x is from the mean of X (x̄) by how far its paired y is from the mean of Y (ȳ). A positive covariance means X and Y tend to rise and fall together; a negative covariance means one tends to rise while the other falls; a value near zero means little linear relationship.
Why the correlation coefficient is also shown
Covariance's size depends on the units of X and Y, so a covariance of 500 could mean a strong or a weak relationship depending on what is being measured. The Pearson correlation coefficient, r = Cov(X,Y) / (σx × σy), rescales the same relationship to always fall between −1 and 1, making the strength of the relationship easy to read regardless of units.
Interpreting the results
The Covariance card shows the raw Cov(X,Y) value in the sign convention above. The Correlation Coefficient card shows the same relationship rescaled to −1 to 1: values near 1 indicate a strong positive linear relationship, values near −1 indicate a strong negative one, and values near 0 indicate little linear relationship. The Mean of X and Mean of Y cards show the average of each data set, which the covariance formula is built around.