Gas Mileage Calculator

Free Gas Mileage Calculator - calculate gas mileage for everyday decisions. Practical calculator for daily use.

Results

Calculated
Result
—

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
Miles Driven: distance covered on the tank of fuel being measured.
Gallons Used: fuel consumed to cover that distance, typically read from the pump on a full-to-full fill-up.
Price per Gallon: what you paid at the pump, in dollars.

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.

Frequently Asked Questions

Why do I need to fill the tank completely to get an accurate MPG?
MPG depends on knowing exactly how many gallons replaced the miles driven. A partial fill-up means the gallons entered do not match the distance measured, which skews the result in either direction. A full-to-full fill-up removes that guesswork because the tank starts and ends at the same known level.
Why does cost per mile matter more than total cost alone?
Total cost depends on tank size and how often you fill up, so it is not comparable across vehicles or trips of different lengths. Cost per mile normalizes for distance, which is what actually lets you compare a commute, a road trip, or two different cars on equal footing.
Does this calculator account for other driving costs like maintenance or insurance?
No. It only covers fuel: miles, gallons, and price per gallon. Total cost of ownership per mile would also need to include maintenance, insurance, depreciation, and repairs, which this tool does not estimate.
Why did my MPG change between fill-ups even though I drive the same route?
Temperature, tire pressure, fuel blend changes, traffic conditions, and even how full you top off the tank can shift MPG by several miles per gallon from one fill-up to the next. A single low or high reading is normal; look at the trend across several tanks rather than one outlier.