Correlation Coefficient Calculator

Pearson r and Spearman ρ between two variables with p-values, r², a 95 % confidence interval for r and a plain-language interpretation of strength and direction.

The Correlation Coefficient Calculator computes Pearson's r = Σ(x − x̄)(y − ȳ) / √[Σ(x − x̄)² Σ(y − ȳ)²] for linear association and Spearman's rank correlation ρ for monotonic association, each with a t-based p-value; it also reports r² and a Fisher-z confidence interval for r.

Free, runs in your browser. Nothing you enter is uploaded.

How to use it

  1. Paste X and Y values.
  2. Read r, ρ and their p-values.
  3. Use the interpretation to describe strength and direction.

What you enter

What you get

Formula

r = Sxy / √(Sxx · Syy)   |   t = r √[(n − 2)/(1 − r²)],  df = n − 2

r ranges from −1 (perfect negative) to +1 (perfect positive). Spearman applies the same formula to ranks, so it is robust to outliers and non-linear but monotonic relationships.

Worked example

Input: X 1…10, Y 2.1 3.9 6.2 7.8 10.1 12.2 13.8 16.1 18.0 20.3

Result: r = 0.9994, p < 0.0001, r² = 0.999

An almost perfect positive linear relationship.

Questions

Pearson or Spearman?

Pearson for continuous, roughly normal data with a linear relationship; Spearman for ranks, ordinal scores, outliers or curved-but-monotonic relationships.

What is a strong correlation?

Conventionally |r| above 0.7 is strong, 0.5–0.7 moderate, 0.3–0.5 weak; the thresholds depend on the field.

Limitations

References

Related reading

More Statistics

All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.