Skip to content

Regression R² and RMSE

Score paired actual and predicted numeric values with R² and RMSE, retaining negative scores and explicitly undefined constant-target R².

Use this result well

Inputs that matter
Actual values, Predicted values
Output to expect
R-squared score
  • Check the units and required inputs before comparing results.
  • Keep the assumptions with a copied result so you can reproduce the calculation later.
Was this tool helpful?

Reference & details

How it works

Prediction R-squared and error

R² = 1 − sum((actual−predicted)²) / sum((actual−mean(actual))²); RMSE = √(residual sum of squares/N) Unweighted prediction scores for one numeric target. A negative R-squared means greater squared error than predicting this evaluation sample’s mean. Constant actual values make the denominator zero. R-squared is undefined even for perfect predictions; RMSE remains available. The score does not by itself establish out-of-sample generalization, causality or business value.

Updated: September 2026

Example Scenarios

Compare actual and predicted values on the same evaluation rows, preserving negative scores and reporting constant-target R-squared as undefined.

Common Mistakes to Avoid

Applying prediction r-squared and error outside its stated assumptions

A negative R-squared means greater squared error than predicting this evaluation sample’s mean. Constant actual values make the denominator zero. R-squared is undefined even for perfect predictions; RMSE remains available. The score does not by itself establish out-of-sample generalization, causality or business value.

FAQ

Yes. It is not clamped to zero.

No. RMSE uses the same units as the target.

About Regression R² and RMSE

Score paired actual and predicted numeric values with R² and RMSE, retaining negative scores and explicitly undefined constant-target R². Choose the mode that matches your measurements or study design, enter the stated units and keep the method and limits with the result.