Home · Everyday · Life, School & Work · Gas Mileage Calculator

Gas Mileage Calculator

Calculates fuel economy in miles per gallon from a trip's distance and fuel used, with the metric L/100 km equivalent.

Your figures

Example result — edit the figures to make it yours

30 mpg

Fuel economy

Computed from the inputs on this page with the formula below — change any figure and every result updates.

Consumption7.84 L/100 km

What this calculator does

Calculates fuel economy in miles per gallon from a trip's distance and fuel used, with the metric L/100 km equivalent. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.

The formula and method

mpg = miles ÷ gallons · L/100 km = 235.214583 × gallons ÷ miles

Miles per gallon is simply distance divided by fuel burned over the same interval, best measured by filling the tank, recording the odometer, driving, then filling again. The metric figure uses the identity L/100 km = 235.214583 ÷ mpg, rewritten here directly in miles and gallons.

Fill-to-fill measurements vary with pump shut-off, terrain and weather; average several tanks for a stable figure. US gallons are used throughout — an Imperial gallon is about 20% larger and would inflate the mpg figure.

Worked example

With the example inputs this page opens with (miles driven 300, gallons used 10), the result is 30.00 mpg — fuel economy. Computed from the inputs on this page with the formula below — change any figure and every result updates.

Quick reference

Quick reference — varying Gallons used
Gallons usedFuel economyConsumption
6504.704292
837.56.272389
10307.840486
12259.408583
1421.42857110.976681
1618.7512.544778

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

Why does the L/100 km number go down when mpg goes up?

L/100 km measures fuel consumed per fixed distance, so less is better; mpg measures distance per fixed fuel, so more is better. The two are reciprocals up to the 235.214583 conversion constant.

How does the Gas Mileage Calculator work?

Calculates fuel economy in miles per gallon from a trip's distance and fuel used, with the metric L/100 km equivalent. Miles driven · Gallons used → Miles per gallon. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Gas Mileage Calculator need?

Miles driven · Gallons used → Miles per gallon. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.

Is the Gas Mileage Calculator free to use?

Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.