Adjusted R-Squared Calculator Formula

Understand the math behind the adjusted r-squared calculator. Each variable explained with a worked example.

Formulas Used

Adjusted R²

adj_r2 = 1 - (1 - r_squared) * (n - 1) / (n - p - 1)

Adjustment Penalty

penalty = r_squared - (1 - (1 - r_squared) * (n - 1) / (n - p - 1))

Variables

VariableDescriptionDefault
r_squared0.85
nSample Size (n)50
pNumber of Predictors (p)3

How It Works

Adjusted R-Squared

Adjusted R² modifies R² to penalize for additional predictors that do not improve the model. Unlike R², it can decrease when unhelpful variables are added.

Formula

Adj R² = 1 - (1 - R²) × (n - 1) / (n - p - 1)

where n is the sample size and p is the number of predictors. Adjusted R² is always less than or equal to R². The difference grows larger with more predictors relative to sample size.

Worked Example

R² = 0.85, n = 50, p = 3 predictors.

r_squared = 0.85n = 50p = 3
  1. 01Adj R² = 1 - (1 - 0.85) × 49/46
  2. 02Adj R² = 1 - 0.15 × 1.0652 = 1 - 0.1598 = 0.8402
  3. 03Penalty = 0.85 - 0.84 = 0.01

Ready to run the numbers?

Open Adjusted R-Squared Calculator