ManyTools

Gas Mileage Calculator

Enter how far you drove and how much fuel it took to get your miles per gallon, liters per 100 km and, with a price, fuel cost per mile.

Last updated: November 2, 2026How this is calculated →

Divide the miles you drove by the gallons it took to fill the tank back up from full. 300 miles on 10 gallons is 30 miles per gallon, which is 7.84 liters per 100 km. At 3.50 a gallon that drive cost 35 in fuel, or 0.117 per mile, in the currency of your price.

This calculator works out fuel economy and fuel cost from the numbers you enter and is not a substitute for a mechanic checking a fuel problem. It does not include other running costs, is not an official fuel economy rating, and a single fill-up can be off because pumps shut off at slightly different levels.

Fuel economy

30.00 mpg

Miles per US gallon
30.00
Miles per imperial gallon (UK)
36.03
Kilometers per liter
12.75
Liters per 100 km
7.84
Fuel cost of this distance
35.00
Fuel cost per mile
0.117
Fuel cost per km
0.072

Most accurate when you fill the tank to the same point at the start and the end. Costs are in the currency of the price you enter.

We email you a link back to this page and add you to occasional ManyTools emails; every email has a one-click unsubscribe.

Embed this calculator on your site →

About the Gas Mileage Calculator

A reliable way to measure fuel economy is to fill the tank, reset the trip odometer, drive as usual, then fill up again and note how much fuel went in. That second fill is the fuel used for the trip meter's distance. Miles per gallon is the distance over the fuel, so 300 miles on 10 gallons is 30 mpg. Europe and most other countries use liters per 100 km instead, where a lower number is better: 500 km on 40 liters is 8 L/100 km, or 12.5 km per liter. To switch from US mpg to L/100 km, divide 235.21 by the mpg. Watch the gallon. A UK imperial gallon is 4.54609 liters and a US gallon is 3.785411784, so the same car shows an mpg about 20% higher in the UK. A single tank can mislead, because the pump does not always stop at the same point; averaging several fill-ups gives a steadier figure.

Frequently asked questions

How do I calculate my gas mileage?+

Fill the tank and reset the trip meter. When you next fill up, divide the miles on the trip meter by the gallons that went into the tank. 300 miles on 10 gallons is 30 mpg.

How do I convert mpg to liters per 100 km?+

Divide 235.21 by the US mpg. 30 mpg is 7.84 L/100 km. The calculator shows both, along with km per liter and UK mpg, whichever units you enter.

Why is UK mpg higher than US mpg for the same car?+

The UK uses the imperial gallon of 4.54609 liters, which is larger than the US gallon of 3.785411784 liters. A UK gallon is bigger, so the same fuel counts as fewer gallons and each one covers about 20% more miles, for exactly the same fuel use.

What does the cost per mile include?+

Only fuel. Divide the price you paid for the fuel by the distance. Tires, servicing, parking and the car losing value over time are extra, so the full cost of running a car per mile is higher.

Unit definitions: NIST Special Publication 811 (2008), Appendix B.8: 1 mile = 1.609344 km and 1 imperial gallon = 4.54609 L, both exact. The US gallon is defined as 231 cubic inches, which is exactly 3.785411784 L; the table rounds it to 3.785 412 L.

Embed this calculator

Free to use on your own site. Paste this snippet where you want the gas mileage calculator to appear — it resizes itself automatically.

Embed code
<iframe
  src="https://manytools.co/embed/gas-mileage-calculator"
  title="Gas Mileage Calculator by ManyTools"
  data-manytools="gas-mileage-calculator"
  width="100%"
  height="640"
  loading="lazy"
  style="border:0;width:100%;max-width:720px"></iframe>
<script>
(function () {
  window.addEventListener("message", function (e) {
    if (e.origin !== "https://manytools.co") return;
    var d = e.data || {};
    if (d.type !== "manytools:embed:height" || d.slug !== "gas-mileage-calculator") return;
    var f = document.querySelector('iframe[data-manytools="gas-mileage-calculator"]');
    if (f && d.height) f.style.height = d.height + "px";
  });
})();
</script>
Plain link (fallback)
<a href="https://manytools.co/math/gas-mileage-calculator">Gas Mileage Calculator by ManyTools</a>