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
- Paste X and Y values.
- Read r, ρ and their p-values.
- Use the interpretation to describe strength and direction.
What you enter
- Paired X and Y values (n ≥ 3)
What you get
- Pearson r and p
- Spearman ρ and p
- r² and 95 % CI
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
- Correlation does not imply causation.
- Pearson is sensitive to outliers and assumes linearity; inspect a scatter plot.
References
Related reading
- Which R-Value Represents the Strongest Correlation?
- Common Mistakes in Correlation and Regression Analysis
- Correlation Analysis in SPSS: Pearson and Spearman
- Correlational Research
More Statistics
- Standard Deviation Calculator
- Mean, Median & Mode Calculator
- Variance Calculator
- Z-Score Calculator
- P-Value Calculator
- Confidence Interval Calculator
- T-Test Calculator
- Chi-Square Test Calculator
- Linear Regression Calculator
- Normal Distribution Calculator
- Probability Calculator
- Binomial Distribution Calculator
All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.