R-Squared Calculator
Measures how closely predictions match the actual values.
Share sends a link that reopens these numbers. Copy details pastes the full breakdown as a list.
The formula
R² = 1 − SS residual ÷ SS total adjusted R² = 1 − (1 − R²)(n − 1) ÷ (n − k − 1)
For a straight-line fit with an intercept, R² equals the square of Pearson’s r. Adjusted R² penalises extra predictors.
What to watch out for
Adding a predictor can never lower plain R² for a fitted model, even if the predictor is useless. Adjusted R² accounts for that, and is the better figure for comparing models.
Frequently Asked Questions
Can R² be negative?
Yes, when predictions are worse than the mean, typically on new data or with a model forced through a point.
What is a good R²?
It depends on the subject. Predicting people’s behaviour rarely gets anywhere near a calibration curve in a laboratory.
What is a worked example?
For actual values 3, 5, 7 and predictions 3, 5, 8, R² is 0.875.