Why every trucker needs one number: cost per mile
A broker offers a load: 640 miles, $1,400. Is that a good load? You cannot answer without knowing what a mile costs you to run. Plenty of carriers that look busy, with trucks rolling every day, are slowly losing money because the rates they accept sit just under their real cost. Cost per mile, usually shortened to CPM, is the number that turns a gut feeling into a decision.
This free first lesson is for owner-operators, small fleet owners, dispatchers, freight brokers who want to understand the carrier side, and anyone studying transport management. You will build the full cost per mile of one truck in Excel: fixed costs, variable costs, and the total that every rate must beat. We use Ridgeline Freight, a fictional small dry-van carrier, and its truck 101. All figures are illustrative example numbers, the same ones as in the lab above, so you can follow each step and then swap in your own.
We work in miles and US dollars. If you run in kilometres and another currency, nothing in the method changes: replace miles with kilometres and miles per gallon with kilometres per litre, and the formulas stay identical.
Fixed and variable costs: the two halves of CPM
Every cost of a truck falls into one of two groups, and the split matters because they behave very differently when the miles change.
- Fixed costs are paid whether the truck rolls or stands in the yard: truck and trailer payments, insurance, permits and registration, ELD and software subscriptions, accounting and admin. They are usually billed monthly or yearly. To put them on a per-mile basis, bring them all to a yearly total and divide by the miles you expect to drive in that year.
- Variable costs rise with every mile: fuel, maintenance and repairs, tires, tolls, and driver pay when the driver is paid by the mile. They are already per mile, or can be turned into per-mile figures easily, such as fuel: diesel price ÷ miles per gallon.
The total is simple: CPM = fixed cost per mile + variable cost per mile. The subtle part is which miles to count. Use all miles, loaded and empty. Empty miles, called deadhead, burn the same fuel and wear the same tires as loaded ones. If you divide only by loaded miles here, you mix two ideas together. In lesson 2 you will handle deadhead properly when you judge individual loads.
Worked example, part 1: Ridgeline's fixed costs per year
Truck 101 has three monthly bills and three yearly ones. The first task in the lab is to combine them into one yearly figure in B10. The trap is obvious once you see it: you cannot add a monthly payment to a yearly one.
| Fixed cost | As given | Per year | Excel |
|---|---|---|---|
| Truck payment | $2,450 / month | $29,400 | =B4*12 |
| Trailer payment | $750 / month | $9,000 | =B5*12 |
| Insurance | $1,200 / month | $14,400 | =B6*12 |
| Permits, plates & registration | $3,200 / year | $3,200 | =B7 |
| ELD, phone & software | $1,200 / year | $1,200 | =B8 |
| Accounting & admin | $2,400 / year | $2,400 | =B9 |
| Total fixed per year (B10) | $59,600 | =(B4+B5+B6)*12+B7+B8+B9 |
The correct formula multiplies only the monthly lines by twelve: =(B4+B5+B6)*12+B7+B8+B9 = $59,600. A plain =SUM(B4:B9) would return $11,200, far too low, and =SUM(B4:B9)*12 would return $134,400, far too high, because it multiplies the yearly items as well. The coach in the lab recognises both mistakes and tells you why.
Ridgeline plans for 110,000 miles a year, loaded and empty together (cell B23). The fixed cost per mile is therefore 59,600 ÷ 110,000 = $0.542. Notice how sensitive this is: the dollars are fixed, but the per-mile share depends entirely on how many miles you actually run. We come back to that below.
Worked example, part 2: variable cost per mile and the total
Fuel is the only variable line that needs a calculation. Diesel costs $3.85 a gallon in the example and the truck averages 6.5 miles per gallon. One gallon lasts 6.5 miles, so each mile costs 3.85 ÷ 6.5 = $0.592. Getting the division the right way round is the classic mistake: miles per gallon divided by price, or price times mpg, gives a number that means nothing.
| Line | Excel (lab cell) | Per mile |
|---|---|---|
| Fuel: $3.85 per gallon ÷ 6.5 mpg | B15: =B13/B14 | $0.592 |
| Maintenance & repairs | B16 (input) | $0.180 |
| Tires | B17 (input) | $0.040 |
| Driver pay | B18 (input) | $0.650 |
| Tolls & miscellaneous | B19 (input) | $0.030 |
| Variable cost per mile | B20: =B15+SUM(B16:B19) | $1.492 |
| Fixed cost per mile: $59,600 ÷ 110,000 miles | B24: =B10/B23 | $0.542 |
| Total cost per mile (CPM) | B25: =B24+B20 | $2.034 |
Adding the five lines gives a variable cost of $1.492 per mile, and with the fixed share of $0.542 the total cost per mile of truck 101 is $2.034. Back to the opening question: the 640-mile load at $1,400 pays 1,400 ÷ 640 = $2.19 per loaded mile. That is above $2.03, but only if the truck does not have to drive far empty to pick it up. Lesson 2 shows how to bring those empty miles into the comparison.
The chart makes the priorities clear. A 10% better fuel economy would save about 5 cents a mile, and over 110,000 miles that is several thousand dollars. A cheaper software plan saves far less. Where the money goes tells you where to look first when you want to cut costs.
The split into fixed and variable costs also answers a different question from the total. In the short run, once the truck is paid for and insured for the month, any load that pays more than the variable cost of $1.49 a mile at least contributes something towards the fixed bills. Over a full year, though, the rates have to cover the total CPM of $2.03, or the business shrinks its cash every month. Knowing both numbers lets you tell a sensible short-term compromise from a habit that will sink the company.
Why miles per year change everything
Because fixed costs are spread over the miles you drive, the same truck has a different CPM in a busy year and a slow one. The variable cost stays at $1.49 a mile, but the fixed share grows when the truck stands still. You can model this with one formula copied down a column of mileages: =$B$10/A2+$B$20, where A2 holds the miles per year.
| Miles per year | Fixed per mile | Variable per mile | Total CPM | Excel |
|---|---|---|---|---|
| 80,000 | $0.745 | $1.492 | $2.237 | =$B$10/A2+$B$20 |
| 100,000 | $0.596 | $1.492 | $2.088 | same formula, copied down |
| 110,000 (plan) | $0.542 | $1.492 | $2.034 | |
| 120,000 | $0.497 | $1.492 | $1.989 | |
| 140,000 | $0.426 | $1.492 | $1.918 |
Between 80,000 and 140,000 miles the CPM moves from $2.24 to $1.92. A rate that is profitable for a busy truck can lose money for a quiet one. This is also why a truck parked for two weeks in the shop costs more than its repair bill: the fixed costs keep running with no miles to carry them.
How to do it in Excel, step by step
- Lay out three blocks as in the lab: fixed costs (rows 3–10), variable costs (rows 12–20) and cost per mile (rows 22–25). Write the unit into every label, such as "per month" or "$ per mile". It prevents most mix-ups.
- In B10 type
=(B4+B5+B6)*12+B7+B8+B9and press Enter. Check the result: $59,600. - In B15 type
=B13/B14for the fuel cost per mile. Format it as currency with three decimals (Home → Number → Accounting, then Increase Decimal) so you see $0.592 instead of a rounded $0.59. - In B20 type
=B15+SUM(B16:B19). You can also select B16:B19 and press Alt+= to start the SUM automatically, then add B15. - In B24 type
=B10/B23for the fixed cost per mile, and in B25 type=B24+B20for the total CPM. - Press Ctrl+` to show formulas and check that every reference points to the right row. Press it again to return to values.
- For task 5, select A15:B19 (fuel to tolls, without the total in row 20). Go to Insert → Charts → Pie → Doughnut. Click the chart, open Chart Elements (the + button), tick Data Labels and type a title such as "Variable cost per mile".
- Optional: build the mileage table from the section above in a spare area with
=$B$10/A2+$B$20. Press F4 after clicking into a reference to add the$signs so the formula copies cleanly.

Common mistakes and how to spot them
- Adding monthly and yearly costs together.
=SUM(B4:B9)mixes units. Spot it: the yearly fixed total is suspiciously close to one month's payments. - Inverting the fuel formula.
=B14/B13gives miles per dollar, about 1.69, not dollars per mile. Spot it: fuel per mile should be well below the diesel price per gallon. - Leaving out the fuel line.
=SUM(B16:B19)forgets B15, the biggest variable cost after driver pay. Spot it: variable CPM drops to $0.90. - Dividing by loaded miles only. If you divide fixed costs by loaded miles but ignore that fuel and tires are burned on empty miles too, CPM becomes inconsistent. Use all miles for CPM and handle deadhead when you price loads.
- Forgetting the driver. An owner-operator who leaves out a wage sees a healthy margin that is really just their own unpaid time.
- Using last year's fuel price forever. Fuel is the most volatile input. Keep the price in its own cell (B13) so a new figure updates the whole sheet, and review it regularly.
- Rounding CPM too early. $2.03 versus $2.034 looks harmless, but over 110,000 miles the difference is several hundred dollars. Round only for display.
Quick reference: formulas and shortcuts used
| Function, formula or shortcut | What it does here |
|---|---|
=(B4+B5+B6)*12+B7+B8+B9 | Turns monthly and yearly fixed costs into one yearly total |
=B13/B14 | Fuel cost per mile: dollars per gallon ÷ miles per gallon |
=SUM(B16:B19) | Adds the per-mile variable lines |
=B10/B23 | Fixed cost per mile: yearly fixed ÷ all miles |
=B24+B20 | Total cost per mile (CPM) |
=rate-$B$25 | Margin per mile of a load against your CPM (lesson 2 builds on this) |
| Alt+= (Windows) / Cmd+Shift+T (Mac) | AutoSum the cells above |
| F4 | Toggles $ signs to lock a reference such as $B$25 |
| Ctrl+` | Shows formulas instead of results, to audit the sheet |
| Insert → Charts → Pie → Doughnut | The doughnut chart of the five variable parts (task 5) |
Real-world uses
- Accepting or rejecting a load. Compare the offered rate per mile with your CPM before you say yes. A load below CPM only makes sense as a repositioning move, and you should know that you are choosing it.
- Setting a minimum rate for dispatchers. A dispatcher who knows the truck's CPM can reject loads quickly and negotiate from a floor rather than a guess.
- Comparing trucks in a small fleet. Build one CPM sheet per truck. An older truck with lower payments but higher maintenance per mile may cost more or less than a new one. The sheet tells you.
- Planning a truck purchase. Enter the new payment and expected fuel economy, keep everything else, and see the CPM change before you sign anything.
- Talking to a lender or partner. A clear CPM breakdown shows that you understand your business and makes cash-flow discussions much easier.
What you will build in the rest of this course
Lesson 1 is free. The remaining 19 lessons are part of the full course, available as a one-time purchase, and each one comes with its own interactive lab and coach, just like the one above. They build on the CPM you calculated here.
Rate per Mile & Load Profitability with Deadhead. Turn a broker's flat rate into a rate per mile, add the empty miles to reach the pickup, and see whether a load still beats your CPM once deadhead is counted.
Dispatcher Commission & Owner-Operator Net. Work out what a percentage dispatcher fee really costs per load and per year, and calculate what an owner-operator actually keeps after the fee and running costs.
Fuel Surcharge: Formula and Step Table. Build a fuel surcharge from a base diesel price and fuel economy, then turn it into a step table that a customer can read in one look.
Lane Comparison & the Best Load. Compare several lanes and loads side by side by revenue, miles and margin per mile, and let Excel pick the most profitable one.
Utilisation: Loaded Miles % & Revenue per Truck. Measure how many of your miles earn money, and calculate revenue per truck per week, the numbers that show whether the fleet is busy or just moving.
Break-even Rate per Mile. Find the lowest rate per mile at which a truck covers all costs, including deadhead, and see how far above it each of your current loads sits.
Fleet P&L for Three Trucks & Maintenance Reserve. Combine three trucks into one profit and loss statement, set aside a maintenance reserve per mile, and see which truck carries the fleet.
The course finishes with a final exam that combines the lessons in one realistic carrier scenario. All companies and numbers are fictional, so you can test ideas without risk and then apply the same sheets to your own figures.
Summary
Cost per mile is the sum of two parts. Fixed costs are brought to a yearly total and divided by all the miles driven in a year. Variable costs are already per mile, with fuel calculated as diesel price ÷ miles per gallon. For Ridgeline's truck 101 that gives $0.542 + $1.492 = $2.034 per mile. More miles lower the fixed share, fewer miles raise it, and every rate you accept must beat the CPM that matches your real mileage.
Now scroll up to the lab and build the sheet yourself. The coach checks the yearly fixed costs, the fuel cost per mile, the variable and total CPM, and your doughnut chart, and explains each typical mistake. It takes about fourteen minutes, and afterwards you will look at every load offer with a number in mind.
Frequently asked questions
How do you calculate cost per mile for a truck?
Add the yearly fixed costs, divide them by all miles driven in the year, and add the variable cost per mile (fuel, maintenance, tires, tolls and driver pay). In Excel that is =B10/B23+B20 in the lab layout.
What is the difference between fixed and variable trucking costs?
Fixed costs such as truck payments, insurance and permits are paid whether the truck moves or not. Variable costs such as fuel, tires and per-mile driver pay rise with every mile driven.
How do I calculate fuel cost per mile?
Divide the diesel price per gallon by the truck's miles per gallon. At $3.85 and 6.5 mpg that is about $0.59 per mile.
Should deadhead miles be included in cost per mile?
Yes. Use all miles, loaded and empty, to calculate CPM, because the truck burns fuel and wears tires on both. Deadhead is then handled when you judge the profit of a specific load.
Why does my cost per mile go up when I drive less?
The fixed costs stay the same while the miles drop, so each mile has to carry a bigger share of them. Variable costs per mile do not change.
Should an owner-operator include their own wage in cost per mile?
Yes. Including a driver wage shows whether the truck itself makes money. Without it, the profit you see is partly just your unpaid work.
Keep going: Trucking & Logistics Business Math
This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time €9.90.
- Rate per Mile & Load Profitability with Deadhead
- Dispatcher Commission & Owner-Operator Net
- Fuel Surcharge: Formula and Step Table
- Lane Comparison & the Best Load
- Utilisation: Loaded Miles % & Revenue per Truck
- Break-even Rate per Mile
- Fleet P&L for Three Trucks & Maintenance Reserve
- Driver Pay Models: Per Mile, Percentage & Hourly
- Accessorials: Detention, Layover & Lumper Charges
- Multi-Stop Loads: Stop-Off Charges & Out-of-Route Miles
- Trip Planning: Driving Days, Breaks & Delivery ETA
- Fuel Purchases: Card Discounts, Weighted Price & Real MPG
- Broker Invoices: Days to Pay, Short-Pays & Overdue Loads
- 13-Week Cash Flow: Earning Now, Getting Paid Later
- Sensitivity Grid: Profit by Diesel Price and Rate per Mile
- Seasonal Rates: Monthly Rate per Mile vs Break-even
- Preventive Maintenance: Due Miles, Status & PM Cost per Mile
- Backhaul Planning: Choosing the Load Home by Round-Trip Profit
- Final Project: Ridgeline Q3 Fleet Dashboard