What it is and when to use it
This calculator turns a fill-up into three numbers you can actually act on: miles per gallon, the total cost of that tank, and the cost per mile driven. It is built for the routine check most drivers do at the pump or right after — did this tank of gas perform as expected, and what is this trip or commute really costing per mile.
Use it after any fill-up where you know the distance covered since the last full tank. It also works for comparing two vehicles, two routes, or two driving styles: run the same trip distance through the calculator with each vehicle's gallons used and price paid, then compare the cost-per-mile figures side by side.
MPG = Miles / Gallons | Total Cost = Gallons x Price | Cost per Mile = Total Cost / Miles
Worked example
You drove 300 miles since your last fill-up and it took 10 gallons at $3.50 per gallon to top off the tank. MPG = 300 / 10 = 30.0 miles per gallon. Total Cost = 10 x 3.50 = $35.00. Cost per Mile = 35.00 / 300 = $0.117 per mile. If a second vehicle needed 15 gallons at the same price to cover the same 300 miles, its MPG would be 20.0 and its cost per mile would be $0.175 — 50% more per mile despite the identical trip.
Common mistakes and how to interpret the result
- Measuring from a partial fill-up. For an accurate MPG, reset your trip odometer at a full tank and calculate only when you fill up completely again, so gallons used matches miles driven exactly.
- Ignoring driving conditions. Highway driving, cold weather, heavy cargo, and city stop-and-go traffic all change MPG for the same vehicle — compare tanks under similar conditions for a fair reading.
- Using the price from a different fill-up. Enter the price actually paid for the gallons in this calculation, not an average or a different station's price, or the total cost figure will be wrong.
- Treating one tank as the final answer. MPG varies tank to tank; average several fill-ups before concluding your vehicle's real-world efficiency has changed.