Skip to main content

Gas Mileage Calculator

  • Runs in your browser: what you type is not uploaded
  • Free, no sign-up
  • Formula and a worked example below

About Gas Mileage Calculator

The Gas Mileage Calculator computes miles per gallon (mpg) from a trip's distance and the fuel it consumed. It also converts the result to km/L and litres per 100 km, and — if you enter a fuel price — estimates the total fuel cost of the trip and the cost per mile.

It is built around US units (miles and US gallons), making it ideal for tracking real-world fuel economy between fill-ups and for budgeting the fuel portion of a road trip.

Formula

mpg = Miles ÷ Gallons • Trip cost = Gallons × Price per gallon
  • Miles — trip distance driven
  • Gallons — US gallons of fuel used
  • km/L — = mpg × 0.425144
  • L/100km — = 235.215 ÷ mpg
  • Price per gallon — fuel price used for the cost estimate

Uses the US gallon (3.785412 L). L/100km and km/L are exact conversions of the mpg figure, not separate measurements.

Gas Mileage Calculator: worked example

300 miles on 12 US gallons

  1. Fuel economy = 300 ÷ 12 = 25 mpg.
  2. In km per litre: 25 × 0.4251437 = 10.63 km/L.
  3. Litres per 100 km = 100 ÷ 10.6286 = 9.41.

Answer: 25 mpg, about 10.63 km/L or 9.41 L/100 km.

How to use the Gas Mileage Calculator

  1. Enter the trip distance in miles.
  2. Enter the fuel used in US gallons (e.g. the amount added at the pump to refill).
  3. Optionally enter the price per gallon to see the trip's fuel cost.
  4. Read your mpg, the metric equivalents and, if priced, the trip cost and cost per mile.

Good to know

  • Best practice is the fill-to-fill method: fill up, reset the trip meter, drive, then divide the miles driven by the gallons needed to fill up again.
  • City driving typically returns lower mpg than highway driving because of stop-start traffic and idling.
  • A well-inflated set of tyres, steady speeds and removing roof racks or extra weight all raise real-world mpg.
  • Cost per mile scales with fuel price: at the same mpg, a 10% rise in fuel price raises the per-mile cost by 10%.

Frequently asked questions about the Gas Mileage Calculator

How do I calculate mpg?

Divide the miles you drove by the number of gallons used to refill the tank. For example, 300 miles on 12 gallons is 300 ÷ 12 = 25 mpg.

Does this use US or Imperial gallons?

US gallons (3.785 litres). If you filled up in the UK or another country using Imperial gallons (4.546 L), your Imperial mpg will read higher for the same real economy.

How is the trip cost worked out?

Trip cost = gallons used × price per gallon. Cost per mile is that total divided by the miles driven, which is handy for comparing routes or vehicles.

What is a good mpg?

It depends on the vehicle class. Small hatchbacks and hybrids often exceed 40 mpg, mid-size cars sit around 25–35 mpg, and large trucks or SUVs may be 15–20 mpg. Compare against your own past readings for a fair benchmark.