%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

Regression Error Metrics (MAE, RMSE, MAPE, R²)

Results update as you type.

Your numbers

Understanding the regression error metrics calculator — concept and principle

When a model predicts a number, such as sales, a price, a temperature or demand, you judge it by how far the predictions fall from the actual values. This calculator takes a list of actual values and a matching list of predictions and returns the most widely used error measures: MAE, MSE, RMSE, MAPE, sMAPE and the coefficient of determination R².

Actual values and predictions with errors of 10Every prediction misses by 10, so MAE and RMSE are both 10, but the percentage error falls from 10% at 100 to 4% at 250, giving MAPE 6.42%. R² is 0.968.Same miss of 10, different % error100+10 → 10%150−10 → 6.67%200+10 → 5%250−10 → 4%actualprediction10MAE10RMSE6.42%MAPE0.968R²MAPE = (10 + 6.67 + 5 + 4) ÷ 4
A miss of 10 is 10% of 100 but only 4% of 250 — that is what MAPE averages.

How it is calculated

Each error is eᵢ = predictionᵢ − actualᵢ, and n is the number of pairs.

The principle

MAE treats every unit of error equally, so it reflects the typical miss. Squaring in MSE and RMSE gives large errors far more weight, so RMSE is always at least as large as MAE, and the gap grows when a few predictions are badly off. Percentage measures remove the unit so you can compare series of different scales, but MAPE divides by the actual value and therefore blows up near zero; sMAPE divides by the average size of actual and prediction to soften that. R² compares your squared error with that of the simplest possible model, which always predicts the mean.

Worked example

  1. Actual 100, 150, 200, 250; predictions 110, 140, 210, 240. Errors: +10, −10, +10, −10.
  2. MAE = 40 ÷ 4 = 10; MSE = 400 ÷ 4 = 100; RMSE = √100 = 10.
  3. MAPE = (10% + 6.67% + 5% + 4%) ÷ 4 = 6.42%.
  4. sMAPE = (20/210 + 20/290 + 20/410 + 20/490) ÷ 4 × 100 = 6.35%.
  5. Mean of actual = 175; Σ(actual − 175)² = 12,500. R² = 1 − 400 ÷ 12,500 = 0.968.

How to read the result

Every error here is 10, which is why MAE equals RMSE. R² = 0.968 means the model removes 96.8% of the squared variation around the mean. R² = 0 is no better than predicting the mean, and R² can be negative when the model is worse than that. Judge MAE and RMSE against the scale of the data and against a naive forecast such as "same as last period".

Common mistakes

Keep in mind: Metrics computed on the training data are optimistic. Evaluate on held-out data or with time-based validation for forecasts.

Frequently asked questions

Should I use MAE or RMSE?

Use RMSE when large errors are especially costly; use MAE when you want a robust measure of the typical error.

Why does MAPE treat over- and under-forecasts differently?

With non-negative forecasts, an under-forecast can cost at most 100%, while an over-forecast has no upper limit, so minimising MAPE tends to favour forecasts that are too low.

Is R² here the same as the squared correlation?

Only for a least-squares fit with an intercept on the same data; for arbitrary predictions the two can differ.

Sources: R. J. Hyndman and A. B. Koehler, Another look at measures of forecast accuracy, International Journal of Forecasting, 2006 · R. J. Hyndman and G. Athanasopoulos, Forecasting: Principles and Practice, OTexts

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →