What this calculator does
Miles per gallon measures how far a vehicle travels on a gallon of fuel. Higher is better. This calculator turns odometer and pump numbers into MPG, then adds the money side: what the fuel cost and what each mile cost to drive. It also converts the result to liters per 100 kilometers, the measure used in most of the world, where lower is better. Use it after a fill-up to track your own vehicle instead of relying on the window sticker.
How to use it
- Enter the miles driven since the last fill-up.
- Enter the gallons used to refill the tank.
- Enter the price paid per gallon.
- Read MPG, total fuel cost, cost per mile, and L/100km.
- Repeat over several tanks for a more reliable average.
How it works
Example calculations
Example 1: 300 miles, 10 gallons, $3.50
MPG is 30. Fuel cost is $35.00, cost per mile is about 11.7 cents, and the equivalent is about 7.84 L/100km.
Example 2: 450 miles, 15 gallons, $4.00
MPG is 30 again. Fuel cost is $60.00, cost per mile is about 13.3 cents, and L/100km is about 7.84. The higher price raises the cost but not the efficiency.
Example 3: 200 miles, 8 gallons, $3.25
MPG is 25. Fuel cost is $26.00, cost per mile is 13 cents, and L/100km is about 9.41, worse than the 30 mpg examples.
What the result means
MPG is easy to compare when the numbers are close, but a small change matters more at the low end. Going from 15 to 20 mpg saves more fuel over the same distance than going from 40 to 45 mpg, even though both are a 5 mpg gain. Cost per mile makes that clear because it prices the actual fuel burned. L/100km is popular outside the United States because it scales linearly with fuel used: a car that uses 8 L/100km needs 8 liters for every 100 kilometers. The EPA estimate is a lab figure; real driving usually lands lower, especially with short trips, cold starts, air conditioning, roof racks, and highway speeds above about 60 mph.
Common mistakes
- Dividing gallons by miles instead of miles by gallons.
- Using the window-sticker MPG instead of measuring at the pump.
- Forgetting to reset the trip odometer between fill-ups.
- Mixing imperial gallons with US gallons in the conversion.
- Comparing L/100km and MPG as if higher were better for both.
Assumptions and limits
- Miles and gallons come from the same fill-up period.
- The tank is filled to the same level each time.
- Fuel price is per US gallon in dollars.
- The conversion uses US gallons, not imperial gallons.
- Driving conditions are treated as one average.
Frequently asked questions
How do I calculate MPG by hand?
Divide miles driven by gallons used. If you drove 300 miles and added 10 gallons, that is 30 mpg.
Why is my MPG lower than the sticker?
The label comes from a lab test. Short trips, idling, air conditioning, hills, headwinds, and high speeds all lower real-world mileage.
What is a good MPG?
It depends on the vehicle class. A small sedan and a full-size truck are not comparable; compare your figure with the same model and similar driving.
How do I convert MPG to L/100km?
Divide 235.215 by MPG. For 30 mpg, that is about 7.84 L/100km. The constant assumes US gallons.
Does cost per mile include maintenance?
No. It covers fuel only. Insurance, tires, repairs, and depreciation are separate costs.
Can I use this for a trip?
Yes, if you know the distance and your expected MPG. Enter the trip miles and the gallons you expect to use, or use the fuel cost calculator for a trip estimate.
Sources
2026 update
How to use the professional output
This page is not just a formula box. The result is designed to be checked, compared, and taken away.
- Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
- A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
- Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.
The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.
Go deeper
