Skip to content
Calcrivo

Mean Absolute Error (MAE) Calculator

Calculate Mean Absolute Error (MAE) between actual and predicted values for a regression model.

Inputs

Comma-separated actual (true) values.

Comma-separated predicted values, same order and count as actual.

Mean Absolute Error

0.5000

Number of Samples

4

Step by step

  1. Sum of absolute errors: Σ|y_i − ŷ_i|

    |3 − 2.5| + |-0.5 − 0| + |2 − 2| + |7 − 8|

    = 2.0000

  2. MAE: sum of absolute errors / n

    2.0000 ÷ 4

    = 0.5000

How it works

Mean Absolute Error (MAE) is the average magnitude of prediction errors, without regard to direction: MAE = (1/n) × Σ|y_i − ŷ_i|. It's expressed in the same units as the target variable, making it easy to interpret directly (e.g. 'predictions are off by $500 on average'). Unlike MSE/RMSE, MAE weighs all errors linearly, so it's less sensitive to outliers — a few very bad predictions won't dominate the score as much as they would with squared-error metrics.

Formula

MAE = (1/n) * sum(|y_i - y_hat_i|)

n
Number of samples
y_i
Actual value for sample i
\hat{y}_i
Predicted value for sample i

Frequently Asked Questions

How is MAE different from MSE?

MAE averages the absolute value of errors (linear penalty), while MSE averages squared errors (quadratic penalty) — MSE punishes large errors much more heavily, so MAE is more robust to outliers.

What does a lower MAE mean?

A lower MAE means predictions are, on average, closer to the actual values — MAE of 0 would mean perfect predictions with no error at all.

Is MAE sensitive to the scale of the target variable?

Yes — MAE is expressed in the same units as the target, so a MAE of 5 means something very different when predicting house prices in dollars versus predicting a 0-1 probability; use MAPE for a scale-independent alternative.

You might also need