Gas Mileage Calculator

Calculate real-world MPG, L/100km, fuel cost per mile/km, and total trip cost. Supports US and metric units and multiple fill‑ups.

miles
gallons
$

Price per gallon.

How this gas mileage calculator works

This tool is designed to be more flexible than a basic MPG calculator. It lets you:

  • Calculate fuel economy from a single tank or from many fill‑ups.
  • Switch instantly between US (MPG) and metric (L/100km, km/L).
  • See fuel cost per mile/km and per trip.
  • Compare the trip cost of two different vehicles.

Core formulas

US fuel economy (MPG)

\(\text{MPG} = \dfrac{\text{miles driven}}{\text{gallons used}}\)

Metric fuel consumption (L/100km)

\(\text{L/100km} = 100 \times \dfrac{\text{liters used}}{\text{kilometers driven}}\)

Conversion between MPG and L/100km

For US MPG:

\(\text{L/100km} = \dfrac{235.215}{\text{MPG}}\)

\(\text{MPG} = \dfrac{235.215}{\text{L/100km}}\)

Fuel cost formulas

Fuel needed for a trip

US units: \(\text{gallons} = \dfrac{\text{miles}}{\text{MPG}}\)

Metric: \(\text{liters} = \dfrac{\text{L/100km} \times \text{km}}{100}\)

Total fuel cost

\(\text{Cost} = \text{fuel needed} \times \text{price per unit}\)

Cost per distance

US: \(\text{Cost per mile} = \dfrac{\text{price per gallon}}{\text{MPG}}\)

Metric: \(\text{Cost per km} = \dfrac{\text{price per liter} \times \text{L/100km}}{100}\)

How to measure your real gas mileage

  1. Fill your tank completely. Reset your trip odometer to zero.
  2. Drive normally. Use the car as you usually do.
  3. Refill the tank. At the next fill‑up, note:
    • Distance driven (from the trip odometer).
    • Fuel added (gallons or liters from the pump).
    • Fuel price per unit (optional).
  4. Enter the values into this calculator. You will get MPG, L/100km, and cost per mile/km.

For the most accurate average, repeat this over several tanks and use the “Multiple fill‑ups” tab.

What is a good gas mileage?

“Good” gas mileage depends on vehicle type and driving conditions, but as a rough guide:

  • Small cars: 30–40+ MPG (7.8–5.9 L/100km) on the highway.
  • Family sedans / crossovers: 25–35 MPG (9.4–6.7 L/100km).
  • SUVs and trucks: 15–25 MPG (15.7–9.4 L/100km).
  • Hybrids: 45–60+ MPG (5.2–3.9 L/100km).

City driving, cold weather, short trips, and heavy loads can all reduce your real‑world MPG compared with official ratings.

Tips to improve your gas mileage

  • Drive smoothly: Avoid hard acceleration and heavy braking.
  • Keep speeds moderate: Fuel consumption rises quickly above ~60 mph (100 km/h).
  • Check tire pressure: Under‑inflated tires increase rolling resistance.
  • Lighten the load: Remove unnecessary cargo and roof racks when not in use.
  • Service the car: Clean air filters, proper oil, and tuned engines use less fuel.
  • Plan trips: Combine errands to avoid multiple cold starts.

Gas mileage calculator FAQ

How do I calculate gas mileage (MPG)?

Use the full‑tank method: fill the tank, reset the trip odometer, drive, then refill and record miles driven and gallons used. Divide miles by gallons to get MPG. This calculator does the division and unit conversions for you.

Can I use kilometers and liters instead of miles and gallons?

Yes. Choose “Metric (km, liters)” from the unit system menu. All inputs and results will switch to kilometers, liters, L/100km, and km/L automatically.

How accurate is the trip cost estimate?

It is as accurate as the inputs you provide. If you use your real‑world MPG from several tanks and a current fuel price, the estimate is usually close. Traffic, terrain, weather, and driving style can still make the actual cost higher or lower.

Why does my dashboard MPG differ from this calculator?

On‑board computers estimate fuel use from sensors and may be optimistic by a few percent. The full‑tank method (distance ÷ fuel pumped) is often more accurate over the long term.