Toolzent

MPG Calculator

Free MPG calculator finds miles per gallon from miles driven and gallons used: MPG = miles ÷ gallons, with L/100km and km/L equivalents and worked examples.

Updated 2026-06-09 · Free · No sign-up · Runs privately in your browser

What is an MPG calculator?

An MPG calculator works out your fuel economy in miles per gallon (MPG) from two numbers: the miles you drove and the US gallons of fuel you used to drive them. It also converts that result into the two metric measures the rest of the world uses, litres per 100 km (L/100km) and kilometres per litre (km/L), so one entry gives you the answer in every common unit.

Drivers use it to check the real-world economy of a car against its sticker rating, to compare two vehicles, to track whether a tune-up or new tyres helped, and to feed a fuel-cost estimate. Type your miles and gallons into the tool above and it returns your MPG instantly, with the metric equivalents alongside, all computed privately in your browser with nothing uploaded.

How is MPG calculated?

The calculator uses the definition of fuel economy:

MPG = miles ÷ gallons

Miles per gallon is simply how far you travelled for each gallon burned, so you divide the distance by the fuel. Here is what each term means and the unit it carries:

  • miles — the distance driven, in miles, usually read straight off the trip odometer.
  • gallons — the fuel consumed over that distance, in US gallons (1 US gallon = 3.785 litres). This must be greater than zero, since it is the divisor.
  • MPG — the result, miles per gallon. A higher number means better economy.

From the MPG figure the tool derives the two metric equivalents using fixed conversion constants:

  • L/100km = 235.215 ÷ MPG — litres of fuel per 100 kilometres. Lower is better here, the reverse of MPG.
  • km/L = MPG × 0.425144 — kilometres travelled per litre. Higher is better, like MPG.

The constant 235.215 comes from combining the gallon-to-litre and mile-to-kilometre conversions, and 0.425144 is the direct miles-per-US-gallon to kilometres-per-litre factor. The result is calculated at full precision and rounded for display, for example to 30 MPG.

Examples

Each example uses only the formula above, so you can reproduce every answer by typing the same values into the calculator.

Example 1 — the headline trip

300 miles driven on 10 US gallons.

MPG = miles ÷ gallons = 300 ÷ 10 = 30 MPG

That works out to 30 MPG. In metric units it equals 7.84 L/100km (235.215 ÷ 30) and 12.75 km/L (30 × 0.425144) — the same economy expressed three ways.

Example 2 — a more efficient run

400 miles driven on 12.5 US gallons.

MPG = 400 ÷ 12.5 = 32 MPG

This tank returned 32 MPG, a little better than Example 1 because more distance came from less fuel.

Example 3 — a short, thirsty commute

150 miles driven on 7.5 US gallons.

MPG = 150 ÷ 7.5 = 20 MPG

Here the car managed 20 MPG. Stop-and-go city driving over a short distance pulls the figure well below the highway numbers above, which is exactly the kind of difference the calculator makes visible.

MPG to metric quick-reference

This table converts common MPG figures into their metric equivalents using L/100km = 235.215 ÷ MPG and km/L = MPG × 0.425144. Notice that as MPG rises, L/100km falls (less fuel per distance) while km/L rises.

MPGL/100kmkm/L
2011.768.50
259.4110.63
307.8412.75
327.3513.60
405.8817.01
504.7021.26

All figures use the US gallon. Read across any row to translate a single economy figure between the units a US window sticker, a European spec sheet and a fuel log might each use.

Common uses

The MPG calculator is handy any time fuel efficiency matters:

  • Checking real-world economy — see what your car actually returns on a given tank versus its advertised rating.
  • Comparing vehicles — put two cars on the same scale before buying, or rank them in km/L for an overseas reference.
  • Tracking maintenance — confirm whether new spark plugs, a clean air filter or correct tyre pressure improved your numbers.
  • Trip and budget planning — feed your MPG into a fuel-cost estimate to forecast what a journey will cost.
  • Converting units — translate a US MPG figure into the L/100km or km/L used on metric spec sheets.
  • Education — a clean, real example of a rate (distance per unit of fuel) for maths and physics lessons.

Tips and common mistakes

  • Use US gallons. This tool assumes the US gallon (3.785 litres). A UK imperial gallon is larger (4.546 litres), so mixing them inflates your MPG by about 20 percent.
  • Measure a full tank-to-tank. Fill up, reset the trip meter, drive, then refill to the same point and use the gallons added. A single tank smooths out the noise of a part-fill.
  • Do not divide by zero. Gallons used must be greater than zero, or the result is undefined. Enter the real fuel amount, not a blank or zero.
  • Match the distance to the fuel. The miles and the gallons must cover the same stretch of driving. Using last week’s miles with today’s fill gives a meaningless number.
  • Remember which way is better. Higher MPG and higher km/L are good; lower L/100km is good. It is easy to read the metric numbers backwards.
  • One tank is a sample, not the truth. Weather, terrain, traffic and driving style swing economy a lot. Average several tanks for a figure you can trust.

Limitations and notes

This calculator reports the exact fuel economy for the miles and gallons you enter; it does not predict future mileage or model your engine. The metric conversions assume the US gallon, so imperial-gallon data must be converted first or the L/100km and km/L figures will be off. Real-world economy depends on speed, traffic, load, terrain, air-conditioning, tyre pressure and how hard you accelerate, which is why a single tank can differ from both the sticker rating and your long-term average — the best practice is to log several fills and average them. The result is computed at full precision and only rounded for display, and everything runs privately in your browser, so the numbers you type stay on your device and nothing is uploaded. Treat the output as an accurate measurement of the trip you entered rather than a guaranteed rating for every drive.

For the rest of your trip math, turn your MPG into a journey budget with the fuel cost calculator, check how a new wheel-and-tyre setup changes your speedometer with the tire size calculator, or work out drivetrain ratios with the gear ratio calculator — and browse more in the automotive category.

Frequently asked questions

How do you calculate MPG?+

Divide the miles you drove by the US gallons of fuel you used: MPG = miles ÷ gallons. For example, 300 miles on 10 gallons is 300 ÷ 10 = 30 MPG.

What is the MPG formula?+

Miles per gallon equals distance over fuel: MPG = miles ÷ gallons. To get the figures, fill the tank, reset the trip meter, drive, then refill and note the gallons added.

What is 300 miles on 10 gallons in MPG?+

MPG = miles ÷ gallons = 300 ÷ 10 = 30 MPG. That same trip equals 7.84 L/100km and 12.75 km/L in metric units.

How do I convert MPG to L/100km?+

Divide 235.215 by the MPG figure: L/100km = 235.215 ÷ MPG. At 30 MPG that is 235.215 ÷ 30 = 7.84 L/100km.

How do I convert MPG to km/L?+

Multiply the MPG figure by 0.425144: km/L = MPG × 0.425144. At 30 MPG that is 30 × 0.425144 = 12.75 km/L.

Is a higher MPG better?+

Yes. Higher MPG means you travel more miles per gallon, so the car uses less fuel and costs less to run. With L/100km the opposite is true, where a lower number is better.

Do US and UK gallons give the same MPG?+

No. This calculator uses the US gallon (3.785 litres). A UK imperial gallon is larger (4.546 litres), so the same trip yields a higher MPG number under UK gallons.

Why is my real MPG lower than the sticker rating?+

City traffic, cold starts, high speeds, hard acceleration, low tyre pressure and extra weight all cut fuel economy below the ideal test figure printed on the window sticker.