Using the Coefficient of Determination Calculator (R²)
The coefficient of determination, written R², tells you how much of the variation in a dependent variable (Y) is explained by an independent variable (X) through a fitted model. This calculator takes your paired data, fits the ordinary least-squares regression line, and reports R² along with the slope, intercept, and Pearson correlation. Paste two equal-length lists of numbers, press Calculate, and you get the full picture of how well a straight line describes the relationship.
The formula
R² is defined as the fraction of total variance in Y that the model accounts for:
R² = 1 − (SSres / SStot)
- SStot = Σ(yᵢ − ȳ)² — the total sum of squares, the variance of Y around its own mean ȳ.
- SSres = Σ(yᵢ − ŷᵢ)² — the residual sum of squares, the variance left over after the model's predictions ŷᵢ.
For simple linear regression the best-fit line has slope b = Σ(xᵢ−x̄)(yᵢ−ȳ) / Σ(xᵢ−x̄)² and intercept a = ȳ − b·x̄. In that one-predictor case, R² is exactly the square of the Pearson correlation coefficient r, which is why R² is always between 0 and 1 for a least-squares fit.
How to read the result
R² is a proportion, so multiply by 100 to get a percentage. R² = 0.85 means the regression line explains 85% of the variance in Y, and 15% remains unexplained (measurement noise, omitted variables, or nonlinearity). R² = 0 means the line does no better than simply predicting the mean of Y every time; R² = 1 means every data point falls exactly on the line.
Common reference points
- R² = 1.00 — a perfect fit; all points are collinear.
- R² ≈ 0.90+ — a very strong relationship, common in controlled physics or engineering data.
- R² ≈ 0.25–0.50 — typical in social-science and behavioral data, where many factors drive the outcome.
- R² ≈ 0 — no linear relationship; note that a curved (e.g. parabolic) relationship can still give R² near 0 for a straight line.