How to Calculate the Absolute Percentage Error with an Excel Function – 2 Methods

Formula to Calculate the Absolute Percentage Error

The absolute percentage error indicates the relative difference between the actual value and the forecast value. The formula is:

To calculate the absolute percentage error, the formula is:

absolute percentage error formula

The formula to calculate the mean absolute percentage error is:

mean absolute percentage error formula


This is the sample dataset.

 

absolute percentage error in excel dataset


Method 1 – Applying the ABS Function

Steps:

  • Select E5.
  • Enter the following formula:

=(ABS(C5-D5)/C5)

applying abs function for absolute percentage error in excel

  • Press Enter.

  • Select the cell again.
  • Drag down the Fill Handle to see the result in the rest of the cells.

filling out abs function in absolute percentage error in excel

  • Select E5:E14 and go to the Home tab.
  • Click the downward arrow beside General in Number.
  • Select Percentage.

This is the output.

applying abs function result for absolute percentage error in excel

 

Read More: Opposite of ABS Function in Excel


Method 2 – Using the IF Function

Steps:

  • Select E5.
  • Enter the following formula:

=IF(D5>C5,(D5-C5)/C5,(C5-D5)/C5)

using if function for absolute percentage error in excel

  • Press Enter.

  • Select the cell again.
  • Drag down the Fill Handle to see the result in the rest of the cells.

filling if formula for absolute percentage error in excel

  • Select E5:E14 and go to the Home tab.
  • Click the downward arrow beside General in Number.
  • Select Percentage.

This is the output.

result of if function in absolute percentage error in excel

 

Read More: Changing Negative Numbers to Positive in Excel


How to Calculate the Mean Absolute Percentage Error in Excel (MAPE Calculation)

Steps:

  • Select E5.
  • Enter the following formula:

=(ABS(C5-D5)/C5)

applying abs function for mean absolute percentage error in excel

  • Press Enter.

mean absolute percentage error of the first reading in excel

  • Drag down the Fill Handle to see the result in the rest of the cells.

  • Select E5:E14 and go to the Home tab.
  • Click the downward arrow beside General in Number.
  • Select Percentage.

  • Select a cell to see the mean absolute percentage (here, E16) and enter the following formula.

=AVERAGE(E5:E14)

applying average function for mean absolute percentage error

  • Press Enter to see the result.

calculating mean absolute percentage error in Excel

 

Read More: How to Sum Absolute Value in Excel


Download Practice Workbook

Download the workbook.


Related Articles


<< Go Back to Excel ABS Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!

Leave a Reply

Your email address will not be published. Required fields are marked *

Advanced Excel Exercises with Solutions PDF