Gas Mileage Calculator
Calculate gas mileage online from trip distance and fuel used, converting MPG, km/L, L/100 km, trip cost, range, and forecasts for fuel planning.{{ summaryHeading }}
| 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 }} |
Introduction:
Gas mileage compares how far a vehicle travels with the amount of fuel it uses. In U.S. driving logs, that relationship is usually expressed as miles per gallon (MPG). In many metric contexts, the same fuel-use record is read as kilometers per liter or liters per 100 kilometers. These measures are related, but they do not feel the same when you compare vehicles, trips, or fuel costs.
Distance-per-fuel measures such as MPG and km/L get better as the number rises. Fuel-per-distance measures such as L/100 km and gal/100 mi get better as the number falls. That difference matters because fuel-per-distance is usually easier to connect to actual fuel used. A change from 15 to 20 MPG saves more fuel over the same distance than a change from 35 to 40 MPG, even though both changes look like five MPG.
Manual fuel economy is only as reliable as the interval you measure. The distance and fuel amount need to describe the same trip, tank, or refill span. A partial fill, a missed receipt, or a distance reading from a different interval can make the number look precise while the underlying record is mismatched.
Real-world mileage is also not a fixed vehicle trait. Traffic, tire pressure, weather, air conditioning, cargo, route speed, and driving style can all move the number. The safest reading is practical and comparative: use the same measurement habit over time, then watch for changes large enough to affect budget, range, or maintenance decisions.
Technical Details:
Fuel economy is a ratio. The numerator and denominator change depending on the convention, but the underlying record is still distance traveled and fuel consumed. MPG and km/L divide distance by fuel, so higher values mean the vehicle travels farther for each unit of fuel. L/100 km and gal/100 mi divide fuel by a fixed distance, so lower values mean less fuel is needed for the same travel.
The calculator normalizes both U.S. and metric trip logs so the same entry can be shown in all four common views. U.S. mode treats the entered distance as miles and the entered fuel as U.S. gallons. Metric mode treats the entered distance as kilometers and the entered fuel as liters. Optional price, tank capacity, and reference MPG values add cost, range, and target-comparison outputs without changing the core fuel economy calculation.
Formula Core:
The main formulas all start from the same matched distance and fuel interval.
Cost and range formulas use the measured fuel economy after the unit conversion. Trip fuel cost is entered fuel multiplied by fuel price. Cost per mile and cost per kilometer divide that trip cost by normalized distance. Estimated tank range multiplies the optional tank capacity by measured fuel economy after converting tank volume to the matching unit.
| Rule | Value or condition | Effect on results |
|---|---|---|
| Kilometers to miles | 1 km = 0.621371192237334 mi |
Metric entries can still produce Miles per gallon and gal/100 mi. |
| Liters to U.S. gallons | 1 L = 0.2641720523581484 gal |
Metric fuel logs are converted to U.S. gallons for MPG and reference comparison. |
| Reference comparison | Reference MPG > 0 |
Adds Reference MPG gap and Fuel delta vs reference. |
| Forecast points | 25%, 50%, 75%, 100%, 125%, 150% |
Scales distance and fuel from the current trip to build the Fuel Use Forecast and curve. |
| Field | Required rule | Why it matters |
|---|---|---|
Distance driven |
Must be greater than zero. | A zero or blank distance cannot produce a meaningful distance-per-fuel result. |
Fuel used |
Must be greater than zero. | The fuel amount is the denominator for MPG and the numerator for consumption metrics. |
Fuel price |
Optional, but cannot be negative. | Positive values enable trip cost, cost per mile, and cost per kilometer. |
Tank capacity |
Optional, but cannot be negative. | Positive values enable estimated tank range. |
Reference MPG |
Optional, but cannot be negative. | Positive values enable target fuel-use and MPG-gap comparisons. |
Everyday Use & Decision Guide:
Use Miles and U.S. gallons when your odometer and pump receipt are in U.S. units. Use Kilometers and liters when the log is metric. The most important habit is matching the entries to the same interval, such as one fill-up cycle, one road trip, or one clearly measured commute week.
A good first pass needs only Trip log units, Distance driven, and Fuel used. Add Fuel price when you care about trip cost or reimbursement, Tank capacity when you want a range estimate, and Reference MPG when you are comparing the current tank with a dashboard average, a previous tank, or a published rating.
- Read
Measured Fuel Economyfirst. U.S. mode highlights MPG, while metric mode highlights L/100 km. - Use
Mileage Metricswhen you need all unit conversions in one table. - Use
Trip Cost Rangeafter setting fuel price, tank capacity, or reference MPG. - Use
Fuel Use Forecastfor quick planning at shorter or longer versions of the same trip. - Use
Fuel Use Curvewhen the scaled relationship is easier to read as a line. - Use
JSONwhen you want a structured record of the inputs and computed results.
A single tank can be noisy. If one fill-up looks much worse than usual, check whether the pump stopped early, the tank was not filled the same way, the trip involved unusual traffic, or the distance includes idling-heavy driving. A repeated drop across several comparable fills is more useful than one surprising number.
A high MPG or low L/100 km result does not prove that the vehicle is in perfect condition. It only describes the measured interval. Compare similar routes, similar loading, and the same unit mode before treating a change as meaningful.
Step-by-Step Guide:
- Choose
Trip log units. The unit labels besideDistance drivenandFuel usedshould match your odometer and receipt before you enter numbers. - Enter
Distance drivenandFuel usedfrom the same trip, tank, or fill-up interval. When both are valid, the summary changes fromCheck Gas Mileage InputstoMeasured Fuel Economy. - If an alert appears, fix the named field before using the results.
Distance driven must be greater than zero.andFuel used must be greater than zero.mean the calculation has stopped because the ratio would be meaningless. - Open
Advancedonly for planning extras. SetFuel pricefor cost outputs,Tank capacityfor estimated range, andReference MPGfor a target comparison. - Review
Mileage Metricsfor MPG, km/L, L/100 km, and gal/100 mi. Check that the displayed distance and fuel conversions look plausible before sharing or saving the number. - Open
Trip Cost RangeandFuel Use Forecastif the question is budget or planning. Price must be positive before trip cost and cost-per-distance fields appear as calculated values. - Use
Fuel Use CurveorJSONonly after the tables make sense. Those views reuse the same valid inputs, so they should agree with the summary and table values.
Interpreting Results:
The clearest reading starts with direction. Higher Miles per gallon and Kilometers per liter are better. Lower Liters per 100 km and Gallons per 100 miles are better. When fuel cost matters, the cost-per-distance fields are often easier to act on than the headline mileage number.
| Result cue | How to read it |
|---|---|
Miles per gallon |
Higher means more miles from each U.S. gallon. |
Kilometers per liter |
Higher means more kilometers from each liter. |
Liters per 100 km |
Lower means less fuel for the same 100 km distance. |
Gallons per 100 miles |
Lower means less fuel for the same 100 mile distance and avoids overreading small MPG changes. |
Reference MPG gap |
Positive means the measured MPG is above the reference. Negative means it is below the reference. |
Fuel delta vs reference |
Positive means the trip used more fuel than the reference MPG would have used over the same miles. |
The result is not an official EPA, WLTP, or manufacturer rating. It is a measured record from the numbers you enter. Before using it for a budget, reimbursement, or maintenance decision, verify the units, confirm that distance and fuel come from the same interval, and compare it with at least one similar trip or tank.
Worked Examples:
U.S. fill-up check:
A driver logs 320 mi and 11.2 gal. Mileage Metrics shows 28.57 MPG, 12.15 km/L, 8.23 L/100 km, and 3.50 gal/100 mi. If Fuel price is set to $3.80, Trip fuel cost becomes $42.56 and Cost per mile rounds to about $0.13 / mi.
Metric road trip:
A metric log with 540 km and 42 L returns 7.78 L/100 km and 30.24 MPG. With a 50 L tank capacity, Estimated tank range is about 399 mi / 643 km. The range is an estimate from the measured interval, so heavy traffic or a faster highway leg can still change the next tank.
Reference MPG comparison:
Using the same 320 mi and 11.2 gal entry with Reference MPG set to 30 produces a Reference MPG gap of about -1.43 MPG. Fuel delta vs reference shows about +0.53 gal, meaning the measured trip used a little more fuel than a 30 MPG reference would have used for 320 miles.
Input recovery:
If Fuel used is left at 0, the result panel does not provide mileage rows and the warning says Fuel used must be greater than zero. Enter the gallons or liters from the matching receipt before checking Mileage Metrics, because a zero fuel denominator would make MPG meaningless.
FAQ:
Should I use MPG or L/100 km?
Use the measure that matches your audience or log. MPG is familiar for U.S. fuel economy, while L/100 km is common for metric fuel consumption. The calculator shows both, so the same trip can be compared across conventions.
Why does my dashboard MPG differ from this result?
Dashboard averages may use a different reset point, fuel-flow estimate, or rolling window. This result uses only the entered Distance driven and Fuel used, so it is best compared with a full-tank receipt log or another clearly matched interval.
What does the fuel price field change?
Fuel price does not change MPG, km/L, L/100 km, or gal/100 mi. It only enables cost outputs such as Trip fuel cost, Cost per mile, and Cost per kilometer.
Why am I seeing a validation warning?
Distance and fuel must both be greater than zero, and optional price, tank capacity, and reference MPG cannot be negative. Fix the field named in the warning before reading the result tabs.
Does the calculator store my fuel log?
Calculations run in the browser and no server calculation is needed. Treat copied tables, downloaded files, and shared page URLs as personal driving records because they can contain the values you entered.
Glossary:
- MPG
- Miles per U.S. gallon, a distance-per-fuel measure where higher values are better.
- km/L
- Kilometers per liter, a metric distance-per-fuel measure where higher values are better.
- L/100 km
- Liters per 100 kilometers, a fuel-per-distance measure where lower values are better.
- gal/100 mi
- U.S. gallons per 100 miles, a fuel-per-distance measure useful for comparing actual fuel used.
- Reference MPG
- An optional target MPG used to compare the measured trip with a dashboard average, previous tank, or rating.
- Tank range
- An estimated distance from optional tank capacity and the measured fuel economy.
- Fuel delta
- The difference between measured fuel use and the fuel a reference MPG would have used over the same distance.
References:
- Interactive Version of the Gasoline Vehicle Label, U.S. Environmental Protection Agency, September 25, 2025.
- Text Version of the Gasoline Label, U.S. Environmental Protection Agency.
- Understanding fuel consumption ratings, Natural Resources Canada.
- What Is MPG?, AAA Trip Canvas, June 11, 2024.