How to Calculate Gas Mileage (MPG) and Your Cost per Mile

Your dashboard estimate is a guess. Two fill-ups and a calculator give you the real number.

The MPG Formula

Miles per gallon = Miles driven ÷ Gallons used

The tricky part isn't the math, it's getting accurate inputs. The fuel gauge isn't precise enough to tell you how many gallons you used, so the standard approach is the fill-to-fill method.

The Fill-to-Fill Method

Step by step

  1. Fill the tank until the pump clicks off. Don't top off.
  2. Reset the trip odometer to zero, or write down the odometer reading.
  3. Drive normally until you need gas, ideally at least half a tank.
  4. Fill up again at the same pump if you can, stopping at the first click. Note the gallons on the receipt.
  5. Divide the trip miles by those gallons. If you drove 320 miles and the refill took 10.5 gallons, your MPG is 320 ÷ 10.5 = 30.5.

One tank is a snapshot. For a reliable average, track several fill-ups and divide total miles by total gallons. That smooths out pump differences and the mix of city and highway driving.

Converting to L/100 km and km/L

Much of the world measures fuel consumption instead of fuel economy: liters used per 100 kilometers, where lower is better.

L/100 km = 235.215 ÷ MPG (US gallons)
km/L = MPG × 0.425144

MPG (US)L/100 kmkm/L
2011.768.50
259.4110.63
307.8412.75
405.8817.01
504.7021.26

A UK (imperial) gallon is about 20% larger than a US gallon, so UK MPG figures look higher for the same car. Divide imperial MPG by 1.20095 to get US MPG.

Why Small MPG Gains Matter More for Thirsty Cars

MPG isn't linear in what it saves you. Over 10,000 miles:

ChangeGallons saved
15 → 20 MPG167
30 → 35 MPG48
45 → 50 MPG22

The same 5-MPG improvement saves far more fuel on a truck than on a hybrid. That's why fuel consumption (gallons per 100 miles) is often a better way to compare vehicles: it scales directly with what you pay.

Fuel Cost per Mile and per Year

Cost per mile = Price per gallon ÷ MPG
Annual fuel cost = Annual miles ÷ MPG × Price per gallon

At $3.20 a gallon, a 30-MPG car costs about 10.7 cents per mile in fuel. Driving 12,000 miles a year, that's 400 gallons, or $1,280. A 25-MPG car would need 480 gallons, or $1,536, which is $256 more a year at the same price. Use your own local fuel price; it varies by region and week.

For a road trip, multiply the distance by the cost per mile. A 450-mile drive at 10.7 cents per mile is about $48 in fuel. If you're budgeting for a new car, add fuel to your payment and insurance; our guide on how much car you can afford shows how.

Why Your MPG Differs From the Window Sticker

EPA ratings come from standardized laboratory tests designed so every vehicle is measured the same way. They're good for comparing cars but won't exactly match your driving. Common reasons for lower real-world MPG include highway speeds, short trips with a cold engine, extreme heat or cold, heavy air conditioner use, roof cargo, towing and under-inflated tires.

Tips to Improve Gas Mileage, With the Numbers

The Department of Energy's fueleconomy.gov summarizes research from Oak Ridge National Laboratory and others:

  • Drive smoothly. Aggressive driving (speeding, rapid acceleration and hard braking) can lower gas mileage by roughly 15% to 30% at highway speeds and 10% to 40% in stop-and-go traffic.
  • Slow down on the highway. Gas mileage usually drops rapidly above 50 mph; slowing by 5 to 10 mph improves fuel economy by an average of about 7% to 14%.
  • Remove roof cargo boxes when not in use. A large rooftop box can cut fuel economy by about 6% to 17% on the highway and 10% to 25% at 65–75 mph.
  • Lose the extra weight. An extra 100 pounds can reduce MPG by about 1%.
  • Check tire pressure. Proper inflation improves gas mileage by 0.6% on average, up to 3% in some cases. Use the pressure on the door-jamb sticker, not the maximum on the tire.
  • Use the recommended motor oil grade, which can improve mileage by 1% to 2%.
  • Don't idle. Idling can burn a quarter to a half gallon of fuel per hour.

Track your MPG over several tanks before and after a change to see what actually works for your car. A sudden drop in MPG that you can't explain is also worth mentioning to a mechanic, since it can be an early sign of a problem.

Electric and Plug-In Vehicles

EVs are rated in MPGe (miles per gallon equivalent), where 33.7 kWh of electricity counts as one gallon of gasoline. For cost, it's simpler to use kWh per 100 miles: multiply by your electricity price per kWh to get the cost of 100 miles. At 30 kWh/100 mi and $0.17 per kWh, 100 miles costs about $5.10, before charging losses. Public fast charging usually costs more per kWh than charging at home.

Track your own numbers with the gas mileage calculator.

Worked Example: Comparing Two Cars

Is the hybrid worth it?

You drive 13,500 miles a year and fuel costs $3.40 a gallon where you live. Car A is rated 28 MPG combined; a hybrid version, Car B, is rated 48 MPG and costs $3,000 more.

  1. Car A: 13,500 ÷ 28 = 482 gallons a year, or about $1,639.
  2. Car B: 13,500 ÷ 48 = 281 gallons a year, or about $956.
  3. Annual savings: about $683.
  4. Payback on the $3,000 premium: about 4.4 years, ignoring differences in insurance, maintenance and resale value.

Use EPA combined ratings from fueleconomy.gov for both cars so the comparison is fair, then adjust to your own mileage and fuel price.

Keeping a Simple Fuel Log

A notebook, spreadsheet or phone app is enough. For each fill-up, record the date, odometer reading, gallons and total price. Over a few months, you'll see your real average MPG, your cost per mile and how it changes with the seasons. Winter fuel blends, cold starts and running the heater usually lower mileage in cold months, so compare like with like. A log is also handy if you use your car for business, since the IRS requires records of business miles to claim vehicle expenses.

Frequently Asked Questions

How do I calculate my gas mileage?

Fill the tank, reset the trip odometer, drive normally, then fill up again. Divide the miles driven by the gallons it took to refill. 320 miles ÷ 10.5 gallons = 30.5 MPG.

How do I convert MPG to liters per 100 km?

Divide 235.215 by the MPG. 30 MPG is about 7.84 L/100 km. The same formula converts back: 235.215 ÷ L/100 km = MPG.

Why is my real MPG lower than the EPA rating?

EPA ratings come from standardized tests. Real results vary with speed, driving style, weather, cargo, tire pressure and the mix of city and highway miles.

How do I calculate fuel cost per mile?

Divide the price per gallon by your MPG. At $3.20 a gallon and 30 MPG, fuel costs about $0.107 per mile.

Sources

  • U.S. Department of Energy and EPA, fueleconomy.gov, "Driving More Efficiently" (fueleconomy.gov/feg/driveHabits.jsp).
  • U.S. Department of Energy and EPA, fueleconomy.gov, "Keeping Your Vehicle in Shape" (fueleconomy.gov/feg/maintain.jsp).
  • U.S. Environmental Protection Agency, "Fuel Economy Labels" and test procedures (epa.gov).

This guide is for education. Figures are current as of October 2026; for tax, lending or legal decisions, check the rules that apply to you.

Ready to calculate your own numbers?

Enter miles and gallons to get MPG, cost per mile and trip cost.

Try the Gas Mileage Calculator →
← Back to Guides Next Guide: Self-Employment Tax Rate 2026: 15.3% Explained With Examples →

Related calculators

More guides like this