GOODNESS OF FIT

R-Squared Calculator

Calculate the coefficient of determination from observed and predicted values. This page uses R² = 1 − SSE/SST with an explicit constant-target convention; it does not refit a regression model.

Observed vs predictedBrowser-basedNo sign-in

YOUR DATA

Enter observed and predicted values

Paste paired numeric columns or upload a CSV/TSV file. Use a period as the decimal mark. Up to 5 MB and 5,000 observations are accepted.

The file is read locally in your browser.

One pair per row; observed and predicted values must be finite numbers.

Formula and convention

SSE = Σ(observed − predicted)². SST = Σ(observed − mean observed)². When SST is greater than zero, R² = 1 − SSE/SST. R² may be negative when predictions are worse than using the observed mean as a baseline.

When all observed values are identical, SST is zero and R² is undefined for this calculator, even if the predictions match exactly. This avoids treating a zero-variation target as a regularised perfect score.

Interpretation and limitations

R² is relative to the observed values and the specific evaluation sample. It is not the percentage of outcomes caused by the predictors, a probability that the model is correct, or a guarantee of performance on future data. Compare R² only when the target, observations and evaluation procedure are comparable.

What R² cannot tell you

Back to model evaluation tools