# Calculating mileage expenses by applying the principle of compensation - case study

Here is a case study example for calculating mileage expenses using the principle of compensation:

__My company has configured the following URSSAF scale on its Expensya account __

**I entered mileage expenses in Expensya using a vehicle with a taxable horsepower of 7HP.**

**A first trip totalling 1,000 miles "trip 1" **

- New cumulative distance = 1,000 miles
- The sum of all my other mileage expenses = 0, because I have yet to enter any mileage expenses with this vehicle.
- The formula to be applied is "up to 5,000 miles"
- Value to be reimbursed = (New Cumulative Distance x 0.601) – (The sum of all my other mileage expenses ) = (1,000 x 0.601) - 0 = €601

**A trip totalling 2,000 miles "trip 2" **

- New cumulative distance = 1,000 + 2,000 = 3,000
- The sum of all my other mileage expenses= 601€
- The formula to be applied is "up to 5000 miles"
- Value to be reimbursed = (New Cumulative Distance x 0.601) – (The sum of all my other mileage expenses ) = ((1,000 + 2,000) x 0.601) - 601 = €1202

**A trip totalling 3,000 miles "trip 3" **

- New cumulative distance = 1,000 + 2,000 + 3,000 = 6,000
- The sum of all my other mileage expenses = 601 + 1,202 = €1,803
- The formula to be applied is "From 5,000 to 20,000 miles" = (distance x 0.34) + 1,301
- Value to be reimbursed = ((New Cumulative Distance x 0.34) – (The sum of all my other mileage expenses) = ((6,000 x 0.34) + 1,301) - 1,803 = €1,538

**I then deleted "journey 2" which totalled 2,000 miles**

Remaining on my Expensya account is:

- Cumulative distance = 1,000 + 3,000 = 4,000 miles
- Total sum of all my mileage expenses = 601 + 1,538 = €2,139

**I add a “journey 4” mileage expense totalling 500 miles**

- New cumulative distance = 4000 + 500 = 4500 miles
- The sum of all my other mileage expense = €2139
- The formula to be applied is "up to 5,000 miles” = (distance x 0.601)
- Value to be reimbursed = ((New Cumulative Distance x 0.601) – (The sum of all my other mileage expense ) = (4,500 x 0.601) - 2,139 = €565.50

**I now remove the “trip 4” and “trip 4” associated mileage expenses**

- So, I now only have mileage expenses left for “trip 3”.
- New cumulative distance = 3,000 miles
- The sum of all my other mileage expenses = €1,538

**In the list of mileage expenses, I can see that "trip 3" has a value of €1,538; I click on it to make modifications and see that the value changes - why is this?**

- When initiating a mileage expense in Expensya, the system recalculates the value to align with the latest adjustments, taking into account the historical changes in other mileage expenses. For instance, if a mileage expense has been removed, it is essential to review and potentially update the value accordingly.
- The calculation is changed as follows:

- New cumulative distance = 0 miles (because my "trip 3" is being edited) and the other routes (1, 2 and 4) have been deleted

- The sum of all my other mileage expenses = €0 (because my only trip is in the process of being edited)

- The formula to be applied is "up to 5,000 miles” = (distance x 0.601)

- Value to be reimbursed = (Cumulative Distance x 0.601) – (The sum of all my other mileage expenses) = (3000 x 0.601) – 0 = €1,803

- The value has changed

If I save, the amounts are updated in Expensya, otherwise, compensation is applied to the next mileage expense that is entered.