Gas Mileage Calculator
With miles driven 342 mi, gallons to refill 12.4 gal, price per gallon 3.45 usd, gas mileage comes to 27.6 mpg — miles per gallon. It is reached in 4 steps, the last of which is 342 / 12.4, and each one is printed on the page with its numbers filled in. The formula is the one published by US Department of Energy, not an approximation fitted to it.
Miles per gallon from a tank of fuel and the miles it covered, with the liters-per-100-km figure and the cost per mile it works out to.
Formula and sources checked · How we check
Miles driven 342 mi, Gallons to refill 12.4 gal, Price per gallon 3.45
27.6 mpg
Miles per gallon for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.
It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.
- Miles per gallon
342 / 12.427.581 mpg- Liters per 100 km
235.21458 / 27.5806458.528- Cost per mile
3.45 / 27.5806450.125- Cost per 100 miles
0.1250877 * 10012.509
Worked example
342 miles on 12.4 gallons is 27.6 mpg, or 8.5 liters per 100 km, and 12.5 cents a mile at $3.45. One tank is a noisy sample: a headwind, a roof box or a week of short trips moves it by several mpg, so average three fills before believing a change.
How to work it out yourself
- 1.Fill the tank and reset the trip meter, or write down the odometer.
- 2.Drive normally until the next fill, then fill to the same point — the pump clicking off is repeatable, topping up by hand is not.
- 3.Divide the miles by the gallons it took. Liters per 100 km is 235.215 divided by the mpg figure, and it runs the other way: a lower number is better.
The formula
- Miles per gallon
342 / 12.4 - Liters per 100 km
235.21458 / 27.580645 - Cost per mile
3.45 / 27.580645 - Cost per 100 miles
0.1250877 * 100
Questions people actually ask
- Why does the trip computer disagree with this?
- Trip computers estimate fuel use from injector timing rather than measuring it, and most read optimistic by a few per cent. The brim-to-brim method measures the fuel that actually went in, which is why it is the one worth trusting when the two differ.
- Why is mpg not the reciprocal of liters per 100 km?
- Because they are inverses of each other rather than scalings: mpg is distance over fuel, l/100 km is fuel over distance. The conversion is 235.215 divided by the figure, in either direction. It also means equal mpg gains are not equal fuel savings — going from 15 to 20 mpg saves far more fuel than going from 40 to 45.
- How many tanks before the number means anything?
- Three or more. A single tank carries the weather, the traffic and how full the last fill really was; the spread between consecutive tanks on the same car is routinely 10%.
Related
- Fuel Cost CalculatorWhat a trip costs in fuel, from its distance, the mileage the vehicle really gets and the pump price — with the cost per mile to compare on.
- Speed & Pace CalculatorAverage speed and running pace from a distance and a time, in both imperial and metric.
- Mileage Reimbursement CalculatorMileage deduction or reimbursement at the IRS standard rates, split across the mid-year rate change.
- Fuel Consumption ConverterMiles per gallon, liters per 100 km and kilometers per liter from any one of them, with the US and imperial gallons kept apart.
- Salary CalculatorPay converted between every period — hourly, daily, weekly, biweekly, semi-monthly, monthly and annual — with unpaid holidays and days off taken out.
- Tip CalculatorTip and total from a bill, and what each person owes once it is split — including the rounding that makes the split come out even.
Put this calculator on your site
Free, no attribution required beyond the link.
<iframe src="https://rulecalculators.com/embed/gas-mileage" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="Gas Mileage Calculator"></iframe>