Mean Absolute Error (MAE) Calculator

The MAE calculator determines the mean absolute error (MAE) of a regression model based on the actual and predicted values.

How to Use the MAE Calculator?

  1. First, enter the set of actual and predicted values. Make sure the entered numbers should be comma or space separated. Example: 0.5,1,23 or 0.5 1 23.
  2. Also, the number of observations must be the same for both lists.
  3. Press the 'Calculate' button.
  4. Finally, the tool returns the mean absolute error (MAE) for a model.

What is Mean Absolute Error?

The Mean Absolute Error (MAE) is a metric used to determine the accuracy of predictions in a model. It defines how far the predictions are from the actual values in a regression, on average.

How to Calculate MAE?

The mean absolute error (MAE) is calculated using the following formula:

MAE =  
Σ | Ai - Pi |
n

Where,
Σ = Symbol define 'sum',
Ai = Actual (observed) values,
Pi = Predicted values,
n = Number of observations (data points).

Let's take an example.

Example:

Suppose, the actual (true) values are [6, 8, 7, 12] and the predicted values are [0.6, 4.8, -5, 9]. Compute the MAE for a given model.

Solution:

Here,
Ai = [6, 8, 7, 12]
Pi = [0.6, 4.8, -5, 9]

Now apply the formula.

MAE =  
Σ | Ai - Pi |
n
=  
|(6-0.6) + (8-4.8) + (7-(-5)) + (12-9)|
4
=  
| 5.4 + 3.2 + 12 + 3 |
4
=  
| 23.6 |
4

MAE = 5.9