Skip to calculators
calcmintly

R-Squared and Prediction Error

Compare predictions with observations using R² and root mean squared error.

Add to workspace

Your numbers

Local calculations. Results are estimates, not professional advice.

R-squared

—

R² can be negative for poor predictions. This does not adjust for fitted parameter count.

Formula

Use R² = 1−SSE/SST and RMSE = √(SSE/n). SSE is summed squared prediction error, SST is summed squared deviation of observations from their mean, and n is count. A constant observed series has undefined explained-variation ratio.

Compare predictions with observations using R² and root mean squared error.

Worked example

Observed values
2, 4, 6
Predicted values
2, 3, 5
R-squared
0.75
Root mean squared error
0.816496580928

Scope and limitations

R² can be negative for poor predictions. This does not adjust for fitted parameter count.

Inputs are checked for missing values and allowed ranges. A result outside the finite numeric range is not displayed. Rounding affects display, while the calculation uses the model’s numeric precision.

Check your units and assumptions before relying on a result. Changing a label does not convert a currency or physical unit.

Formula version: a6b164ec3731 · Example checked:

Methodology

Related tools