Advertisement

r Correlation Calculator

Calculate Pearson correlation r between two datasets, with strength interpretation and scatter context.

Pearson r — Strength of Linear Co-Movement, Not Causation

BrainyCalculators editorial insight — unique to this tool

Pearson correlation (r) runs from −1 to +1 and measures linear co-movement — ice cream sales and drowning deaths correlate positively in summer because both rise with temperature, not because one causes the other. Marketing teams check r between ad spend and revenue; r = 0.85 suggests strong linear linkage worth modeling. Correlation is symmetric and unitless; it does not tell you slope or predicted values.

When to use this calculator

Use correlation to screen whether a linear relationship is worth modeling. When you need the prediction equation (y = mx + b), use Regression instead.

Reference Value Context
|r| 0.0–0.3 Weak May be noise
|r| 0.3–0.7 Moderate Explore further
|r| 0.7–1.0 Strong Regression candidate
Variance explained From regression output

Not what you need? Correlation ≠ causation. For predicting y from x with an equation, use Regression. For single-variable spread, use Standard Deviation.

Need a prediction line, not just r?

This page reports correlation. For slope, intercept, and predicted y from a dataset, use the Regression Calculator →

What is Correlation?

Correlation measures how two numeric variables move together, typically Pearson r from −1 to +1. It describes association strength and direction, not causation.

Use this page when you want r and interpretation across paired lists. It does not output a prediction equation; for that, use Linear Regression.

For slope between two fixed points on a line, use the Slope Calculator. For probability of events, use the Probability Calculator.

Pearson Correlation Formula

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

Where n is the number of pairs, Σxy is the sum of products, Σx and Σy are the sums of each variable. The result r ranges from −1 (perfect negative) to +1 (perfect positive).

How to Calculate Pearson r

  1. 1
    Enter Paired Data
    Each X value corresponds to a Y value at the same position. Both lists must be the same length.
  2. 2
    Compute Sums
    Calculate Σx, Σy, Σx², Σy², and Σxy from your data pairs.
  3. 3
    Apply the Formula
    Substitute sums into the Pearson r formula to get a value between −1 and +1.
  4. 4
    Interpret r and R²
    r tells the direction and strength of the linear relationship. R² tells what proportion of variance in Y is explained by X.

Worked Example

X = 1, 2, 3, 4, 5 — Y = 2, 4, 5, 4, 5

n=5 | Σx=15 | Σy=20 | Σxy=64 | Σx²=55 | Σy²=86
r = [5×64 − 15×20] / √([5×55−15²] × [5×86−20²])
r = [320 − 300] / √([275−225] × [430−400])
r = 20 / √(50 × 30) = 20 / √1500
r = 20 / 38.73 = 0.8165 (strong positive)

How the Correlation Calculator Works

Formula, assumptions, and calculation steps for this statistics tool.

Formula Used

r = covariance(x, y) / (standard deviation x * standard deviation y)

Methodology

Statistics calculators organize sample data, apply the selected descriptive or inferential formula, and report the statistic with interpretation.

Calculation Steps

  1. Enter raw values or summary statistics.
  2. Clean separators and count the sample size.
  3. Apply the relevant statistic, probability, or confidence formula.
  4. Display the result with context such as degrees of freedom, percentile, or strength.

Assumptions and Limits

  • Samples should be representative of the population being studied.
  • Normality or independence assumptions apply only where the selected method requires them.
  • Rounded results may differ slightly from spreadsheet software.

Frequently Asked Questions

Correlation measures the strength and direction of a linear relationship between two variables. The Pearson r coefficient ranges from −1 (perfect negative) to +1 (perfect positive), with 0 indicating no linear relationship.

An r of 0.8 indicates a strong positive correlation — as X increases, Y tends to increase substantially. About 64% of the variance in Y is explained by X (R² = 0.64).

Correlation shows that two variables move together, but does not prove one causes the other. A third hidden variable (confound) may drive both. Always be cautious about drawing causal conclusions from correlation alone.

R² is the square of the Pearson r and represents the proportion of variance in one variable explained by the other. An R² of 0.7 means 70% of the variation in Y is accounted for by its linear relationship with X.

Real-World Applications

💹
Portfolio & Investment Analysis
Portfolio managers calculate pairwise correlations between asset returns to construct diversified portfolios — assets with low or negative r provide diversification benefits that reduce portfolio variance without reducing expected return.
🔬
Medical & Clinical Research
Researchers correlate biomarkers with health outcomes — e.g. BMI with cardiovascular risk, or HbA1c with diabetes complications. High r values support further causal investigation through clinical trials.
📊
Marketing Attribution
Marketing analysts correlate advertising spend by channel with sales — identifying that TV spend has r = 0.6 with sales while digital display has r = 0.2, suggesting TV has stronger linear association with the measured outcome.
🌡️
Climate & Environmental Science
Climate scientists calculate correlations between CO₂ concentration and global mean temperature, sea level, or ice sheet extent — using r to quantify the strength of observed relationships before applying more complex causal models.
🏫
Educational Research
Education researchers correlate student outcomes (test scores, graduation rates) with inputs (class size, teacher experience, socioeconomic background) to identify the factors most strongly associated with educational attainment.
🤖
Machine Learning Feature Selection
Data scientists use correlation matrices to identify highly correlated features (r > 0.9) before model training — removing redundant predictors that add computational cost without improving model performance, and screening for target variable relationships.

Common Mistakes

1
Concluding Causation from Correlation
A high Pearson r indicates a strong linear association between two variables — it says nothing about the causal direction or mechanism. Ice cream sales and drowning deaths correlate highly because both are driven by summer heat. Always consider confounders and apply causal reasoning before drawing directional conclusions.
2
Using Pearson r for Non-Linear Relationships
Pearson r only measures linear association. Two variables with a strong U-shaped or logarithmic relationship (e.g. coffee consumption and productivity, dose-response curves) may have r ≈ 0 even if they are strongly associated. Always plot your data to inspect the relationship visually before interpreting r.
3
Ignoring Outliers
A single extreme outlier can dramatically inflate or deflate Pearson r. For n = 10 data pairs, one outlier can shift r from 0.1 to 0.7 — creating a false impression of strong correlation. Always inspect a scatter plot and consider Spearman's rank correlation (which is outlier-robust) for small or skewed datasets.
4
Treating r = 0 as Proof of Independence
r = 0 only indicates no linear relationship. A perfectly quadratic relationship (e.g. y = x²) has Pearson r = 0 even though y is completely determined by x. Use r = 0 to rule out linear association, not to conclude that variables are statistically independent.
5
Not Testing Statistical Significance of r
A small sample can produce a high r by chance. With n = 5 data pairs, r = 0.7 is not statistically significant at α = 0.05. Always test the significance of r using the t-test (t = r√(n−2)/√(1−r²)) before concluding that a linear relationship exists — especially with small samples.

Pearson r Interpretation Guide

r Value Strength R² (Variance Explained) Example Application
0.90–1.00 Very strong positive 81–100% Measuring the same construct with two methods
0.70–0.89 Strong positive 49–79% Height vs weight across a population
0.50–0.69 Moderate positive 25–48% Advertising spend vs sales revenue
0.30–0.49 Weak positive 9–24% IQ vs job performance (typical)
0.00–0.29 Negligible 0–8% Shoe size vs academic ability
Negative Inverse Varies Exercise frequency vs resting heart rate

References

  1. Pearson, K. Notes on Regression and Inheritance in the Case of Two Parents. Proceedings of the Royal Society, 1895.
  2. Cohen, J. Statistical Power Analysis for the Behavioral Sciences, 2nd ed. Lawrence Erlbaum, 1988.
  3. Anscombe, F. J. Graphs in Statistical Analysis. The American Statistician, 1973.
  4. Mukaka, M. M. A Guide to Appropriate Use of Correlation Coefficient in Medical Research. Malawi Medical Journal, 2012.
  5. Vigen, T. Spurious Correlations. Hachette Books, 2015.