Vehicle Cost per Mile

Excel Formulas › Automotive & Fleet

All versions

Cost per mile rolls every expense — fuel, maintenance, insurance, depreciation — into one rate. Total annual cost divided by annual miles is the number that prices a trip or a route.


Quick formula: cost per mile from annual cost and miles:
=total_annual_cost / annual_miles
All vehicle costs for the year over miles driven. Fuel cost per mile alone is gallons-price over MPG.

The example

$9,000 cost, 15,000 miles.

AB
1ItemValue
2Annual cost9000
3Annual miles15000 → $0.60

The formula

The formula:

=B2 / B3 // annual cost ÷ annual miles

How it works

How it works:

  1. Sum all annual costs: fuel, maintenance, tires, insurance, depreciation, registration.
  2. Divide by annual miles for the all-in cost per mile.
  3. Fuel-only cost per mile = fuel_price / MPG — the variable piece.
  4. Use it to price routes, compare vehicles, or set mileage charge-outs.

Fixed vs variable per mile. Insurance and depreciation are largely fixed — their per-mile cost falls as you drive more, while fuel and maintenance stay roughly constant per mile. Splitting the two explains why a low-mileage vehicle has a high cost per mile, and helps decide whether driving more or less saves money.

Try it: interactive demo

Live demo

Total annual cost and annual miles.

Cost per mile:

Variations

Fuel cost per mile

Variable only:

=fuel_price_per_gallon / MPG

Trip cost

Per route:

=cost_per_mile * trip_miles

By category

Split it:

=SUMIF(category, "Fuel", cost) / annual_miles

Pitfalls & errors

Include depreciation. The biggest hidden cost — don’t omit it.

Same period. Match annual cost to annual miles.

Zero miles. No miles gives #DIV/0!.

Practice workbook

📊
Download the free Vehicle Cost per Mile practice workbook
A cost-per-mile sheet with the fuel-only, trip, and by-category variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I calculate cost per mile in Excel?
Divide total annual cost by annual miles: =total_annual_cost / annual_miles. $9,000 over 15,000 miles is $0.60.
How do I get fuel cost per mile?
Divide fuel price by MPG: =fuel_price_per_gallon / MPG — the variable cost per mile.
Why is my cost per mile high?
Likely low mileage spreading fixed costs (insurance, depreciation) over few miles. Split fixed vs variable to see.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Miles per gallon · Total cost of ownership · Mileage reimbursement