Pearson r & Spearman Rank Correlation

Pearson Correlation Coefficient (r) & R² Solver

Calculate Pearson product-moment correlation (r), coefficient of determination (R²), and sample covariance with zero-variance detection.

Mean X: 22.50

Mean Y: 30.83

Correlation Metrics (n = {n} pairs) Client-Side Execution
Pearson r

0.996

Scale: -1.0 to +1.0
R² (Variance Explained)

99.1%

R² = 0.991
Sample Covariance

111.50

Cov(X, Y)
Relationship Strength

Very Strong Correlation

At a Glance

Category
Statistics
Best For
Students and analysts testing whether two variables move together
Privacy
100% in your browser: nothing you enter is uploaded
Time Required
Under a minute
Cost
Free
Updated
November 2026

Quick Overview

What This Tool Does

Pairs each X with its Y, measures how they vary together relative to their individual spread, and reports r, R² and the covariance.

Who Should Use It

Statistics students, researchers and analysts exploring data.

When to Use It

When asking whether study time relates to grades, ad spend to sales, or any two measured variables.

Why It Is Useful

r summarizes the strength and direction of a linear relationship in one number between −1 and 1.

Key Features & Capabilities

r and R²

Direction and strength, and the share of variance explained.

Sample covariance

How the variables vary together.

Strength label

A plain-language description of the correlation.

How to Use This Tool

1

Enter X values

Type the first variable separated by commas. Tip: Keep the order of the pairs.

2

Enter Y values

Type the second variable with the same number of values. Tip: If lengths differ, extra values are ignored.

3

Read r

Close to 1 is a strong positive link; close to −1 a strong negative link; near 0 little linear link. Tip: Always plot the data too.

4

Use R²

R² is the share of variation in Y explained by X. Tip: Correlation is not causation.

Worked Real-World Example

Six pairs

X = 10, 15, 20, 25, 30, 35 and Y = 15, 22, 28, 32, 40, 48.

Sample Inputs
Variable X10, 15, 20, 25, 30, 35
Variable Y15, 22, 28, 32, 40, 48
Pearson r0.9955 (R² = 0.9910)
Calculation Breakdown
Means: 22.5 and 30.833 = x̄ = 22.5; ȳ = 30.833
Sums of products and squares: Σdx·dy, Σdx², Σdy² = 557.50; 437.50; 716.83
Pearson r: 557.50 ÷ √(437.50 × 716.83) = 0.9955
R² and covariance: r²; 557.50 ÷ 5 = R² = 0.9910; covariance = 111.50
About 99.1% of the variation in Y is explained by a straight-line relationship with X. The relationship is very strong and positive.

How It Works (Math & Calculation Logic)

Means of X and Y are computed. For each pair the deviations are multiplied; r = Σ(dx × dy) ÷ √(Σdx² × Σdy²). R² = r². Sample covariance = Σ(dx × dy) ÷ (n − 1). Needs at least two pairs and non-zero variance in both variables.

Formula / Algorithmr = Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²)
Variable & Logic Definitions
x, yPaired values - Observations of two variables
x̄, ȳMeans - Averages of X and Y
nPairs - Number of observations (count)

How to Interpret Your Results

Typical Benchmarks

By a common convention |r| above 0.8 is very strong, 0.5 to 0.8 moderate and below 0.5 weak.

Evaluating Your Output

These labels vary by field; in some sciences r = 0.5 is strong.

Recommended Next Action

Plot the data and check for outliers or curves before trusting r.

Frequently Asked Questions

What does the correlation coefficient tell me?
The direction and strength of a linear relationship between two variables, from −1 to 1.
What is a good correlation?
It depends on the field; above 0.8 is generally strong.
What is R²?
The proportion of variance in Y explained by the linear relationship with X.
Does correlation mean causation?
No. Other factors may drive both variables.
Why is r undefined?
If all X or all Y values are identical there is no variation to correlate.

Complementary QuickForma Utilities

Mathematics & Statistics

Descriptive Statistics Calculator

Calculate mean, median, mode, range, variance, standard deviation, quartiles, IQR, and MAD from data.

Open Tool
Mathematics & Statistics

Z-Score Calculator

Calculate standard score Z = (X - mu) / sigma and percentile rank under standard normal curve.

Open Tool
Mathematics & Statistics

Hypothesis Test Calculator

Calculate test statistic Z = (xbar - mu) / (s / sqrt(n)), two-tailed p-value, and significance decision.

Open Tool
Mathematics & Statistics

Simple Linear Regression & R² Line of Best Fit

Calculates regression line equation ŷ = β₀ + β₁ x, correlation r, and coefficient of determination R².

Open Tool
Mathematics & Statistics

Sample & Population Standard Deviation Solver

Solves sample (s) and population (σ) standard deviation with variance steps.

Open Tool
Mathematics & Statistics

IQR, Box Plot Quartiles & Outlier Detector

Solves Q1, Q2 (Median), Q3, Interquartile Range (IQR), and identifies mild/extreme outliers (1.5 × IQR).

Open Tool
Science & Engineering

Radioactive & Chemical Half-Life Decay Solver

Solves remaining quantity N(t) = N₀ (1/2)^(t/t½), decay constant λ, and elapsed time.

Open Tool
Mathematics & Statistics

Polar vs Rectangular Complex Number Calculator

Online client-side Polar vs Rectangular Complex Number Calculator tool.

Open Tool
Mathematics & Statistics

Factorial n! & Permutation Formula Solver

Online client-side Factorial n! & Permutation Formula Solver tool.

Open Tool
Mathematics & Statistics

Logarithm Base-b Conversion Solver

Online client-side Logarithm Base-b Conversion Solver tool.

Open Tool
Mathematics & Statistics

Conic Sections: Ellipse & Hyperbola Solver

Online client-side Conic Sections: Ellipse & Hyperbola Solver tool.

Open Tool
Mathematics & Statistics

Partial Fraction Decomposition Solver

Online client-side Partial Fraction Decomposition Solver tool.

Open Tool