Gas Mileage Calculator
Calculate gas mileage from a trip or fill-up, compare MPG with L/100 km, and estimate fuel cost, tank range, and reference gaps.| Metric | Value | Detail | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.value }} | {{ row.detail }} |
| Item | Value | Use | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.value }} | {{ row.detail }} |
| Scenario | Distance | Fuel needed | Trip cost | Copy |
|---|---|---|---|---|
| {{ row.label }} | {{ row.distanceDisplay }} | {{ row.fuelDisplay }} | {{ row.costDisplay }} |
Fuel economy is easiest to trust when the fuel amount and the distance come from the same real driving interval. A receipt from Monday, an odometer reading from Friday, and a tank capacity from the owner's manual each describe something useful, but they do not become a mileage number until they line up. The calculation is a ratio, and a ratio only tells the truth when its two sides are measuring the same trip, tank, or route segment.
Drivers usually meet this problem in ordinary situations: checking whether a commute became more expensive, comparing a highway trip with city errands, estimating fuel for a long drive, or deciding whether a sudden low-MPG tank is worth investigating. The same vehicle can return different numbers after cold starts, stop-and-go traffic, high speed, heavy cargo, soft tires, roof racks, hills, wind, or air-conditioning load. Gas mileage is therefore a useful clue, not a permanent label for the vehicle.
Two kinds of fuel-economy numbers are common. Distance-per-fuel measures such as miles per gallon and kilometers per liter rise as the vehicle improves. Fuel-per-distance measures such as liters per 100 kilometers and gallons per 100 miles fall as the vehicle improves. Both describe the same fuel use, but they answer different questions.
| Unit | Question it answers | Better direction |
|---|---|---|
| MPG | How many miles one gallon covers. | Higher |
| km/L | How many kilometers one liter covers. | Higher |
| L/100 km | How many liters are burned over 100 kilometers. | Lower |
| gal/100 mi | How many gallons are burned over 100 miles. | Lower |
Personal mileage logs differ from official label values. A label is built for controlled comparison across vehicles, while a fill-up log captures one driver's route, maintenance, weather, cargo, and refueling habits. That makes repeated personal measurements valuable for spotting a change in a familiar pattern. It also means a single unusually good or bad tank should be treated with caution until the same kind of driving repeats.
Cost and range estimates add practical context after the ratio is known. Multiplying fuel used by pump price gives a trip fuel cost, and multiplying tank capacity by measured efficiency gives a rough full-tank range. Both estimates assume the next drive behaves like the measured one, so they are planning numbers rather than promises.
How to Use This Tool:
Start with one trip, tank, or fill-up interval. Optional price, tank, and reference values add cost, range, and benchmark detail without changing the core mileage ratio.
- Choose Trip log units: Km + L for kilometer-and-liter records or Miles + gal for U.S. odometer and pump records.
- Enter Distance driven from the trip meter, odometer difference, route log, or another record that covers the same interval as the fuel amount.
- Enter Fuel used from the pump receipt or trip log for that same interval. Do not use full tank capacity unless the full tank was actually consumed over the measured distance.
If the warning says Distance driven or Fuel used must be greater than zero, the mileage ratio is not ready. Correct those two fields before reading the summary.
- Open Advanced when you need extra planning fields. Add Fuel price for Trip fuel cost, add Tank capacity for Estimated tank range, and add Reference MPG when comparing against a label, dashboard average, or previous tank.
- Read Mileage Metrics first. Use it to compare MPG, km/L, L/100 km, and gal/100 mi in one place.
- Use Trip Cost Range for cost per mile, cost per kilometer, tank range, and reference gap results. A zero optional field leaves its related result marked as not set or not calculated.
- Check Fuel Use Forecast and Fuel Use Curve only as scaling views. They extend the measured fuel rate to shorter and longer distances, so they work best when the future route resembles the measured drive.
Interpreting Results:
Measured Fuel Economy is the headline value. In Km + L mode the summary emphasizes L/100 km; in Miles + gal mode it emphasizes MPG. The detailed rows still show both U.S. and metric readings so the same trip can be compared across unit systems.
- MPG and km/L improve as the number rises.
- L/100 km and gal/100 mi improve as the number falls.
- Trip fuel cost is entered fuel multiplied by entered price. It does not include tolls, parking, maintenance, depreciation, or price changes along the route.
- Reference MPG gap is current MPG minus the reference. A negative gap means the measured trip used more fuel than the reference would predict.
- Fuel delta vs reference turns the reference gap into extra or saved gallons and liters over the same distance.
False confidence usually comes from comparing unlike trips. Before treating a result as a trend, recheck the same route type, season, tire pressure, load, fuel grade, and refueling habit. A worse city week does not contradict a good highway tank, and an official label value is still a comparison benchmark rather than a guarantee for every driver.
Technical Details:
Fuel economy calculations first normalize the entered distance and fuel into both U.S. and metric quantities. Metric entries are converted to miles and gallons for MPG and reference comparisons, while U.S. entries are converted to kilometers and liters for metric consumption. Once the shared quantities are available, every displayed metric comes from the same matched interval.
The inverse relationship between MPG and fuel-per-distance metrics is why small-looking MPG changes can have different fuel savings. Over a fixed distance, fuel use is proportional to gallons per mile or liters per kilometer. Raising a low MPG value can save much more fuel than the same MPG increase at an already efficient value.
Formula Core:
The core formulas divide distance by fuel for distance-per-fuel readings, invert the ratio for fuel-per-distance readings, and multiply by price or tank capacity only for optional planning outputs.
| Quantity | Rule | Result use |
|---|---|---|
| Miles from kilometers | km * 0.621371192237334 | MPG and reference comparison for metric entries |
| Gallons from liters | L * 0.2641720523581484 | MPG, gal/100 mi, and fuel delta for metric entries |
| Kilometers from miles | mi / 0.621371192237334 | Metric distance outputs for U.S. entries |
| Liters from gallons | gal / 0.2641720523581484 | km/L, L/100 km, and metric fuel outputs for U.S. entries |
| Tank range | tank fuel * measured efficiency | Estimated miles and kilometers from optional tank capacity |
| Forecast rows | entered distance and fuel * 0.25, 0.50, 0.75, 1.00, 1.25, or 1.50 | Scaled fuel and cost planning at the measured rate |
For a metric fill-up of 515 km and 42.4 L, the normalized distance is about 320.0 miles and the normalized fuel amount is about 11.20 gallons. The same interval is 28.57 MPG, 12.15 km/L, 8.23 L/100 km, and 3.50 gal/100 mi. Against a 32 MPG reference, the gap is -3.43 MPG and the trip used about 1.20 extra gallons, or 4.55 extra liters, over that distance.
| Field | Accepted value | Why the boundary matters |
|---|---|---|
| Distance driven | Greater than zero | Zero distance cannot produce a mileage ratio. |
| Fuel used | Greater than zero | Zero fuel would divide by zero for MPG and km/L. |
| Fuel price | Zero or greater | Zero leaves cost fields inactive; negative prices are rejected. |
| Tank capacity | Zero or greater | Zero leaves range inactive; a positive value estimates full-tank range. |
| Reference MPG | Zero or greater | Zero leaves the benchmark inactive; a positive value calculates gap and fuel delta. |
Displayed values are rounded for reading, but the underlying ratios use the normalized values before formatting. Cost per mile and cost per kilometer use the entered fuel price and the normalized distance, while the chart and forecast table keep a constant fuel rate across the listed distance factors.
Accuracy Notes:
Receipt-based mileage is a field estimate, not a laboratory rating. It becomes more useful when the measurement habit stays consistent.
- Fill to a similar shutoff point when comparing tanks, especially if the pump stops early or the tank was not filled completely.
- Short trips can exaggerate cold-start, idling, traffic, and cabin climate effects.
- Dashboard averages may use rolling estimates that do not match receipt math exactly.
- Official MPG values are meant for fair comparison across vehicles; personal results depend on route, weather, driver behavior, load, and vehicle condition.
Worked Examples:
These cases show how the same ratio turns into efficiency, cost, range, and troubleshooting decisions.
Metric fill-up with a reference
A driver selects Km + L, enters 515 km for Distance driven, 42.4 L for Fuel used, and 32 for Reference MPG. The result shows 8.23 L/100 km and 28.57 MPG, with a -3.43 MPG reference gap and about 1.20 extra gallons over the same interval.
U.S. trip cost check
A 312 mile trip using 11.8 gallons returns 26.44 MPG. With Fuel price set to $3.60 per gallon, Trip fuel cost is $42.48 and Cost per mile rounds to $0.14.
Range planning from tank capacity
The same 515 km and 42.4 L metric fill-up, paired with a 50 L Tank capacity, estimates about 607 km, or 377 miles, of full-tank range. That is a useful route-planning number only if the next route uses fuel at roughly the same rate.
Missing fuel interval
Leaving Fuel used at zero keeps the result from being ready because distance divided by zero fuel cannot produce a valid mileage ratio. Enter the pump amount for the same interval, or start a new trip log and measure the next fill-up instead.
Advanced Tips:
- Use gal/100 mi or L/100 km when comparing fuel savings across vehicles because fixed-distance fuel use shows the actual amount saved.
- Keep Reference MPG fixed when comparing several tanks so the Fuel delta vs reference rows stay comparable.
- Use Fuel Use Forecast for trips that resemble the measured drive; do not use it for a route with a very different highway, hill, traffic, or load mix.
- Record fuel price in the same unit as the selected fuel input. In metric mode the price is per liter; in U.S. mode it is per gallon.
- When a single result looks unusual, repeat the calculation after checking tire pressure, roof load, maintenance changes, and refueling consistency.
FAQ:
Why do MPG and L/100 km move in opposite directions?
MPG measures distance per fuel, so higher means the vehicle travels farther on one gallon. L/100 km measures fuel per fixed distance, so lower means less fuel is burned over 100 kilometers.
Should Fuel used equal Tank capacity?
No. Fuel used should be the fuel consumed during the measured interval. Tank capacity is optional and is used only for Estimated tank range.
Why is Reference MPG still MPG in metric mode?
Reference MPG expects an MPG target because many labels, dashboard averages, and comparison articles use MPG. The metric result still appears in Mileage Metrics.
Why does the fuel forecast form a straight line?
Fuel Use Forecast multiplies the entered distance and fuel by fixed distance factors. It assumes the same fuel rate for each forecast row.
What should I fix when the result does not appear?
Make sure Distance driven and Fuel used are greater than zero. Then check that Fuel price, Tank capacity, and Reference MPG are not negative.
Glossary:
- MPG
- Miles per gallon, a distance-per-fuel ratio common in U.S. fuel economy comparisons.
- L/100 km
- Liters per 100 kilometers, a fuel-per-distance ratio where lower means less fuel burned.
- Trip fuel cost
- The entered fuel amount multiplied by the entered fuel price.
- Reference MPG
- An optional comparison target such as a label value, dashboard average, or previous tank.
- Fuel delta vs reference
- The extra or saved fuel compared with what the reference MPG would use over the same distance.
- Tank range
- The estimated distance from optional tank capacity at the measured fuel economy.
References:
- Miles Per Gallon (MPG) Math, US EPA, May 4, 2026.
- Learn More about the Fuel Economy Label (Text Only), US EPA, June 12, 2025.
- Fuel Economy and EV Range Testing, US EPA, July 18, 2025.