Regression Metrics Calculator — MAE, MSE, RMSE, R² & MAPE
Paste a column of predicted values and a column of actual values to get every standard regression error metric at once — MAE, MSE, RMSE, R², Adjusted R² and MAPE — each with its formula and a full residual table. Free, no signup, runs entirely in your browser.
How it works
Regression metrics summarise how far a model's predictions ŷ fall from the true values y across n paired points. Every metric on this page is derived from the per-row error eᵢ = ŷᵢ − yᵢ, using the definitions published by scikit-learn and the NIST e-Handbook of Statistical Methods.
The error-magnitude metrics are:
- MAE = (1/n)·Σ|ŷ−y|
- MSE = (1/n)·Σ(ŷ−y)²
- RMSE = √MSE
- MAPE = (100/m)·Σ|(ŷ−y)/y| over rows where y ≠ 0
MAE is the average absolute error and treats every mistake equally. MSE squares the errors first, so a handful of large misses dominate it; RMSE takes the square root to bring the figure back into the units of your target, which is why RMSE is the most quoted single number. Because RMSE weights big errors more, RMSE is always at least as large as MAE, and the gap between them widens when error sizes vary.
The goodness-of-fit metric R² compares your model against the simplest baseline — always predicting the mean ȳ:
R² = 1 − SS_res / SS_tot, where SS_res = Σ(ŷ−y)² and SS_tot = Σ(y−ȳ)²
R² of 1 is a perfect fit, 0 means no better than predicting the mean, and a negative value means the model fits worse than that mean baseline. R² is not clamped here, matching scikit-learn. When every actual is identical, SS_tot is 0 and R² is genuinely undefined (0/0); the tool says so rather than printing a misleading number. Adjusted R², 1 − (1 − R²)·(n − 1)/(n − p − 1), corrects R² for the number of predictors p so adding useless features no longer inflates the score. MAPE reports error as a percentage of the actual value, which makes it scale-free and easy to explain — but it divides by y, so rows where the actual is 0 are excluded and the count is shown. Each metric is computed directly from the raw values, never from rounded intermediates, and MSE is cross-checked against its moment-expansion form so the result is trustworthy to the last decimal.
Worked examples
Frequently asked questions
Sources & references
- scikit-learn — Metrics and scoring: regression metrics (MAE, MSE, RMSE, r2_score, MAPE)
- NIST/SEMATECH e-Handbook of Statistical Methods — sum of squares and the coefficient of determination
- Wikipedia — Coefficient of determination (R², including the negative-R² and adjusted-R² cases)
Every formula on this page was cross-checked against the scikit-learn and NIST definitions on 2026-06-09. The tool runs entirely in your browser — your predictions and actuals never leave your device.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, an edge case, or want CSV import added?
Email me at [email protected] — most fixes ship within 24 hours.