Coefficient of Determination (R-squared) Calculator

Enter your values in the Coefficient of Determination (R-Squared) Calculator. Each value should be separated by a comma. Example is included below.

X Values (each value separated by comma): Y Values (each value separated by comma):

How to use the Coefficient of Determination Calculator

Let's say that you'd like to calculate the Coefficient of Determination using the values below:

  • The X values are: 2, 7, 12
  • The Y values are: 4, 11, 15

To start, enter the values in the Coefficient of Determination calculator:

Coefficient of Determination (R-squared) Calculator

Then, click on the button to execute the calculations. You'll then get the R-Squared of 0.9758 and the Adjusted R-Squared of 0.9516:

Coefficient of Determination Calculator

How to Manually Calculate the Coefficient of Determination

You may use the following formula to manually calculate the Coefficient of Determination (R-Squared):

                                [ Σ [(xi - x̅) * (yi - ȳ)]  ]2
R-Squared (R2) =  [Σ(xi - x̅)2 ]*[Σ(yi - ȳ)2]

Where:

  • x̅ = Average of all the x values
  • ȳ = Average of all the y values

For example, let's say that you have the following values:

  • The X values are: 2, 7, 12
  • The Y values are: 4, 11, 15

To start, calculate the averages:

                             2 + 7 + 12 
Average ( x̅ )  =           3         =  7          
                             4 + 11 + 15 
Average ( ȳ )  =           3           = 10          

Finally, calculate the R-Squared as follows:

          [    [(2 - 7) * (4 - 10)] + [(7 - 7) * (11 - 10)] + [(12 - 7) * (15 - 10)]    ]2
R2  =  [(2 - 7)2 + (7 - 7)2 + (12 - 7)2 ]*[(4 - 10)2 + (11 - 10)2 + (15 - 10)2 ]  =  0.9758   

You'll then get the R2 of 0.9758

Calculate the Adjusted R-Squared

You may use this formula to calculate the Adjusted R-Squared:

                                                   (n-1)*(1 - R2)
Adjusted R-Squared = 1 - (n - k -1)

Where:

  • R2 = R-Squared
  • n = Sample Size
  • k = Number of independent variables used in the regression model (for simple linear regression k = 1)

For our example, the Adjusted R-Squared is:

                                                  (3-1)*(1 - 0.9758)
Adjusted R-Squared = 1 - (3 - 1 - 1) = 0.9516

The Adjusted R-Squared is therefore 0.9516.