Coefficient of Determination (R-Squared) Calculator
Measure linear model fit with R-squared, adjusted R-squared, Pearson correlation, and the least-squares regression equation.
About the coefficient of determination
R-squared examples
These paired data sets illustrate perfect, moderate, and negative linear relationships.
| Paired data | Regression result | Interpretation |
|---|---|---|
| X: 1,2,3; Y: 2,4,6 | R² = 1; y = 2x + 0 | Every point lies exactly on an increasing straight line. |
| X: 1,2,3,4; Y: 2,3,5,4 | R² = 0.64; y = 0.8x + 1.5 | The line explains 64% of the variation in Y. |
| X: 1,2,3; Y: 6,4,2 | R² = 1; r = −1 | R-squared is perfect while correlation reveals the negative direction. |
How to calculate R-squared
- Enter independent-variable values as a comma-separated X list.
- Enter dependent-variable values in the matching order as the Y list.
- Select Calculate R-Squared to fit the least-squares line.
- Interpret R-squared with the correlation, equation, scatterplot, and residual context.
R-squared FAQ
What is a good R-squared value?
There is no universal cutoff because expected variation differs across fields and purposes. Compare the value with relevant benchmarks and assess prediction error and residual patterns.
Can R-squared be negative?
For simple least-squares regression with an intercept, ordinary R-squared is between zero and one. Adjusted R-squared can be negative when the model performs poorly after its complexity penalty.
Why does R-squared hide the direction?
It squares the correlation coefficient, so positive and negative correlations can yield the same R-squared. Use Pearson's r or the regression slope to identify direction.
Does a high R-squared prove causation?
No. Association can arise from confounding, shared trends, selection effects, or chance. Causal claims require an appropriate design and assumptions beyond model fit.
What is adjusted R-squared used for?
It penalizes explained variation for the number of predictors relative to sample size. It is useful when comparing candidate regression models, though other diagnostics remain necessary.
Why must both lists have variation?
Correlation divides by the spread of each variable and the slope divides by X variation. A constant list makes those quantities undefined rather than zero.