Driving & Travel

Fuel economy calculator: mpg, L/100 km, km/L and cost per mile

One measurement, four incompatible units. This page shows how to measure economy properly, where the 235.215 conversion constant comes from, and what the number costs you.

By the Life Calculator team Updated Free, no sign-up Nothing you type leaves your device

Your numbers

You measured in

Result

Result
--

Runs entirely in your browser. Nothing you type is sent anywhere, stored or shared.

In short

  • Fuel economy is distance divided by fuel added at the next fill, measured over at least 200 miles for a stable answer.
  • Stopping at the first automatic click of the nozzle at both fills matters more than any other part of the measurement.
  • A US gallon is 3.785 liters and an imperial gallon is 4.546, so imperial mpg is US mpg multiplied by 1.20095.
  • The constant 235.215 comes directly from dividing 100 times 3.785411784 liters by 1.609344 kilometers per mile.
  • A sustained 10 percent drop in economy, once weather and route mix are ruled out, is a useful early mechanical warning.
On this page
  1. The formula
  2. A worked example, done by hand
  3. How to measure it: the fill-to-fill method
  4. Where each input comes from
  5. US gallons versus imperial gallons
  6. Where the constant 235.215 comes from
  7. Trip computers and official ratings
  8. Turning economy into cost
  9. Using economy tracking to spot a problem early
  10. What this model leaves out
  11. Common mistakes

Fuel economy is one measurement expressed in at least four incompatible units. The same car can be described as 30 mpg in the United States, 36 mpg in the United Kingdom, 7.84 liters per 100 km across most of Europe, and 12.75 kilometers per liter in parts of Asia and South America -- all without a drop of fuel changing hands.

This calculator takes a distance and the fuel used to cover it, in either unit system, and returns every one of those figures plus the cost per mile, the cost per 100 miles and an annual fuel cost at a reference 12,000 miles a year.

The arithmetic is a single division. The hard part is getting a trustworthy pair of numbers to divide, which is what most of this page is about.

The formula

Formula: mpg = miles driven / US gallons used, and in metric L/100 km = (liters used / kilometers driven) x 100. The two are linked by L/100 km = 235.215 / mpg.

Every symbol:

  • miles driven -- odometer or trip-meter distance between two fills.
  • gallons or liters used -- the amount added at the second fill, which is exactly what the car burned since the first one.
  • mpg -- miles per US gallon.
  • L/100 km -- liters consumed per 100 kilometers.
  • km/L -- kilometers per liter, which is 100 / (L per 100 km).
  • imperial mpg -- miles per imperial gallon, which is US mpg x 1.20095.
  • price -- what you pay per gallon or liter, used only for the cost lines.

Cost follows directly: cost per mile = price per gallon / mpg, and annual cost = 12,000 / mpg x price.

A worked example, done by hand

You reset the trip meter at a fill, drive 312 miles, and the next fill takes 10.4 gallons. The pump price on that day is $3.40, used here as an example.

  1. Economy: 312 / 10.4 = 30.0 mpg.
  2. Imperial mpg: 30.0 x 1.20095 = 36.03 mpg (imperial).
  3. Liters per 100 km: 235.215 / 30.0 = 7.84 L/100 km.
  4. Kilometers per liter: 100 / 7.84 = 12.75 km/L.
  5. Cost per mile: 3.40 / 30.0 = $0.113.
  6. Cost per 100 miles: 0.113 x 100 = $11.33.
  7. Annual cost at 12,000 miles: 12,000 / 30.0 x 3.40 = $1,360.

Every one of those describes the identical performance. Only the units differ.

How to measure it: the fill-to-fill method

The method is simple and the discipline is everything.

  1. Fill the tank and stop at the first automatic click of the nozzle. Do not add more by hand.
  2. Reset the trip meter, or write down the odometer reading.
  3. Drive normally for at least 200 miles, ideally a mix of your usual conditions.
  4. Refill at the same pump if you can, and again stop at the first click.
  5. Divide the distance by the volume added. That volume is precisely what the engine consumed.

The nozzle rule matters more than anything else on the list. Fuel tanks have irregular shapes and long filler necks, so "full" depends entirely on how you stop filling. Topping off by hand at one fill and clicking off at the next injects an error straight into the numerator of your division.

Distance is the smaller worry: odometers are usually accurate within a couple of percent, and non-standard tire sizes are the main cause of drift.

Why one short tank is unreliable. Suppose the true economy is 30 mpg and your fill-level discipline is off by half a gallon in either direction. Here is the range of answers that produces:

Distance measured Fuel actually used Lowest reading Highest reading Spread
150 miles 5.00 gal 27.27 mpg 33.33 mpg 6.06 mpg
200 miles 6.67 gal 27.91 mpg 32.43 mpg 4.53 mpg
300 miles 10.00 gal 28.57 mpg 31.58 mpg 3.01 mpg
400 miles 13.33 gal 28.92 mpg 31.17 mpg 2.25 mpg

A half-gallon slip over 150 miles moves the answer by six mpg -- larger than most of the differences people are trying to detect. The same slip over 400 miles moves it by a third as much, because the error is fixed while the denominator grows.

Averaging three or four consecutive tanks does the same job. The fill errors partly cancel, and you get a figure stable enough to plan with, which is the input the fuel cost calculator needs.

Where each input comes from

Distance traveled. A trip meter reset at the pump is the cleanest source. If you forgot, subtract odometer readings. Do not use a mapping app's route distance -- it does not include your detours.

Fuel used. The pump total on the receipt at the second fill. Not the tank capacity, not an estimate, not what the fuel gauge suggests.

Fuel price. The price on that receipt, for the grade you buy. It only affects the cost lines, never the economy figures.

Unit system. Match it to how you measured. Kilometers with gallons produces a meaningless result.

The output is far more sensitive to the fuel figure than to the distance, because the fuel number is small and a fixed measurement error is a large fraction of it. Half a gallon out of 10 is a 5 percent error; two miles out of 312 is 0.6 percent.

US gallons versus imperial gallons

A US gallon is 3.785411784 liters. An imperial gallon is 4.54609 liters -- about 20 percent larger. Both are called a gallon, and neither is a rounding of the other.

The consequence is that the same car "gets better mpg" in the United Kingdom without any change whatsoever. Miles per gallon means miles per larger container, so the number rises:

imperial mpg = US mpg x (4.54609 / 3.785411784) = US mpg x 1.20095

Thirty US mpg is 36.03 imperial mpg. Running that backward, a British review quoting 45 mpg is describing 37.5 US mpg. Comparing a US figure with a UK figure without converting overstates the British car by about a fifth, which is the single most common error in cross-market vehicle comparisons.

The metric constant changes too. For imperial gallons it is L/100 km = 282.481 / imperial mpg, not 235.215.

Where the constant 235.215 comes from

It is not arbitrary; it falls straight out of the unit definitions.

Start with 1 mpg, meaning one mile traveled per US gallon burned. Substitute the exact conversions: one mile is 1.609344 km, and one US gallon is 3.785411784 liters. So 1 mpg is 1.609344 km per 3.785411784 liters.

Invert to get consumption:

liters per km = 3.785411784 / 1.609344 = 2.3521458

Multiply by 100 to get liters per 100 km:

235.21458 liters per 100 km, at 1 mpg

Because consumption is inversely proportional to efficiency, any other value scales the same way:

L/100 km = 235.215 / mpg

The relationship is symmetric -- mpg = 235.215 / (L/100 km) -- which is why one constant converts in both directions. Kilometers per liter is a third form: km/L = 100 / (L/100 km), or equivalently mpg / 2.3521458.

Trip computers and official ratings

Dashboard readouts usually read high. They estimate fuel flow from injector pulse width and other modeled quantities rather than measuring liquid volume, and the calibration tends to be optimistic. A readout two to five percent above the fill-to-fill figure is common. The instantaneous display is even less useful; it responds to throttle position more than to anything you can act on.

Trip computers are still worth watching for changes. A readout that is consistently optimistic by the same margin is a perfectly good relative instrument, and you can calibrate it once against a few measured tanks.

Official ratings are test results, not predictions. Ratings come from standardized laboratory cycles designed for comparability between vehicles, with defined speed traces, ambient temperature and no accessory load. Combined figures are a weighted blend of a city cycle and a highway cycle.

Real driving departs from the cycle in ways the cycle cannot capture: sustained speeds above roughly 55 mph, cold starts on short trips, hills, roof racks, heavy traffic and air conditioning. Use official ratings to compare one car with another -- that is what they are built for -- and your own measurement to predict your own costs.

Turning economy into cost

Economy is only interesting once it becomes money. All figures below use an assumed $3.40 a gallon.

US mpg Imperial mpg L/100 km km/L Cost per mile Cost per 100 miles 12,000 miles a year
20 24.02 11.76 8.50 $0.170 $17.00 $2,040
25 30.02 9.41 10.63 $0.136 $13.60 $1,632
30 36.03 7.84 12.75 $0.113 $11.33 $1,360
35 42.03 6.72 14.88 $0.097 $9.71 $1,166
40 48.04 5.88 17.01 $0.085 $8.50 $1,020
45 54.04 5.23 19.13 $0.076 $7.56 $907
50 60.05 4.70 21.26 $0.068 $6.80 $816

Read the L/100 km column rather than the mpg column when comparing. The step from 20 to 25 mpg cuts consumption by 2.35 L/100 km; the step from 45 to 50 cuts it by 0.53, less than a quarter as much, despite being the same five-mpg move. Fuel cost tracks consumption, not efficiency.

The annual column assumes 12,000 miles as a reference. Scale it to your own mileage: at 18,000 miles multiply by 1.5. For a car used mostly to commute, the commute cost calculator builds the same per-mile figure into a fuller picture, and the EV versus gas comparison restates it in cents per mile against electricity.

Using economy tracking to spot a problem early

A logged economy figure is a cheap diagnostic. Fuel consumption responds to almost everything mechanical, often before anything else is noticeable.

A sustained drop of 10 percent or more, once weather and driving pattern are ruled out, is worth investigating. Common causes include underinflated tires, a dragging brake caliper, a clogged air filter, a failing oxygen sensor or thermostat, and simple added drag from a roof rack left on.

Three cautions when reading a drop:

  • Seasonality is real. Winter economy falls for reasons that have nothing to do with the car: cold starts, denser air, winter fuel blends, heating and defrosting load, and more idling.
  • Compare like with like. A month of highway driving followed by a month of city errands will show a large drop that means nothing.
  • One tank is noise. Use a rolling average of three or more, for the reasons in the spread table above.

Logging tank by tank -- distance, volume and price -- takes a few seconds per fill and builds a baseline that makes a genuine change obvious.

What this model leaves out

  • Driving conditions. A single figure averages whatever mix of driving happened between the two fills.
  • Load and passengers. Extra weight and roof loads are not separated out.
  • Weather and season. No temperature adjustment.
  • Fuel grade and blend. Ethanol content varies by region and season, and blends carry slightly different energy per gallon.
  • Odometer error. Non-standard tire sizes shift the distance reading.
  • Idling time. Fuel burned while stationary lowers the average with no distance to show for it.
  • Everything that is not fuel. Tires, maintenance and depreciation are excluded; the cost per use calculator is one way to spread those.
  • Price movement. The annual figure holds your entered price constant for a whole year.

Common mistakes

Using tank capacity instead of fuel added. The tank is never empty at a fill. The pump total is the only figure that reflects what was actually burned.

Inconsistent filling. Clicking off at one fill and topping up at the next is the largest single source of error in the whole method.

Measuring over too short a distance. Under 200 miles, a small fill error swamps the result.

Comparing US and imperial mpg directly. They differ by a factor of 1.201, and the imperial figure always looks better.

Trusting the dashboard readout as an absolute. It is a good relative instrument and an optimistic absolute one.

Reading one bad tank as a fault. Weather, traffic and route mix explain most single-tank swings.

Mixing units. Kilometers divided by gallons is not a fuel economy figure in any system.

Every driving tool on the site is listed on the calculators index.

Frequently asked questions

How do I calculate my mpg?
Fill the tank and stop at the first automatic click of the nozzle, then reset the trip meter. Drive at least 200 miles of normal driving and refill, again stopping at the first click. Divide the miles driven by the gallons added. If the trip meter reads 312 miles and the pump delivers 10.4 gallons, the economy is 312 divided by 10.4, or 30.0 mpg. The volume added is exactly what the engine consumed.
Where does the number 235.215 come from?
It follows from the unit definitions. One mile is 1.609344 kilometers and one US gallon is 3.785411784 liters, so 1 mpg means 1.609344 km per 3.785411784 liters. Inverting gives 2.3521458 liters per kilometer, and multiplying by 100 gives 235.21458 liters per 100 km at 1 mpg. Because consumption is inversely proportional to efficiency, L/100 km equals 235.215 divided by mpg, and the same constant converts back the other way.
Why does the same car get better mpg in the UK?
Because an imperial gallon is larger. A US gallon holds 3.785411784 liters while an imperial gallon holds 4.54609 liters, roughly 20 percent more. Miles per gallon means miles per container, so the same car covers more miles per imperial gallon. The conversion is US mpg multiplied by 1.20095: 30 US mpg is 36.03 imperial mpg. Comparing a British figure with an American one without converting overstates the British car by about a fifth.
Why is my trip computer's mpg different from my calculation?
Dashboard readouts estimate fuel flow from injector pulse width and other modeled quantities rather than measuring liquid volume, and they are usually calibrated optimistically. A reading two to five percent above the fill-to-fill figure is common. The instantaneous display is less useful still, since it tracks throttle position moment to moment. Trip computers remain good relative instruments: once you know the offset, changes in the readout are meaningful even if the absolute value is not.
How many miles should I drive before measuring?
At least 200, and more is better. A fixed error in how full the tank was is a large fraction of a small fuel volume and a small fraction of a large one. If the true economy is 30 mpg and your fill discipline varies by half a gallon, the answer over 150 miles can land anywhere from 27.3 to 33.3 mpg, a six mpg spread. Over 400 miles the same error narrows the spread to about 2.3 mpg.
What is the difference between combined, city and highway ratings?
They come from different standardized laboratory test cycles. The city cycle simulates low-speed driving with frequent stops, the highway cycle simulates steadier higher-speed running, and the combined figure is a weighted blend of the two. All are measured under controlled conditions with no accessory load, so they are designed for comparing one vehicle with another rather than for predicting what any individual driver will see on their own routes.
Can falling fuel economy indicate a mechanical problem?
It can. Consumption responds to almost anything that adds drag or disturbs combustion, often before a driver notices a symptom. A sustained drop of 10 percent or more, after ruling out cold weather and a change in route mix, is worth investigating. Underinflated tires, a dragging brake caliper, a clogged air filter, a failing sensor or thermostat, and a roof rack left in place are all common causes. Use a rolling average of several tanks, not one.
Should I compare cars using mpg or L/100 km?
L/100 km, or gallons per 100 miles, is the better comparison unit because fuel cost is proportional to consumption rather than to efficiency. Equal steps in mpg are not equal savings: moving from 20 to 25 mpg cuts consumption by 2.35 L/100 km, while moving from 45 to 50 cuts it by only 0.53, less than a quarter as much. Converting to a consumption unit before comparing prevents that distortion.

Sources and further reading

Where this page relies on a published formula, an official figure or a legal rule, the primary source is listed here. External links open in a new tab and we earn nothing from them.

  1. FuelEconomy.gov -- official U.S. fuel economy ratings and test cycles
  2. U.S. Environmental Protection Agency -- vehicle fuel economy testing
  3. National Institute of Standards and Technology -- unit definitions and conversions
  4. U.S. Energy Information Administration -- fuel supply and price data
  5. Alternative Fuels Data Center -- vehicle efficiency comparisons