Coefficient of Determination Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter the residual sum of squares, the total sum of squares, the number of observations and the number of predictors of your regression.
Result
R² = 1 − SS_res ÷ SS_tot
Adjusted R²
- Multiple correlation R = √R²
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Residual sum of squares (SS_res): enter 0 or more.
- Total sum of squares (SS_tot): enter 0 or more.
- Number of observations (n): enter 2 or more.
- Number of predictors (k): enter 1 or more.
- Read the result: R² = 1 − SS_res ÷ SS_tot; the panel also shows Adjusted R² and Multiple correlation R = √R².
How this calculator works
R² = 1 − SS_res ÷ SS_tot, where SS_res = Σ(y − ŷ)² is the residual sum of squares and SS_tot = Σ(y − ȳ)² the total sum of squares. It is the share of the variance of y explained by the model.
Adjusted R² = 1 − (1 − R²)(n − 1) ÷ (n − k − 1) penalizes extra predictors, so it only rises when a new predictor improves the fit more than chance would. For a simple linear regression, R² is the square of the correlation r.
The formula
| Symbol | Meaning |
|---|---|
| Residual sum of squares (SS_res) | |
| Total sum of squares (SS_tot) | |
| R² = 1 − SS_res ÷ SS_tot |
Worked example
| Residual sum of squares (SS_res) | 120 |
|---|---|
| Total sum of squares (SS_tot) | 480 |
| Number of observations (n) | 30 |
| Number of predictors (k) | 2 |
| Adjusted R² | 0.7315 |
|---|---|
| Multiple correlation R = √R² | 0.866 |
R² = 1 − SS_res ÷ SS_tot 0.75
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What does R² = 0.75 mean?
The model explains 75% of the variation in the outcome; 25% is left in the residuals.
Can adjusted R² be negative?
Yes, when the model explains less than chance would with that many predictors.