Calculate your Cost Per Mile (CPM) and Break-Even Rate
Fuel Required:0 gal
Total Fuel Cost:$0.00
Total Operating Cost (Base):$0.00
Break-Even Rate Per Mile:$0.00 / mile
Recommended Trip Rate (Total):$0.00
Recommended Rate Per Mile:$0.00 / mile
How to Calculate Trip Rates for Logistics
Calculating an accurate trip rate is the backbone of profitable logistics and freight operations. Unlike a simple loan calculator, a trip rate calculation involves the physics of distance and fuel consumption combined with fixed and variable financial constraints.
The core logic involves determining your Cost Per Mile (CPM). This metric ensures that every mile your vehicle travels generates enough revenue to cover fuel, driver wages, vehicle wear, and fixed overheads like insurance.
Key Formula Components
Fuel Burn: Calculated as Total Distance ÷ MPG. This determines the physical volume of fuel required for the haul.
Base Operating Cost: The sum of Fuel Cost, Driver Labor, Fixed Allocations (daily truck payments/insurance), and Miscellaneous fees (tolls/lumping).
Break-Even Point: The exact rate where your revenue equals your operating cost. Any rate accepted below this number results in a net loss.
Profit Margin: The percentage added on top of the break-even cost to ensure business growth and capital for future repairs.
Why "Rate Per Mile" Matters
In the trucking industry, the "All-In Rate" is the final number presented to brokers or shippers. However, knowing the "Rate Per Mile" allows carriers to quickly compare the profitability of a short-haul vs. a long-haul trip. A 500-mile trip paying $1000 ($2.00/mile) might be less profitable than a 300-mile trip paying $750 ($2.50/mile) once fixed daily costs are factored in.
function calculateTripRate() {
// Get input values
var distance = document.getElementById('tripDistance').value;
var mpg = document.getElementById('vehicleMpg').value;
var fuelPrice = document.getElementById('fuelPrice').value;
var driverPay = document.getElementById('driverPay').value;
var fixedCosts = document.getElementById('fixedCosts').value;
var miscExpenses = document.getElementById('miscExpenses').value;
var margin = document.getElementById('desiredMargin').value;
// Convert to floats and handle defaults
distance = parseFloat(distance);
mpg = parseFloat(mpg);
fuelPrice = parseFloat(fuelPrice);
driverPay = parseFloat(driverPay) || 0;
fixedCosts = parseFloat(fixedCosts) || 0;
miscExpenses = parseFloat(miscExpenses) || 0;
margin = parseFloat(margin) || 0;
// Validation
if (isNaN(distance) || distance <= 0) {
alert("Please enter a valid trip distance.");
return;
}
if (isNaN(mpg) || mpg <= 0) {
alert("Please enter a valid MPG (Miles Per Gallon).");
return;
}
if (isNaN(fuelPrice) || fuelPrice < 0) {
alert("Please enter a valid fuel price.");
return;
}
// Logic Calculation
// 1. Calculate Fuel Usage
var gallonsNeeded = distance / mpg;
var totalFuelCost = gallonsNeeded * fuelPrice;
// 2. Calculate Total Base Cost (Break Even)
var totalBaseCost = totalFuelCost + driverPay + fixedCosts + miscExpenses;
// 3. Calculate Break Even Rate Per Mile
var breakEvenPerMile = totalBaseCost / distance;
// 4. Calculate Margin Multiplier
// Example: 20% margin means Cost * 1.20
var marginMultiplier = 1 + (margin / 100);
// 5. Calculate Final Rates
var finalTotalRate = totalBaseCost * marginMultiplier;
var finalRatePerMile = finalTotalRate / distance;
// Display Results
document.getElementById('resGallons').innerHTML = gallonsNeeded.toFixed(1) + " gal";
document.getElementById('resFuelCost').innerHTML = "$" + totalFuelCost.toFixed(2);
document.getElementById('resTotalCost').innerHTML = "$" + totalBaseCost.toFixed(2);
document.getElementById('resBreakEven').innerHTML = "$" + breakEvenPerMile.toFixed(3) + " / mile";
document.getElementById('resTotalRate').innerHTML = "$" + finalTotalRate.toFixed(2);
document.getElementById('resRatePerMile').innerHTML = "$" + finalRatePerMile.toFixed(3) + " / mile";
// Show result container
document.getElementById('trcResult').style.display = 'block';
}