Correlation Coefficient Calculator

Correlation Coefficient Calculator

Measure the strength and direction of linear relationships between two variables.

Last updated: March 2026

Calculate Pearson's Correlation

Pearson's r
0.925820
Very strong positive
Pairs (n)
7
R² (Variance)
0.857143
t-statistic
5.4772
Mean X
4.0000
Mean Y
5.0000

What is Pearson's Correlation Coefficient?

Pearson's r is a number between -1 and +1 that measures how strongly two variables move together in a linear relationship. A value of +1 means perfect positive correlation (as one increases, so does the other), -1 means perfect negative correlation (as one increases, the other decreases), and 0 means no linear relationship.

It's named after statistician Karl Pearson and is one of the most widely used correlation measures. R² (r-squared) tells you what fraction of variance in one variable is explained by the other. For example, r² = 0.64 means 64% of the variation is explained by the relationship.

Correlation does NOT imply causation. Two variables can be correlated for many reasons: one causes the other, both are caused by a third variable, or it's pure coincidence. Always investigate the underlying relationship before drawing conclusions.

How to Calculate Pearson's r

The Formula

r = Σ((xᵢ - x̄)(yᵢ - ȳ)) / √[Σ(xᵢ - x̄)² × Σ(yᵢ - ȳ)²]
Where x̄ and ȳ are the means, and the sums are over all data points

Interpretation Guide

r = ±1.0
Perfect linear relationship
r = ±0.7-0.9
Strong relationship
r = ±0.5-0.7
Moderate relationship
r = ±0.3-0.5
Weak relationship
r ≈ 0
No linear relationship

Key Properties

  • Range: always between -1 and +1
  • Sign indicates direction (positive/negative)
  • Magnitude indicates strength
  • Assumes linear relationship (not suitable for curves)
  • R² = fraction of variance explained

Example: Height vs. Weight

Calculate correlation between height and weight for 7 individuals:

Height(in): 60, 65, 70, 72, 68, 75, 78 → mean = 69.0
Weight(lb): 130, 140, 160, 170, 155, 180, 195 → mean = 161.4
Step 1:
Calculate deviations from mean for each variable
Step 2:
Σ((xᵢ - x̄)(yᵢ - ȳ)) = 720.6 (sum of products)
Step 3:
Σ(xᵢ - x̄)² = 98.0, Σ(yᵢ - ȳ)² = 5984.3
Result:
r = 720.6 / √(98.0 × 5984.3) = 0.938 — Very strong positive correlation!

Frequently Asked Questions

What's the difference between r and R²?

r is the correlation coefficient (-1 to +1). R² is r squared (0 to 1), representing the proportion of variance in one variable explained by the other. R² is easier to interpret as a percentage.

Can correlation be positive or negative?

Yes. Positive r means variables increase together (height-weight). Negative r means one increases while the other decreases (price-demand). Sign shows direction.

Does r = 0 mean no relationship?

No, it means NO LINEAR relationship. There could be a strong curved (nonlinear) relationship that r = 0 would miss. Always visualize your data.

Can I predict one variable from another if r is high?

High r suggests a strong relationship, but prediction accuracy depends on the context and causation. Correlation alone is insufficient for prediction models.

Is 0.5 correlation good or bad?

Depends on context. In psychology, r = 0.5 is strong. In physics, it's weak. Always consider domain expectations and whether correlation is worth reporting.

How many data points do I need?

Minimum 3, but at least 30 is recommended for robust estimates. More data = more reliable correlation. With tiny samples, correlation is unstable.

Related Tools