Gas Mileage (MPG) Calculator
Your dashboard readout and the window sticker both tell you what the car should be doing. This works out what it actually did, from the distance you covered and the fuel it took to fill back up. Log more than one tank and the calculator averages them properly, by total distance over total fuel rather than by averaging the individual figures.
A UK gallon is bigger than a US one, so pick the right one or your MPG will look better than it is.
One tank is a snapshot. Log three or four and the calculator averages them by dividing total distance by total fuel, which smooths out the variation between fills.
Your fuel economy will appear here
Enter the distance you covered and how much fuel it took to fill back up.
Quick Answer
MPG = miles driven ÷ gallons used. Fill the tank, reset the trip meter, drive normally, fill up completely again, and divide the trip distance by the gallons it took. 300 miles on 12 gallons is 25 MPG. To convert, L/100km = 235.215 ÷ MPG, and gallons per 100 miles = (1 ÷ MPG) × 100. A UK imperial gallon is larger than a US one, so the same car reads higher in imperial MPG.
How It Works: Formula & Variables
MPG = Miles Driven ÷ Gallons Used
The full-tank method
- Fill the tank right up and note the odometer, or reset the trip meter to zero.
- Drive as you normally would until the tank is well down.
- Fill it completely again at the same pump if you can, since pumps cut off at slightly different points.
- Write down the gallons from the receipt and the miles from the trip meter.
- Divide the miles by the gallons.
The second fill-up is doing the measuring here. Those gallons are precisely what the drive consumed, which is why a partial fill breaks the whole calculation.
Converting between the common measures
- Gallons per 100 mi
- (1 ÷ MPG) × 100
- L/100km
- 235.215 ÷ MPG (US)
- km per liter
- 100 ÷ (L/100km)
- Imperial MPG
- US MPG × 1.20095
The 235.215 constant is just the unit conversion written as one number: 3.785411784 liters per US gallon, times 100, divided by 1.609344 kilometers per mile. For imperial gallons the equivalent constant is 282.481, since a UK gallon holds 4.54609 liters.
Where EPA figures come from
EPA ratings are produced in a laboratory, not on the road. Cars run standardized drive cycles while their exhaust is captured, and the carbon content of those gases is measured to calculate how much fuel was burned. The agency then reduces the raw test results by roughly 10% before publishing, to bring the numbers nearer to what drivers see. Everything gets tested the same way, which makes the figures comparable between vehicles even when they do not match your own driving.
Worked Examples
Example 1: The full-tank method
The trip meter reads 300 miles when you pull in, and filling the tank takes 12 gallons. 300 ÷ 12 = 25 MPG. That works out to 9.41 L/100km and 4 gallons per 100 miles.
Example 2: Working from odometer readings
No trip meter, so you noted the odometer at both fill-ups: 40,000 at the first and 40,360 at the second, with 12 gallons going in. The distance is 40,360 − 40,000 = 360 miles, and 360 ÷ 12 = 30 MPG. Same calculation, one extra subtraction.
Example 3: Gallons per 100 miles
A car returning 37.7 MPG burns 1 ÷ 37.7 = 0.0265 gallons for every mile. Scale that up and it uses 2.65 gallons per 100 miles. Framed this way, the running cost is easy to picture: at $3.50 a gallon, every 100 miles costs about $9.28.
Key Concepts
The second fill-up is the measurement: MPG works because the fuel you add back is exactly what the drive consumed. Stop the pump early, or start from a tank that was not truly full, and the gallons figure no longer matches the miles.
US and imperial gallons are different sizes: A US gallon is 3.785 liters and an imperial gallon 4.546. That gap is why UK MPG figures look about 20% better than American ones for identical cars. Always check which gallon a quoted figure refers to before comparing.
Fuel per distance beats distance per fuel: MPG is nonlinear, so equal-looking improvements are not equal savings. Moving from 15 to 20 MPG saves 1.67 gallons per 100 miles, while 40 to 45 MPG saves only 0.28. L/100km and gallons per 100 miles avoid this trap because they scale evenly.
One tank is a sample of one: A week of motorway driving and a week of school runs will produce very different numbers from the same car. Log three or four tanks and divide total distance by total fuel for a figure that means something.
Dashboard readouts are estimates: The trip computer infers consumption from injector timing and airflow, and most of them read a few percent optimistic. Pump receipts and the odometer do not have that problem.
Common Mistakes
Measuring a single tank without filling completely: A partial fill at either end breaks the link between the miles and the gallons. Fill right up both times, and log several tanks before you trust the average.
Expecting the EPA label to be a promise: Those figures come from lab tests and are already adjusted down by about 10%. Real driving involves weather, terrain, traffic, and habits that no dynamometer reproduces.
Confusing US and UK gallons: The same car reads roughly 20% higher in imperial MPG. Comparing a British review figure against an American one without converting makes one car look far better than it is. Use the fuel unit selector so the conversion happens for you.
Averaging MPG figures instead of the totals: Taking the mean of 25, 30, and 28 gives the short tanks the same weight as the long ones. Add up all the miles, add up all the gallons, then divide.
Comparing tanks driven differently: A holiday road trip against a month of city commuting tells you about the driving, not the car. Keep the comparison to similar conditions when you are testing whether something changed.
Frequently Asked Questions
Divide the miles you drove by the gallons of fuel it took to replace what you used. Drive 300 miles, put 12 gallons in, and you are getting 25 MPG. The arithmetic is trivial; getting a trustworthy number depends entirely on measuring both figures over the same stretch of driving.
The full-tank method. Fill the tank all the way, reset the trip meter, drive normally until you are down to a quarter tank or so, then fill up completely again. The gallons on the second receipt are exactly what you burned over the miles on the trip meter, so dividing one by the other gives you real economy rather than a dashboard estimate.
Through standardized laboratory tests rather than road driving. Vehicles run set drive cycles on a dynamometer while the exhaust is collected, and the carbon in those exhaust gases is measured to work backwards to how much fuel was burned. Running it in a lab is what makes the numbers comparable between cars, since every vehicle faces identical conditions.
Because a lab cannot reproduce your commute. The EPA already reduces its raw test results by around 10% to bring them closer to real conditions, and even then the label assumes moderate speeds, flat ground, and steady driving. Hills, headwinds, cold starts, roof racks, low tire pressure, short trips, and a heavy right foot all pull the real figure down. Coming in a bit under the sticker is normal.
Divide 235.215 by your US MPG. A car doing 30 MPG uses 235.215 ÷ 30 = 7.84 L/100km. That constant comes from the unit conversion itself: 3.785411784 liters per US gallon, multiplied by 100, divided by 1.609344 km per mile. Careful with the direction of this one, since MPG goes up as efficiency improves while L/100km goes down.
The inverse of MPG scaled to a fixed distance: (1 ÷ MPG) × 100. A car returning 37.7 MPG uses 0.0265 gallons per mile, or 2.65 gallons per 100 miles. It is a more honest way to compare vehicles than MPG, because fuel used per distance is linear. Going from 15 to 20 MPG saves far more fuel than going from 40 to 45, even though both look like a 5 MPG improvement.