Correlation Coefficient Calculator

Calculate Pearson and Spearman correlation coefficients to measure the strength and direction of relationships between variables.

Data Input

Enter numeric values separated by commas, spaces, or line breaks

Enter numeric values separated by commas, spaces, or line breaks

Correlation Coefficient Formulas

Pearson Correlation Coefficient

The formula for Pearson's correlation coefficient is:

r=∑i=1n(xi−xˉ)(yi−yˉ)∑i=1n(xi−xˉ)2∑i=1n(yi−yˉ)2r = \frac{\sum_{i=1}^{n} (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n} (x_i - \bar{x})^2 \sum_{i=1}^{n} (y_i - \bar{y})^2}}

Where:

  • rr = Pearson correlation coefficient
  • xi,yix_i, y_i = Individual data points
  • xˉ,yˉ\bar{x}, \bar{y} = Means of the x and y variables
  • nn = Number of data points

Spearman Rank Correlation

Spearman's correlation assesses monotonic relationships by ranking the data and applying Pearson's formula to the ranks:

΁=∑i=1n(R(xi)−R(x)ˉ)(R(yi)−R(y)ˉ)∑i=1n(R(xi)−R(x)ˉ)2∑i=1n(R(yi)−R(y)ˉ)2\rho = \frac{\sum_{i=1}^{n} (R(x_i) - \bar{R(x)})(R(y_i) - \bar{R(y)})}{\sqrt{\sum_{i=1}^{n} (R(x_i) - \bar{R(x)})^2 \sum_{i=1}^{n} (R(y_i) - \bar{R(y)})^2}}

Where:

  • ΁\rho = Spearman rank correlation coefficient
  • R(xi),R(yi)R(x_i), R(y_i) = Ranks of the original data points
  • R(x)ˉ,R(y)ˉ\bar{R(x)}, \bar{R(y)} = Means of the ranks

Interpretation Guide

Coefficient ValueInterpretation
Âą0.00 to Âą0.10Negligible correlation
Âą0.10 to Âą0.30Weak correlation
Âą0.30 to Âą0.50Moderate correlation
Âą0.50 to Âą0.70Strong correlation
Âą0.70 to Âą1.00Very strong correlation