Use this calculator to find R² (coefficient of determination) in three different ways: from correlation (r), from paired x,y data (simple linear regression), or from actual vs predicted values.
1) From correlation coefficient (r)
2) From x and y data points
The tool fits a simple linear model: y = b₀ + b₁x, then computes R².
3) From actual and predicted values
What is R-squared?
R-squared (written as R²) is a statistical measure that tells you how much of the variation in an outcome variable is explained by a model. In plain English, it answers the question: “How well does my model account for what I observe?”
If your model has an R² of 0.75, it means about 75% of the variance in the dependent variable is explained by your predictors, while the remaining 25% is due to other factors, noise, or model limitations.
How to interpret R² values
- R² = 1.00: perfect fit (rare in real-world data)
- R² around 0.70 to 0.90: strong explanatory power in many fields
- R² around 0.30 to 0.60: moderate explanatory power
- R² near 0: little to no explanatory power
Interpretation depends heavily on context. In physics, a lower R² might be disappointing; in behavioral science or finance, even moderate R² values can be useful.
Key formulas used in this calculator
When you know correlation (r)
For simple linear regression with one predictor:
R² = r²
When you have actual and predicted values
The calculator uses:
- SSE (sum of squared errors): Σ(actual − predicted)²
- SST (total sum of squares): Σ(actual − mean(actual))²
- R² = 1 − SSE/SST
This is the standard definition used in regression diagnostics.
Why R² can be misleading
1) A high R² does not prove causation
Two variables can move together strongly without one causing the other. Always combine statistical fit with domain knowledge and sound experimental design.
2) Adding variables can inflate R²
In multiple regression, adding predictors almost always increases R², even if the new variables are not meaningful. For model comparison, use adjusted R², AIC, BIC, or cross-validation.
3) R² can be negative
When evaluating a model with the formula 1 − SSE/SST (especially on out-of-sample data), R² can be negative. That means your model performs worse than simply predicting the mean every time.
Best practices for model quality
- Check residual plots for nonlinearity and heteroscedasticity.
- Report MAE or RMSE alongside R² for error magnitude.
- Use train/test split or cross-validation to assess generalization.
- Prefer a simpler, interpretable model when performance is similar.
Quick example
Suppose your model predicts house prices and returns R² = 0.81. That means 81% of the variance in observed house prices is explained by the model. This is typically strong, but still leaves 19% unexplained due to market shifts, neighborhood effects not in the model, and random noise.
Use the calculator above to test your own dataset instantly.