Coefficient of Determination (R²) Calculator
The coefficient of determination R² tells you what percentage of the total variability in the dependent variable is explained by the model. The total sum of squares SST splits into an explained (regression) part SSR and an unexplained (residual) part SSE; R² is the ratio SSR/SST and takes values between 0 and 1. A value such as 0.72 means that 72% of the variability in Y is explained by the predictors.
This calculator computes R² from your data, the adjusted R² that penalizes the number of predictors, and the standard error of the estimate (SEE); it lays out the sum-of-squares decomposition and the complete regression ANOVA table (SS, df, MS, F, p). For single-predictor models it also links R² numerically to the correlation coefficient r, so you can see how the two measures convert into one another.
Coefficient of Determination Formulas
Total: SST = Σ(yᵢ − ȳ)² Regression: SSR = Σ(ŷᵢ − ȳ)² Residual: SSE = Σ(yᵢ − ŷᵢ)² Decomposition: SST = SSR + SSE Determination: R² = SSR / SST = 1 − SSE / SST Adjusted: R²_adj = 1 − (1 − R²)·(n − 1)/(n − k − 1) Std. error: SEE = √[ SSE / (n − k − 1) ] ANOVA: F = (SSR / k) / (SSE / (n − k − 1)) , df = k , n − k − 1 One predictor: R² = r² (r: the Pearson correlation coefficient) Several: R = √R² = corr(y, ŷ)
The identity SST = SSR + SSE holds only for least-squares models that include an intercept. In regression through the origin the decomposition breaks down and R² is defined differently; the no-intercept R² values reported by software are not comparable.
How to Calculate
- Paste the observed values of the dependent variable (Y) into the upper box.
- Write one predictor per line in the predictor box; a single line gives the R² of a simple regression, several lines give the multiple coefficient of determination.
- Choose the significance level; the decision of the F test is made against it.
- Study the SST = SSR + SSE decomposition and the pie chart to see the explained share.
- Compare R² with the adjusted R²: a wide gap means the model carries too many predictors for its number of observations.
- Use the F and p values in the ANOVA table to decide whether the model is significant as a whole, and report SEE as the practical size of the prediction error.
Worked Examples
One predictor: study hours and exam score
Of the SST of 1,049.67, the model explains 425.90 and leaves 623.77 as residual: R² = 0.4057 (40.6%), the adjusted R² is 0.3463, and SEE = 7.8979. With F(1, 10) = 6.828 and p = 0.026 the model is significant; because there is a single predictor, r = 0.6370 and the identity r² = R² holds.
Coefficient of determination (R²): 0.4057 (40.6%) · Adjusted R²: 0.3463 · Gap between R² and adjusted R²: 0.0594
Two predictors: R² rises, but adjusted R² is the real criterion
Adding absences as a second predictor lets the model explain 97.2% of the variability in Y: R² = 0.9717, adjusted R² = 0.9655, and the gap between them is only 0.0063 — since both rise together, the increase reflects a genuine contribution. The residual sum of squares falls to 29.66 and the standard error of the estimate to 1.8152; the model is significant with F(2, 9) = 154.780 at p < 0.001, and the multiple correlation is R = √R² = 0.9858.
Coefficient of determination (R²): 0.9717 (97.2%) · Adjusted R²: 0.9655 · Gap between R² and adjusted R²: 0.0063
Inflated R²: small sample, many predictors
When four predictors that have no real relationship with Y are fitted to 7 observations, R² = 0.5000 (50.0%) looks reasonable: 41.71 of the SST of 83.43 appears explained purely because of the number of predictors. The adjusted R², however, drops to -0.5001, and the gap of 1.0001 shows the size of the penalty. With only 2 residual degrees of freedom left, F(4, 2) = 0.500 and p = 0.750, so the model is not even significant: a high R² alone does not mean a good model.
Coefficient of determination (R²): 0.5000 (50.0%) · Adjusted R²: -0.5001 · Gap between R² and adjusted R²: 1.0001