How it works
Fixed costs (truck payment, insurance, permits) must be paid whether you drive or not, so they fall per mile as you drive more. Variable costs (fuel, maintenance, tires, tolls) rise with every mile. Your total cost per mile is the minimum rate per mile you need to break even, before paying yourself.
Include deadhead (empty) miles in your monthly miles, because they cost as much as loaded miles.
Formula
Cost per mile = monthly fixed costs ÷ monthly miles + fuel price ÷ MPG + other variable costs per mile