This free MPG calculator finds your miles per gallon from the miles you drove and the fuel you used, converts between US mpg, UK mpg, L/100 km and km/L, and works out what a trip or a year of driving costs. Type the numbers and the answer updates with the working shown.
Use the MPG calculator as a gas mileage calculator after a fill-up, as a quick converter when a British ad says 40 mpg and an American one says 33, or as a fuel cost calculator before a road trip. Everything runs in your browser, so nothing you type is sent anywhere.
Quick answer: MPG = miles driven ÷ gallons of fuel used. If you drive 320 miles on 10 US gallons, that is 320 ÷ 10 = 32 mpg. The same car does 38.43 UK mpg (the imperial gallon is 20 percent bigger) and 7.35 L/100 km. At 25 mpg and $3.50 a gallon, a 500 mile trip costs $70.00.

How to use this MPG calculator
The tool has three modes. Choose one at the top of the form.
- Find my MPG: type the distance driven and the fuel used, and choose miles or kilometers and US gallons, imperial gallons or liters.
- Convert MPG: type a fuel economy number, say which unit it is in (US mpg, UK mpg, L/100 km or km/L) and read all four.
- Fuel cost: type the fuel economy, the trip distance, the price and how many miles you drive a year. Pick your currency symbol at the top.
- Open the how it works list for the formula with your numbers, or press Copy result to share the answer.
| Mode | You type | You get |
|---|---|---|
| Find my MPG | distance and fuel used | US mpg, UK mpg, L/100 km and km/L |
| Convert MPG | one fuel economy figure and its unit | the other three units and the range on a tank |
| Fuel cost | economy, distance, fuel price, yearly distance | trip cost, cost per mile or km, yearly and monthly cost |

MPG formula: how to calculate miles per gallon
The MPG formula divides distance by fuel: mpg = miles ÷ gallons. The result tells you how many miles the car goes on one gallon, so a bigger number means a more efficient car. If you know kilometers and liters, change them first: divide kilometers by 1.609344 to get miles and liters by 3.785411784 to get US gallons.
Example 1: miles and US gallons
You fill the tank, drive 320 miles and fill again with 10 US gallons. mpg = 320 ÷ 10 = 32 US mpg. In other units that is 38.43 UK mpg, 7.35 L/100 km and 13.6 km/L.
Example 2: kilometers and liters
You drive 500 km and the pump says 35 liters. That is 500 ÷ 35 = 14.29 km/L, or 35 ÷ 500 × 100 = 7 L/100 km. In miles per gallon it is 33.6 US mpg or 40.35 UK mpg.
Miles per gallon calculator: measuring your real MPG
The most accurate miles per gallon calculator input comes from the full tank method. Fill the tank until the pump clicks off, reset the trip meter, drive as you normally do, then fill the tank again in the same way and write down the gallons added and the miles on the trip meter. Divide the miles by the gallons. Repeat for three or four tanks and average the results, because a single tank can be skewed by one long highway drive or a cold week.
The dashboard figure is only an estimate. It can read a few percent high or low, so check it against a few full tanks. Do not mix units: if the trip meter is in kilometers and the pump in gallons, convert one of them first or let the MPG calculator do it.
UK mpg vs US mpg: the gallon is not the same size
The UK mpg vs US mpg difference is the most common source of confusion. A US gallon is 3.785411784 liters. An imperial (UK) gallon is 4.54609 liters, about 20 percent larger. A car therefore goes 1.2 times as many miles on an imperial gallon, so its UK mpg figure is 1.2 times its US mpg figure: 30 US mpg is 36.03 UK mpg, and 40 UK mpg is 33.31 US mpg.
| Gallon | Liters | Volume | Compared with US gallon | Compared with imperial gallon |
|---|---|---|---|---|
| US liquid gallon | 3.785411784 L | 231 cubic inches | 1 | 0.8327 |
| Imperial (UK) gallon | 4.54609 L | 277.42 cubic inches | 1.2009 | 1 |
To convert US mpg to UK mpg, multiply by 1.20095. To convert UK mpg to US mpg, divide by 1.20095. A 55 mpg car in a British advert is not as efficient as it sounds to an American reader: it is 45.8 US mpg.
MPG to L/100km conversion
L/100 km measures fuel used per distance, so a lower number is better, the opposite of mpg. The conversion is a reciprocal. The MPG to L/100km formula for US gallons is L/100 km = 235.215 ÷ mpg, and for imperial gallons it is 282.481 ÷ mpg. The same two numbers work in reverse: mpg = 235.215 ÷ L/100 km. For example, 8 L/100 km is 235.215 ÷ 8 = 29.4 US mpg and 282.481 ÷ 8 = 35.31 UK mpg.
Kilometers per liter is simpler: km/L = 100 ÷ (L/100 km). A car at 8 L/100 km does 100 ÷ 8 = 12.5 km/L.
US mpg conversion chart
| US mpg | UK mpg | L/100 km | km/L | Gallons per 100 miles |
|---|---|---|---|---|
| 10 | 12.01 | 23.52 | 4.25 | 10 |
| 15 | 18.01 | 15.68 | 6.38 | 6.67 |
| 20 | 24.02 | 11.76 | 8.5 | 5 |
| 25 | 30.02 | 9.41 | 10.63 | 4 |
| 30 | 36.03 | 7.84 | 12.75 | 3.33 |
| 35 | 42.03 | 6.72 | 14.88 | 2.86 |
| 40 | 48.04 | 5.88 | 17.01 | 2.5 |
| 45 | 54.04 | 5.23 | 19.13 | 2.22 |
| 50 | 60.05 | 4.7 | 21.26 | 2 |
| 60 | 72.06 | 3.92 | 25.51 | 1.67 |
| 100 | 120.09 | 2.35 | 42.51 | 1 |
L/100 km conversion chart
| L/100 km | US mpg | UK mpg | km/L |
|---|---|---|---|
| 3 | 78.4 | 94.2 | 33.33 |
| 4 | 58.8 | 70.6 | 25 |
| 5 | 47 | 56.5 | 20 |
| 6 | 39.2 | 47.1 | 16.67 |
| 7 | 33.6 | 40.4 | 14.29 |
| 8 | 29.4 | 35.3 | 12.5 |
| 9 | 26.1 | 31.4 | 11.11 |
| 10 | 23.5 | 28.2 | 10 |
| 12 | 19.6 | 23.5 | 8.33 |
| 15 | 15.7 | 18.8 | 6.67 |
Fuel cost calculator: trip and yearly cost
The fuel cost calculator mode answers the money question. Fuel needed = distance ÷ mpg, and cost = fuel needed × price. At 25 mpg and $3.50 per gallon, a 500 mile trip burns 20 gallons and costs 20 × $3.50 = $70.00, or 14 cents per mile. If you drive 12,000 miles a year, the bill is 12,000 ÷ 25 × $3.50 = $1,680, or $140.00 a month.
The prices in the tables are examples, and the fuel cost calculator accepts any price. Type the price you pay, and choose whether it is per US gallon, per imperial gallon or per liter. The EPA fuel economy label assumes 15,000 miles a year when it estimates annual fuel cost, while the default here is 12,000, so change it to match your driving.
Cost of 100 miles by mpg and fuel price
| MPG | $3.00 a gallon | $3.50 a gallon | $4.00 a gallon | $4.50 a gallon |
|---|---|---|---|---|
| 15 | $20 | $23.33 | $26.67 | $30 |
| 20 | $15 | $17.5 | $20 | $22.5 |
| 25 | $12 | $14 | $16 | $18 |
| 30 | $10 | $11.67 | $13.33 | $15 |
| 35 | $8.57 | $10 | $11.43 | $12.86 |
| 40 | $7.5 | $8.75 | $10 | $11.25 |
| 50 | $6 | $7 | $8 | $9 |
Yearly fuel cost at 12,000 miles
| MPG | $3.00 a gallon | $3.50 a gallon | $4.00 a gallon | $4.50 a gallon |
|---|---|---|---|---|
| 15 | $2,400 | $2,800 | $3,200 | $3,600 |
| 20 | $1,800 | $2,100 | $2,400 | $2,700 |
| 25 | $1,440 | $1,680 | $1,920 | $2,160 |
| 30 | $1,200 | $1,400 | $1,600 | $1,800 |
| 35 | $1,029 | $1,200 | $1,371 | $1,543 |
| 40 | $900 | $1,050 | $1,200 | $1,350 |
| 50 | $720 | $840 | $960 | $1,080 |

How accurate is an MPG calculator?
An MPG calculator is only as accurate as the numbers you give it. The arithmetic is exact, so the weak point is the measurement: the fuel added at the pump, the miles on the trip meter and how the tank was filled.
If the pump stops at a different point each time, the result can move by a few percent. For the best answer, use the same pump if you can, average at least three tanks and compare the result with the manufacturer figure, which is measured on a test cycle and is usually higher than real driving.
The miles per gallon calculator below the form also helps you spot a problem early. If your average drops by 10 percent over two months with no change in driving, check the tire pressure, the air filter and any weight left in the trunk. A gas mileage calculator is a cheap diagnostic tool, because the number is easy to track in a notebook or a phone note.
The MPG illusion: why small mpg gains matter less at the top
Fuel use per mile is the reciprocal of mpg, so the same mpg gain saves different amounts. Going from 10 to 20 mpg saves 5 gallons every 100 miles (10 down to 5). Going from 30 to 40 mpg saves only 0.83 gallons (3.33 down to 2.5). The EPA calls this the MPG illusion and now shows gallons per 100 miles on its fuel economy labels for that reason. When you compare two cars, compare gallons per 100 miles or L/100 km.
MPGe: miles per gallon equivalent for electric cars
MPGe, miles per gallon equivalent, lets an electric car be compared with a gasoline car. The EPA defines it by saying that 33.7 kilowatt-hours of electricity has the same energy as one US gallon of gasoline. A car rated 100 MPGe uses 33.7 kWh to travel 100 miles, which is 0.337 kWh per mile. MPGe does not tell you the running cost, because electricity and gasoline are priced differently, so use your own price per kWh and the electricity cost calculator for that.
This MPG calculator is for liquid fuel. For a plug-in hybrid, enter the miles and the gasoline separately for the trips you want to compare.
Fuel economy and CO2
The EPA says burning one gallon of gasoline puts about 8,887 g of carbon dioxide out of the tailpipe, and a gallon of diesel about 10,180 g. Divide by your mpg to get grams per mile. A 30 mpg car emits about 296 g of CO2 per mile (184 g per kilometer).
| MPG (gasoline) | CO2 per mile | CO2 per kilometer |
|---|---|---|
| 20 | 444 g | 276 g |
| 25 | 355 g | 221 g |
| 30 | 296 g | 184 g |
| 40 | 222 g | 138 g |
| 50 | 178 g | 110 g |
Which unit does each country use?
The unit you meet depends on where you live, and the calculator handles all of them. Each row below shows the usual fuel economy unit.
| Country or region | Usual unit | Notes |
|---|---|---|
| United States | miles per US gallon (mpg) | EPA labels show combined, city and highway mpg and also gallons per 100 miles |
| Canada | L/100 km | US style mpg still appears in old ads and used car listings |
| United Kingdom | miles per imperial gallon | fuel is sold in liters, and L/100 km may appear next to mpg |
| Ireland | L/100 km, with imperial mpg allowed beside it | Irish law allows both |
| Australia and New Zealand | L/100 km | labels use liters per 100 kilometers |
| India, Japan and South Korea | km/L | kilometers per liter, so higher is better |
Check your local rules and labels for official figures: test results (WLTP in Europe, EPA in the United States) are laboratory numbers, and real driving usually gives a little less.
Real-life uses of a gas mileage calculator
- Comparing cars: turn a UK advert in mpg or a European one in L/100 km into the unit you know.
- Planning a road trip: work out the fuel you need and the cost for the whole route.
- Checking a problem: a sudden drop in mpg can point to tire pressure, a dragging brake or a clogged filter.
- Budgeting: see what a 20 mpg truck and a 35 mpg car cost per year at today’s price.
- School and homework: rates, ratios and unit conversion are classic math topics; the working shown helps students check their own steps.
Common mistakes with an MPG calculator, and tips
- Mixing US and imperial gallons. This is the biggest error in international comparisons: always check which gallon a figure uses.
- Not filling the tank the same way. Stop at the first click of the pump every time.
- Reading L/100 km like mpg. For L/100 km a lower number is better.
- Using a single tank. Average several, because winter, short trips and heavy loads change the result.
- Forgetting the price unit. A price per liter is not a price per gallon: a liter price of $1 is $3.79 per US gallon.
Questions people ask about MPG
How do I calculate MPG from miles and gallons?
Divide the miles driven by the gallons used. 450 miles on 15 gallons is 450 ÷ 15 = 30 mpg. Enter both numbers in the Find my MPG mode of the gas mileage calculator.
How do I convert UK mpg to US mpg?
Divide the UK mpg by 1.20095. For example, 50 UK mpg is 41.63 US mpg. To go the other way, multiply by 1.20095.
How do I convert MPG to L/100km?
Divide 235.215 by the US mpg, or 282.481 by the UK mpg. 30 US mpg is 7.84 L/100 km.
What is a good MPG?
The EPA reports that the average gasoline vehicle on US roads gets about 22.2 mpg, so a car above 30 mpg is efficient, and many hybrids are above 45 mpg. Compare similar vehicles, not a truck with a compact car.
Frequently asked questions
10 quick answers
How do you calculate MPG?
Divide the miles you drove by the gallons of fuel you used. If you drove 300 miles and used 12 gallons, your MPG is 300 ÷ 12 = 25.
What is the difference between UK mpg and US mpg?
The size of the gallon. A US gallon is 3.785 liters and an imperial gallon is 4.546 liters, so the same car shows a UK mpg number 1.2 times its US mpg number.
How do I convert MPG to L/100 km?
For US mpg, divide 235.215 by the mpg. For UK mpg, divide 282.481 by the mpg. 25 US mpg is 9.41 L/100 km.
How do I convert L/100 km to MPG?
Divide 235.215 by the L/100 km figure to get US mpg, or 282.481 for UK mpg. 6 L/100 km is 39.2 US mpg and 47.1 UK mpg.
What is km/L and how does it relate to MPG?
km/L is kilometers per liter. Multiply by 2.352 to get US mpg or by 2.825 for UK mpg. 15 km/L is 35.28 US mpg.
How much does it cost to drive 100 miles?
Divide 100 by your mpg and multiply by the price per gallon. At 30 mpg and $3.50 that is 100 ÷ 30 × 3.50 = $11.67.
How do I work out the fuel cost per year?
Divide your yearly miles by mpg and multiply by the fuel price. 12,000 miles at 25 mpg and $3.50 is 12,000 ÷ 25 × 3.50 = $1,680.
What does MPGe mean?
MPGe is miles per gallon equivalent. The EPA counts 33.7 kWh of electricity as one gallon of gasoline, so an electric car at 100 MPGe uses 33.7 kWh to go 100 miles.
Is the dashboard MPG as accurate as an MPG calculator?
Only roughly. It can be a few percent off, so check it with the full tank method: miles driven divided by gallons added at the next fill-up.
Does the MPG calculator work in kilometers and liters?
Yes. The MPG calculator accepts both: choose kilometers and liters in the Find my MPG mode, or use the Convert MPG mode with L/100 km or km/L as the starting unit.
Related calculators
- Electricity cost calculator: what charging an electric car costs
- Unit converter: miles, kilometers, gallons and liters
- Percentage calculator: percent savings between two cars
- Ratio calculator: simple rates and ratios
- Temperature converter: Celsius, Fahrenheit and Kelvin
- Money worksheets for practice with prices, and the full calculator list
Sources and further reading
- Learn more about the gasoline fuel economy label (fueleconomy.gov, EPA and DOE)
- Greenhouse gas emissions from a typical passenger vehicle (EPA)
- Gallon (Wikipedia)
- Miles per gallon gasoline equivalent (Wikipedia)
Last updated: October 2026.