Find R², the share of variation a model explains, from raw X and Y data, from observed and predicted values, or straight from a correlation r, with adjusted R² and the sums of squares.
R² = 1 − SSE ÷ SST
The coefficient of determination, R², is the share of the variation in an outcome that a model accounts for. R² = 0.8 means the model's predictions capture 80% of how much the outcome varies; the other 20% is left unexplained.
It compares the model's squared errors with those of the simplest possible prediction, the mean. A model no better than the mean scores 0; a perfect fit scores 1. A model that's worse than the mean can even score below 0.
For a straight-line fit with one predictor, R² is just the square of Pearson's r. With several predictors, adjusted R² is the fairer figure, because plain R² never goes down when you add variables, even useless ones.
As given in the NIST/SEMATECH e-Handbook, section 4.4.4, and OpenStax Introductory Statistics, section 12.3. See Sources.
Ad spend accounts for about 99% of the month-to-month variation in sales. That says the line fits well, not that the spending caused the sales.
A model with R² = 0.80 on 20 observations, if adding predictors brought no real improvement.
| Predictors | R² | Adjusted R² |
|---|---|---|
| 1 | 0.80 | 0.789 |
| 2 | 0.80 | 0.776 |
| 5 | 0.80 | 0.729 |
| 10 | 0.80 | 0.578 |
| 15 | 0.80 | 0.05 |
It depends on the field. Tightly controlled physical measurements often exceed 0.95; human behaviour rarely gets past 0.5.
Yes, when predictions are worse than simply using the mean. It happens with models applied to new data or fitted without an intercept.
For a straight-line fit with one predictor and an intercept, yes. For other models, R² is defined by 1 − SSE/SST.
It subtracts a penalty for each predictor, so adding a useless variable lowers it. It can be negative.
Not necessarily. R² is relative. The residual standard error tells you how far off predictions typically are, in the data’s own units.
=RSQ(y_range, x_range) for a straight line, or tick “Display R-squared” on a chart trendline.
Total sum of squares (variation around the mean) and error sum of squares (variation left around the predictions). Their difference is the explained part.
Adjusted R² needs it. For a single X variable, leave it at 1.
Related Tools
Linear relationship strength.
Linear correlation coefficient.
Rank correlation.
Parabolic curve fit.
Third-degree polynomial fit.
Higher degree curve fit.