Cost per Mile (CPM)

Excel Formulas › Logistics & Trucking

All versions

Cost per mile rolls every expense — fuel, maintenance, insurance, driver pay, truck payment — over the miles run. It’s the break-even floor: any rate below CPM loses money.


Quick formula: all-in cost per mile:
=total_operating_costs / total_miles
Total operating costs (fixed + variable) over miles run. $1.45 fixed plus variable gives the all-in CPM.

The example

$5,400 costs, 3,600 miles.

AB
1ItemValue
25400 / 3600—
3CPM→ $1.50/mi

The formula

The formula:

=total_operating_costs / total_miles // total costs ÷ miles

How it works

How it works:

  1. Split costs into fixed (truck payment, insurance, permits) and variable (fuel, tires, maintenance).
  2. Sum both and divide by total miles for the all-in CPM.
  3. Fixed cost per mile rises when miles fall — idle weeks hurt the rate.
  4. Add driver pay if you want fully-loaded CPM including labor.

Fixed cost per mile is a moving target. A $2,000/month truck payment is $0.50/mile at 4,000 miles but $1.00/mile at 2,000 — so a slow month doubles that portion of CPM and quietly erodes margin. Track fixed and variable separately: variable CPM is roughly stable, but fixed CPM is entirely about keeping the truck moving. The whole game is miles.

Try it: interactive demo

Live demo

Total costs and miles.

CPM:

Variations

Variable CPM

Fuel, tires, maint:

=variable_costs / total_miles

Fixed CPM

Spread fixed cost:

=fixed_costs / total_miles

Profit per mile

Rate − CPM:

=revenue_per_mile - cost_per_mile

Pitfalls & errors

Fixed and variable. Include both for the true break-even CPM.

Total miles. Use all miles run, including deadhead.

Zero miles. No miles gives #DIV/0! and an infinite CPM.

Practice workbook

📊
Download the free Cost per Mile (CPM) practice workbook
A CPM sheet with the variable, fixed, and profit variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I calculate cost per mile in Excel?
Divide total operating costs by total miles: =total_operating_costs / total_miles. $5,400 over 3,600 miles is $1.50/mile.
Why split fixed and variable costs?
Variable CPM is stable, but fixed CPM rises sharply when miles drop — so idle time is what really hurts the rate.
Is CPM my break-even rate?
Yes — any revenue-per-mile below your all-in CPM loses money on that load.

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: Revenue per mile · Cost per mile · Load profit