Gas Mileage Calculator (MPG)

Calculate miles per gallon from miles driven and gallons used, average several trips at once, and convert to L/100 km and km/L.

Inputs

Miles for the tank/trip. For multi-trip averaging, list several separated by commas (e.g. 300, 280, 410).

US gallons used. Provide the same number of values as the miles list to total them.

Result

Loading calculator…

How to use this calculator

  • Enter the miles driven (or a comma-separated list of several trips).
  • Enter the US gallons used (one value, or a matching list for multi-trip averaging).
  • Read your MPG plus L/100 km, km/L, and imperial MPG equivalents.
  • For the best accuracy, measure brim-to-brim and average several tanks.

About this calculator

Miles per gallon (MPG) is the simplest measure of fuel economy: the distance your vehicle travels on one US gallon of fuel. To get it, divide the miles driven by the gallons used to cover them. The most accurate way to measure is brim-to-brim — fill the tank completely, reset the trip meter, drive normally, then refill and note the gallons it took. This calculator also averages multiple trips: enter comma-separated lists of miles and gallons and it totals both before dividing, which gives a more representative figure than any single tank. Results are also shown in the metric L/100 km and km/L units, and in imperial (UK) MPG, which is about 20% higher than US MPG because the imperial gallon is larger.

How it works — the formula

MPG (US) = Total miles ÷ Total US gallons L/100 km = 235.214583 ÷ MPG km/L = MPG × 0.425143707 MPG (UK) = MPG (US) × 1.200949925

Fuel economy is distance divided by fuel. Multi-trip averaging sums distances and fuel separately so each trip is weighted by how far it was, not equally.

Worked examples

Example 1
300 miles on 12 gallons
Inputs:
miles=300, gallons=12
Output:
300 ÷ 12 = 25.0 MPG (9.41 L/100 km)
Example 2
400 miles on 10 gallons
Inputs:
miles=400, gallons=10
Output:
40.0 MPG
Example 3
Two tanks: 300+280 mi on 12+11 gal
Inputs:
miles=300,280; gallons=12,11
Output:
580 ÷ 23 = 25.2 MPG

Limitations

  • Uses US gallons; convert metric data first or read the km/L output.
  • Single-tank figures vary; averaging tanks is more reliable.
  • Does not account for fuel grade or hybrid battery contribution.

Measured economy varies with conditions; brim-to-brim averaging gives the truest figure.

Frequently asked

How do I calculate MPG?+
Divide the miles you drove by the gallons of fuel you used. If you drove 300 miles on 12 gallons, that is 300 ÷ 12 = 25 MPG. For a true reading, fill the tank, reset the trip odometer, drive, then refill and use the gallons added.
Why average several tanks?+
A single tank of fuel economy can be skewed by hills, headwinds, traffic, cold starts, or a heavy right foot. Averaging several tanks — summing all the miles and all the gallons before dividing — smooths out those variations into a number that reflects your typical driving.
What is the difference between US and UK (imperial) MPG?+
They use different gallons. A US gallon is about 3.785 litres; an imperial gallon is about 4.546 litres. Because the imperial gallon is larger, the same car shows a higher MPG in imperial units — roughly 1.2× the US figure.
How does MPG relate to L/100 km?+
They are inverse measures: MPG is distance per fuel (higher is better), while L/100 km is fuel per distance (lower is better). Convert with L/100 km = 235.214583 ÷ MPG. So 25 US MPG ≈ 9.4 L/100 km.
Why is my measured MPG lower than the EPA sticker?+
EPA ratings come from standardized lab cycles. Real-world economy is usually a bit lower due to weather, terrain, cargo, short trips, idling, higher speeds, and aggressive acceleration. A 10–20% gap from the sticker is common.
Does this work for kilometres and litres?+
Enter miles and US gallons for the primary calculation; the result is shown in km/L and L/100 km as well. If your data is metric, convert km to miles (÷1.609) and litres to US gallons (÷3.785) first, or use a metric fuel-economy tool.

Related calculators

More tools you might like

Hand-picked tools that pair well with this one — same audience, same intent.