Academic calculator · runs in your browser

Pearson Correlation & Covariance Calculator

Paste matched X and Y observations to measure linear association and inspect covariance on the original measurement scales.

Calculate

Enter paired values in the same order. Each X value must have one matching Y value.

Correlation standardizes association; covariance keeps the original scale

Pearson r divides the paired cross-deviation by both variables’ spread, producing a unitless measure from −1 to 1. Covariance uses the same paired deviations without that standardization, so its magnitude depends on the units of X and Y.

Lynara reports both sample covariance and population covariance because the denominator depends on whether the entered pairs are treated as a sample or the complete population of interest. Neither statistic establishes a causal relationship.

Privacy: calculator inputs are processed in your browser; Lynara does not need to upload these values to calculate the result.

Formula

r = cross-deviation sum ÷ √(SSx × SSy); covariance = cross-deviation sum ÷ n or (n − 1)

Worked decision • illustrative inputs

Perfect correlation can reverse sign without changing either set of values

  1. Pair X = [1, 2, 3, 4] with Y = [2, 4, 6, 8]. Each increase of 1 in X comes with an increase of 2 in Y. The Pearson coefficient is r = +1, indicating a perfect positive linear relationship in this invented data.
  2. Keep X fixed but reverse the order of Y to [8, 6, 4, 2]. The same four X and four Y values are present, but the pairs now move in opposite directions, so Pearson r = −1. Matching the rows matters: the calculator treats each row as an observed X–Y pair.
  3. To see why the coefficient alone is not the full story, imagine repeating the original four pairs many times: the computed correlation stays +1, but repetition does not create a causal experiment or a representative sample.

What the result tells you

Correlation measures how paired observations vary together, not how similar their separate distributions are. A sign reversal with the same individual values demonstrates why preserving each paired measurement is essential.

Before you use the result

Pearson r does not imply causation, and it can be distorted by outliers or non-linear relationships. An r of +1 or −1 on four invented points is not evidence about a population; inspect a scatterplot and sampling method before interpreting real data.

References for this method

Useful for

Questions

What is the difference between correlation and covariance?

Covariance keeps the variables’ units and scale, while Pearson r standardizes the relationship to a unitless value from −1 to 1.

Does r = 1 prove one variable causes the other?

No. Perfect linear association does not establish causation.

Supporting guides

Related tools