ThisCalculator

Sports and fitness

Figure Gas Mileage Calculator: How to Use It

Updated · Standard formula, shown below

Fuel economy 30.0 MPG
Fuel consumption
7.8 L/100km
Result
Cost per mile
0.12 $/mile
Result
Fuel used
10 gallons
You entered

Figure Gas Mileage Calculator: How to Use It

This calculator works out your vehicle’s fuel economy in miles per gallon (MPG) or liters per 100 km, depending on the units you choose. You enter the distance you traveled and the fuel you used, and it returns your average fuel consumption and cost per mile/km. It’s the same math your car’s trip computer does, but you can use it for any vehicle, including motorcycles, boats, and rental cars.

Formula

The basic formula for fuel economy is:

MPG = Distance (miles) ÷ Fuel used (gallons)

For metric fuel consumption (liters per 100 km):

L/100km = (Fuel used in liters ÷ Distance in km) × 100

Where:

  • Distance – how far you traveled, in miles or kilometers.
  • Fuel used – how much gas you put in, in gallons or liters.
  • MPG – miles per gallon, higher is better.
  • L/100km – liters per 100 kilometers, lower is better.

To convert between the two systems: 1 US gallon = 3.78541 liters, 1 mile = 1.60934 km. Note that the US gallon is different from the UK (imperial) gallon, which is about 4.546 liters. If you’re using imperial gallons, the MPG number will be about 20% higher.

Worked Example

Let’s use the default values from the calculator: you used 10 gallons of gas and drove 300 miles.

  1. Divide distance by fuel: 300 ÷ 10 = 30 MPG.
  2. Convert to metric: fuel in liters = 10 × 3.78541 = 37.8541 L; distance in km = 300 × 1.60934 = 482.802 km.
  3. L/100km = (37.8541 ÷ 482.802) × 100 = 7.84 L/100km.
  4. Cost per mile (at $3.50/gal): (10 × 3.50) ÷ 300 = $0.1167 per mile, or about 11.7 cents.

The calculator shows 30.0 MPG, 7.8 L/100km, and $0.12 per mile. That matches.

How to Measure Your Own Gas Mileage

The most accurate way to figure gas mileage is the “full tank to full tank� method:

  1. Fill your tank completely and record the odometer reading (or reset the trip meter).
  2. Drive normally until you need fuel again.
  3. Fill the tank completely again. Note the gallons/liters shown on the pump – that’s the fuel used.
  4. Subtract the first odometer reading from the second to get the distance traveled.
  5. Divide distance by fuel used.

Do this over two or three tankfuls and average the results to smooth out variations from hills, traffic, and weather.

Why Your Car’s Display Might Differ

Many modern cars show an instant or average MPG figure on the dashboard. These are estimates based on fuel injector pulse width and airflow sensors, not actual fuel flow. They can be optimistic by 1–3 MPG compared to a manual calculation. The manual method is considered more accurate because it measures real fuel consumed. If you want to check your car’s computer, use the manual method for a few tanks and compare.

Common Mistakes and How to Avoid Them

  • Mixing gallons: US vs. imperial gallons differ by about 20%. Always know which your pump uses.
  • Not filling completely: If you don’t fill to the same level each time, your fuel measurement will be off.
  • Using trip meter incorrectly: Reset it at the fill-up, not the day before.
  • Rounding too early: Keep at least two decimal places in your intermediate calculations.
  • Forgetting fuel used for idling or detours: The distance must match the fuel used. If you sit in traffic for an hour, that fuel counts.

What Affects Your Gas Mileage?

Many factors change your real-world MPG:

  • Speed: Most cars get the best fuel economy around 50–60 mph (80–96 km/h). Above 60 mph, aerodynamic drag increases sharply.
  • Tire pressure: Underinflated tires increase rolling resistance, lowering MPG by a few percent.
  • Weight: Extra cargo or roof racks reduce efficiency.
  • Driving style: Rapid acceleration and hard braking can cut MPG by 10–30%.
  • Weather: Cold engines run rich, and winter fuel blends have slightly less energy. Headwinds and rain also hurt.
  • Maintenance: A dirty air filter or worn spark plugs can reduce efficiency, though modern engines are less sensitive than older ones.

How to Use This Calculator for Cost Planning

Once you know your MPG, you can estimate fuel costs for a trip. For example, if your car gets 30 MPG and gas costs $3.50 per gallon, a 600-mile road trip will use 20 gallons and cost $70. The calculator includes a cost-per-mile output that you can use for budgeting or comparing vehicles. To estimate a trip cost, multiply the cost per mile by the total trip distance. Remember that gas prices vary by region and over time, so update the price field to match your local pump.

Frequently Asked Questions

How do I calculate gas mileage for a trip I haven’t taken yet?

Use your car’s average MPG (from past fill-ups) as the fuel economy. Then divide the trip distance by that MPG to get the gallons needed, and multiply by the current gas price. For example, a 500-mile trip at 25 MPG needs 20 gallons; at $4/gal, that’s $80.

What’s the difference between MPG and L/100km?

MPG is miles per gallon – a higher number is better. L/100km is liters used per 100 kilometers – a lower number is better. They are inversely related. To convert MPG to L/100km, divide 235.21 by the MPG (US gallons). For example, 30 MPG ≈ 235.21/30 = 7.84 L/100km.

Can I use this calculator for a diesel car or a motorcycle?

Yes. The math is the same for any vehicle that uses liquid fuel. Just measure the fuel in the same units and the distance in the same units. For motorcycles, the fuel tank is smaller, but the formula works exactly the same.

Why is my calculated MPG lower than the EPA estimate?

The EPA estimates are from controlled lab tests. Real-world driving includes traffic, hills, air conditioning, and varying speeds, all of which lower efficiency. It’s normal to see 10–20% lower than the window sticker, especially for short trips or city driving.

How do I convert MPG to kilometers per liter?

One US MPG equals 0.425 km/L. So multiply the MPG by 0.425. For example, 30 MPG × 0.425 = 12.75 km/L. This is a common unit in Canada and some other countries.

Does idling affect my gas mileage calculation?

Yes. Idling burns fuel without adding distance, so it lowers your MPG. If you frequently idle (e.g., delivery drivers), your manual calculation will reflect that. Some vehicles have an auto start-stop feature that reduces idling fuel waste.

Related

Formula used
in t | Fuel used | gallons | 10 | 0
in d | Distance traveled | miles | 300 | 0
out mpg | Fuel economy | MPG | d / t | 1
out lp100k | Fuel consumption | L/100km | (t * 3.78541) / (d * 1.60934) * 100 | 1
out cpm | Cost per mile | $/mile | (t * 3.50) / d | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.