Correlation Coefficient Calculator (Pearson’s r)

Calculate the Pearson correlation coefficient (r) between two variables. Paste your X and Y data, get r, r², sample size, regression line, and an interpretation of the strength and direction of the relationship.

Full original guide (expanded)

Correlation Coefficient Calculator (Pearson’s r)

Paste two columns of numbers to compute Pearson’s r, r², sample size, and the best-fit line for linear association.

Enter your data

Separate values with comma, space, semicolon, or line break. X and Y must have the same length.

Results

Pearson r

r² (explained)

n (pairs)

Direction

Least-squares regression line (Y on X)

Interpretation: for every 1-unit increase in X, Y changes by the slope.

Correlation coefficient formula

This calculator uses the sample Pearson correlation coefficient:

r = Σ[(xᵢ − x̄)(yᵢ − ȳ)] / √( Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)² )

where:

  • xᵢ, yᵢ are paired observations
  • is the mean of X and ȳ is the mean of Y
  • r ranges from −1 to +1

How to interpret r

This is a common guideline (not a strict rule):

  • |r| < 0.3 → weak / negligible linear relationship
  • 0.3 ≤ |r| < 0.5 → moderate linear relationship
  • |r| ≥ 0.5 → strong linear relationship

Keep in mind: correlation ≠ causation. A high r does not prove that X causes Y.


Audit: Complete
Formula (LaTeX) + variables + units
This section shows the formulas used by the calculator engine, plus variable definitions and units.
Formula (extracted LaTeX)
\[','\\]
','\
Formula (extracted text)
r = Σ[(xᵢ − x̄)(yᵢ − ȳ)] / √( Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)² )
Variables and units
  • No variables provided in audit spec.
Sources (authoritative):
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
0.1.0-draft · 2026-01-19
  • Initial audit spec draft generated from HTML extraction (review required).
  • Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
  • Confirm sources are authoritative and relevant to the calculator methodology.
Verified by Ugo Candido on 2026-01-19
Profile · LinkedIn
Formulas

(Formulas preserved from original page content, if present.)

Version 0.1.0-draft
Citations

Add authoritative sources relevant to this calculator (standards bodies, manuals, official docs).

Changelog
  • 0.1.0-draft — 2026-01-19: Initial draft (review required).