R-Squared Calculator

R-squared measures how well a model explains the variance in your data. This calculator computes R² using two methods: from actual vs. predicted values, or directly from correlation coefficient. Higher R² indicates a better model fit. R² is essential for evaluating regression models, comparing models, and understanding how much of the data variation your model explains.

0.995
0.993

R-squared formulas

R² = 1 - (SS_res / SS_tot)
SS_res = Σ(actual - predicted)²
SS_tot = Σ(actual - mean(actual))²
Adjusted R² = 1 - [(1-R²)(n-1)/(n-k-1)]
Where n = sample size, k = number of predictors

Understanding R-squared

  • Perfect fit: R² = 1. Predicted values match actual perfectly.
  • No fit: R² = 0. Model explains none of the variance.
  • Adjusted R²: Penalizes complex models. Use when comparing models with different numbers of predictors.
  • Context matters: R² = 0.7 is good for social science, but maybe poor for physics.

R-squared: frequently asked questions

What is R-squared?

R-squared (R²) is the coefficient of determination, measuring the proportion of variance in the dependent variable explained by the independent variable(s). Range: 0 to 1. Higher is better.

How do I interpret R-squared?

R² = 0.8 means 80% of variance is explained by the model, 20% is unexplained. In general: 0.7+ is strong, 0.5-0.7 is moderate, 0.3-0.5 is weak, <0.3 is very weak.

What is the relationship between R² and correlation?

For simple linear regression: R² = r², where r is Pearson correlation. If r = 0.9, then R² = 0.81, meaning 81% of variance is explained.

Can I have R² > 1?

With least-squares regression, no. R² is always between 0 and 1. However, some alternative models can have R² > 1 or negative.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.