Statistics Calculator: Correlation Coefficient

Use this calculator to calculate the correlation coefficient from a set of bivariate data.

Correlation Coefficient Calculator


This calculator can be used to calculate the sample correlation coefficient.

Enter the x,y values in the box above. You may enter data in one of the following two formats:

  • Each xi,yi couple on separate lines:


  • All xi values in the first line and all yi values in the second line:


Press the "Submit Data" button to perform the calculation. The correlation coefficient will be displayed if the calculation is successful. To clear the calculator and enter new data, press "Reset".

What is the correlation coefficient

The correlation coefficient, or Pearson product-moment correlation coefficient (PMCC) is a numerical value between -1 and 1 that expresses the strength of the linear relationship between two variables.When r is closer to 1 it indicates a strong positive relationship. A value of 0 indicates that there is no relationship. Values close to -1 signal a strong negative relationship between the two variables. You may use the linear regression calculator to visualize this relationship on a graph.

Correlation coefficient formula

There are many formulas to calculate the correlation coefficient (all yielding the same result). This calculator uses the following:

$ r ={\frac{n \sum_{i=1}^n x_i y_i - \sum_{i=1}^n x_i \sum_{i=1}^n y_i}{\sqrt {(n \sum_{i=1}^n x_i^2 - (\sum_{i=1}^n x_i)^2)(n \sum_{i=1}^n y_i^2 - (\sum_{i=1}^n y_i)^2)} } $

where n is the total number of samples, xi (x1, x2, ... ,xn) are the x values and yi are the y values.