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
- x̄ 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.
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):
- NIST — Weights and measures — nist.gov · Accessed 2026-01-19
https://www.nist.gov/pml/weights-and-measures - FTC — Consumer advice — consumer.ftc.gov · Accessed 2026-01-19
https://consumer.ftc.gov/
Changelog
Version: 0.1.0-draft
Last code update: 2026-01-19
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.