MAE Calculator

Mean absolute error between actual and predicted values.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter the actual values and the predicted values and get the mean absolute error: the average size of the errors, in the same units as your data, ignoring direction. Lower is better and 0 is perfect.

How to use

1
Step 1
Enter the actual values, comma separated.
2
Step 2
Enter the predicted values in the same order.
3
Step 3
Press Calculate.

How it works

MAE = (1/n) Σ |yᵢ − ŷᵢ|. Every error counts in proportion to its size, so it is less affected by outliers than MSE or RMSE and easy to explain: on average the prediction is off by this much.

MAE = (1/n) · Σ |yᵢ − ŷᵢ|

Worked example

Four predictions

Input
Actual: 3, 5, 2.5, 7 Predicted: 2.5, 5, 4, 8
Output
MAE 0.75 (n = 4)
Walkthrough
The absolute errors are 0.5, 0, 1.5 and 1, which sum to 3. 3 / 4 = 0.75.

Limitations

  • The two lists must have the same length.
  • Not scale-free: compare MAE only across models on the same target.
  • Treats over- and under-prediction alike.

Questions

How do I calculate mean absolute error?
Average the absolute differences between actual and predicted values.
MAE or RMSE?
MAE is simpler and robust to outliers; RMSE penalises large errors more.
What is a good MAE?
It depends on the scale of the target. Compare it with the typical size of the values.
Can MAE be negative?
No, it is 0 or more.

Features

  • Same units as data
  • Runs in your browser
  • Equal-length check

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Mean, Variance and Standard Deviation

    StatQuest with Josh Starmer

    Stats foundations behind many ML metrics tools.

    Watch on YouTube
  • TensorFlow 2.0 Complete Course

    freeCodeCamp.org

    Practical ML stack context next to AI utilities.

    Watch on YouTube