correlation r value calculator

Pearson Correlation (r) Calculator

Enter two equal-length data series (X and Y) to calculate the Pearson correlation coefficient r. Separate values by commas, spaces, or new lines.

Tip: You can paste values from spreadsheets directly.
Both lists must have the same number of values.

What is a correlation r value?

The correlation coefficient r (usually called Pearson’s r) measures the strength and direction of a linear relationship between two numeric variables. In plain language, it tells you whether two things tend to move together, and how tightly they move together.

  • r = +1: perfect positive linear relationship
  • r = 0: no linear relationship
  • r = -1: perfect negative linear relationship

How to use this correlation calculator

Step-by-step

  • Paste your first variable into the X values box.
  • Paste your second variable into the Y values box.
  • Make sure both lists contain the same number of observations.
  • Click Calculate r.

The calculator returns r, r², sample size, and a quick interpretation of relationship strength.

Pearson correlation formula

This page uses the standard Pearson product-moment correlation formula:

r = [nΣ(xy) - ΣxΣy] / √([nΣ(x²) - (Σx)²][nΣ(y²) - (Σy)²])

Where n is the number of paired observations. The formula normalizes covariance by each variable’s spread, which keeps r in the range from -1 to +1.

Interpreting r values (rule-of-thumb)

Interpretation depends on context, but this quick guide is commonly used:

  • |r| < 0.10: negligible linear relationship
  • 0.10 to 0.29: weak
  • 0.30 to 0.49: moderate
  • 0.50 to 0.69: moderately strong
  • 0.70 to 0.89: strong
  • 0.90 to 1.00: very strong
Important: Correlation does not imply causation. Two variables can be strongly correlated even if one does not cause the other.

When should you use Pearson’s r?

Pearson correlation works best when:

  • Both variables are continuous numerical data.
  • The relationship is approximately linear.
  • Outliers are limited (or handled carefully).
  • Observations are paired correctly and independent.

Common mistakes to avoid

  • Mismatched rows: each X value must correspond to the correct Y value.
  • Using r on ranked or ordinal data: Spearman’s rho may be better in that case.
  • Ignoring outliers: a single extreme value can distort correlation.
  • Assuming causal effects: a high r alone is not proof of cause-and-effect.

Quick example

Suppose you track weekly study hours and exam score. If higher study hours generally come with higher scores, you may see a positive r (e.g., 0.78). That indicates a strong positive linear relationship, but still does not prove study hours are the only reason scores increased.

FAQ

Can r be greater than 1?

No. By definition, Pearson’s r is always between -1 and +1.

What if one variable never changes?

If all X values or all Y values are identical, correlation is undefined because standard deviation is zero. This calculator reports that as an error.

What is r²?

r² is the coefficient of determination. It is the proportion of variance in one variable that is linearly associated with the other. For example, r = 0.60 gives r² = 0.36, meaning 36% shared linear variance.

Is a negative correlation bad?

Not necessarily. A negative r simply means one variable tends to increase while the other decreases.

🔗 Related Calculators