Correlation Coefficient Calculator

Input paired x and y values to obtain Pearson's r, covariance, and descriptive statistics illustrating linear relationships.

Pearson r

0.9922

Covariance

5.2500

Interpretation

Very strong linear relationship.

Pairs: 5

Mean of x: 3.0000

Mean of y: 6.8000

Std. dev. x: 1.5811

Std. dev. y: 3.3466

How to Use This Calculator

  1. Enter paired x and y values, one pair per line.
  2. Ensure each line contains both numbers separated by spaces or commas.
  3. Review Pearson's correlation along with covariance and descriptive statistics.
  4. Use the interpretation to gauge the strength and direction of the linear relationship.

Formula

r = Σ[(xi − μx)(yi − μy)] / √[Σ(xi − μx)² · Σ(yi − μy)²]

Covariance = Σ[(xi − μx)(yi − μy)] / (n − 1)

μx, μy = sample means; n = number of pairs

Pearson's r ranges from −1 to +1 and measures the strength and direction of linear association between x and y.

Full Description

Pearson's correlation coefficient summarizes how closely paired variables follow a straight-line relationship. Values near +1 or −1 indicate strong positive or negative linear trends, while values near zero signal weak linear association.

The calculator also reports covariance and standard deviations, helping diagnose scaling issues or variance imbalances before interpreting correlation.

Frequently Asked Questions

Can correlation be computed if one variable has zero variance?

No. When all x or y values are identical, correlation is undefined because division by zero occurs.

Does Pearson's r capture non-linear relationships?

It measures only linear association. Non-linear patterns may require rank correlations or regression analysis.

Should I remove outliers?

Outliers can dramatically influence correlation. Consider visualizing data and using robust metrics when appropriate.

How many pairs do I need?

Two pairs are the minimum, but more observations improve reliability and allow significance testing.