Adjusted R-Squared Calculator
Calculate Adjusted R-squared, which penalizes R² for the number of predictors used in the model.
Inputs
R² computed from actual and predicted values.
Number of independent variables/features used in the model.
Adjusted R²
0.8420
Degrees of Freedom (n − k − 1)
94
Step by step
Degrees of freedom denominator: n − k − 1
100 − 5 − 1
= 94
Adjusted R²: 1 − [(1 − R²)(n − 1) / (n − k − 1)]
1 − [(1 − 0.85) × (100 − 1) ÷ 94]
= 0.8420
How it works
Adjusted R² corrects R² for the number of predictors in the model: Adj_R² = 1 − [(1 − R²)(n − 1) / (n − k − 1)], where n is the sample size and k is the number of predictors. Plain R² can only increase (or stay the same) as more predictors are added, even useless ones, which encourages overfitting. Adjusted R² applies a penalty that grows with k, so it can decrease if a new predictor doesn't improve the model enough to justify the added complexity — making it a fairer metric for comparing models with different numbers of features.
Formula
Adj_R^2 = 1 - ((1 - R^2) * (n - 1)) / (n - k - 1)
- R^2
- Coefficient of determination
- n
- Number of samples
- k
- Number of predictors
Frequently Asked Questions
Why does R² always increase (or stay the same) when adding predictors?
Adding any predictor, even a random and meaningless one, gives the model more flexibility to fit the training data's specific noise, which can only reduce or maintain the residual sum of squares — never increase it — so R² is biased toward preferring more complex models.
Can Adjusted R² be lower than R²?
Yes, and it always will be lower than or equal to R² whenever k > 0; if a predictor doesn't add enough explanatory power to offset the complexity penalty, adjusted R² will decrease even as raw R² stays flat or rises slightly.
How do I choose between multiple models using this metric?
Prefer the model with the highest Adjusted R² among candidates with different numbers of predictors, since it accounts for the tradeoff between explanatory power and model complexity, unlike raw R² which always favors more predictors.