MAE, MSE, RMSE & R² calculator
Paste paired actual and predicted values to calculate four common regression metrics. The tool shows the residual arithmetic so you can see why the metrics disagree.
1. Enter paired values
Metrics update as you type.
Average absolute error
Average squared error
Error in target units
Variance explained baseline
Residual breakdown
Residual = actual − predicted. The signs show direction; the absolute and squared columns show how each observation contributes to the aggregate metrics.
| # | Actual | Predicted | Residual | |Residual| | Residual² |
|---|
How the regression metrics are calculated
MAE, MSE, and RMSE measure prediction error directly. R² compares your model with a simple baseline that predicts the mean of the actual values. A value of 1 is a perfect fit; R² can be negative when the model is worse than that mean baseline.
Read the full explanation
See MAE vs MSE vs RMSE vs R²: regression metrics explained for the worked arithmetic, decision rules, common mistakes, and edge cases. For a classification counterpart, read accuracy vs precision vs recall vs F1.