⛽ Gas Mileage Calculator

Find your car's MPG (or L/100km), cost per mile, and fill-up cost from distance driven and fuel used.

⛽ Trip Details
📊 Your Gas Mileage
Miles Per Gallon
L/100km
Cost Per Mile
Total Fuel Cost

Enter distance and fuel used, then click Calculate

Guide

About the Gas Mileage Calculator

Last updated: August 2026 · Reviewed by the NeftCal editorial team

This free gas mileage calculator turns your distance driven and fuel used into miles per gallon (or liters per 100 km), along with your cost per mile and estimated fuel cost — helping you track fuel economy over time or compare it against your vehicle's EPA rating.

How It Works

Enter the distance you drove and the amount of fuel it took to drive that distance (from your last fill-up to this one, using a full-tank-to-full-tank method for accuracy). The calculator divides distance by fuel used to get MPG, or fuel used by distance (× 100) to get L/100km. If you enter a fuel price, it also computes your cost per mile and the total cost for that fill-up.

Who Should Use This Calculator

Any driver who wants to track fuel economy trends, compare gas mileage before and after maintenance (like an oil change or new tires), budget fuel costs for a commute, or simply verify their car is performing close to its advertised EPA rating.

Real-World Applications

  • Tracking fuel economy trends over multiple fill-ups to catch a developing engine issue early
  • Comparing gas mileage between city and highway driving conditions
  • Budgeting monthly fuel costs for a daily commute
  • Checking whether your actual MPG matches your vehicle's advertised EPA rating
  • Pairing with NeftCal's Fuel Cost Calculator to plan an upcoming road trip

Tips for Accurate Results

  • For the most accurate MPG, fill your tank completely, reset your trip odometer, and calculate again at your next full fill-up.
  • Average your MPG over several fill-ups rather than relying on a single tank, since driving conditions vary.
  • Highway MPG is usually higher than city MPG — note which type of driving your numbers reflect when comparing.
  • Keep tires properly inflated before measuring — underinflated tires can meaningfully reduce fuel economy.
Formula

How Gas Mileage Is Calculated

The simple division behind MPG and L/100km

Miles Per Gallon (US)
MPG = Distance Driven (miles) ÷ Fuel Used (gallons)

Liters per 100 Kilometers (Metric)
L/100km = (Fuel Used (liters) ÷ Distance Driven (km)) × 100

Cost Per Mile
Cost Per Mile = Price Per Gallon ÷ MPG

Higher MPG = Better

MPG measures distance covered per unit of fuel, so a higher number means better fuel economy.

🌍

Lower L/100km = Better

L/100km measures fuel consumed per unit of distance, so unlike MPG, a lower number means better fuel economy.

💵

Cost Scales With MPG

Since cost per mile is inversely proportional to MPG, small MPG gains matter far more at low MPG values than at high ones.

⚙️ Why This Formula Works

Fuel economy is fundamentally a rate — distance covered per unit of fuel consumed — so dividing total distance by total fuel used over the same period gives a direct, verifiable measurement, independent of how the fuel was purchased or in how many stops.

🎯 When to Use It

  • Tracking your actual fuel economy between fill-ups
  • Comparing city vs. highway driving efficiency
  • Budgeting fuel costs for a commute or trip

📋 Assumptions

  • Distance and fuel amounts are measured over the same driving period (ideally full-tank to full-tank)
  • Fuel price stays constant across the trip for the cost calculation

⚠️ Limitations

  • A single fill-up can be skewed by partial fill-ups or a mix of city/highway driving
  • Doesn't account for idling time, cargo load, or terrain differences between measurements
Walkthrough

Step-by-Step: How to Use the Gas Mileage Calculator

From fill-up to final MPG

Enter the distance driven

Type the miles (or kilometers) driven since your last fill-up.

Enter the fuel used

Type the gallons (or liters) of fuel used, and optionally the price per unit.

Click "Calculate"

See your MPG (or L/100km), cost per mile, and fill-up cost.

Example

Worked Example

A typical fill-up to fill-up calculation

Driving 300 Miles on 10 Gallons

Distance Driven300 miles
Fuel Used10 gallons
Fuel Price$3.50/gallon
Step 1 — MPG: 300 ÷ 10 = 30 MPG.
Step 2 — Cost per mile: $3.50 ÷ 30 ≈ $0.117 per mile.
Step 3 — Fill-up cost: 10 gallons × $3.50 = $35.00.
MPG
30.0
Cost/Mile
$0.117
Fill-Up Cost
$35.00
Reference

Typical MPG by Vehicle Class

General ranges — always check your vehicle's specific EPA rating

Vehicle ClassTypical Combined MPG
Hybrid / Electric-Assist Compact45-60+ MPG
Compact Car32-42 MPG
Midsize Sedan28-38 MPG
Crossover / Small SUV24-32 MPG
Full-Size SUV18-24 MPG
Pickup Truck16-24 MPG

These are general ranges for illustration — always compare your result against your specific vehicle's official EPA combined rating for an accurate benchmark.

Use Cases

Practical Use Cases for the Gas Mileage Calculator

Where tracking MPG matters

📈

Fuel economy tracking

Log MPG at every fill-up to spot a gradual decline that might signal a maintenance issue.

🛣️

Commute budgeting

Estimate monthly fuel costs based on your typical MPG and commute distance.

🔧

Before/after maintenance checks

Compare MPG before and after an oil change, tune-up, or new tires to see the real-world impact.

🚗

Vehicle comparison

Compare real-world fuel economy between two vehicles you're considering.

🗺️

Road trip planning

Combine your known MPG with NeftCal's Fuel Cost Calculator to budget an upcoming trip.

Pros & Cons

Advantages and Limitations

What this calculator does well, and where it has boundaries

✅ Advantages

  • Free, instant, and requires no signup
  • Supports both US (MPG) and metric (L/100km) units
  • Includes cost per mile and total fill-up cost alongside MPG
  • Simple enough to use at the pump with just two numbers

⚠️ Limitations

  • A single fill-up can be skewed by partial fills or mixed driving conditions
  • Doesn't account for idling, cargo weight, or terrain
  • Not a substitute for your vehicle's official EPA fuel economy rating
Reference

Common Mistakes and Expert Tips

Get an accurate MPG reading every time

❌ Common Mistakes

  • Calculating MPG from a partial fill-up instead of a full-tank-to-full-tank measurement
  • Judging fuel economy from a single tank instead of averaging several
  • Forgetting that highway and city MPG can differ significantly for the same vehicle
  • Ignoring tire pressure, which can noticeably affect real-world fuel economy

💡 Expert Tips & Best Practices

  • Reset your trip odometer at every full fill-up for the most consistent measurements
  • Track MPG over time in a simple log to catch mechanical issues early
  • Compare your MPG against your vehicle's EPA rating, not a generic universal number
  • Use NeftCal's Fuel Cost Calculator to turn your known MPG into a full trip budget
📝

Summary: This gas mileage calculator turns distance driven and fuel used into MPG (or L/100km), cost per mile, and fill-up cost — free and instant. Pair it with the Fuel Cost Calculator or Mileage Calculator for other driving-related calculations.

FAQ

Frequently Asked Questions

Common questions about gas mileage

How do you calculate gas mileage?
Gas mileage (MPG) is calculated by dividing the number of miles driven by the number of gallons of fuel used to drive that distance: MPG = miles driven ÷ gallons used. For example, driving 300 miles using 10 gallons gives 30 MPG.
What is a good MPG for a car?
It depends on the vehicle class: compact and hybrid cars often achieve 35-55+ MPG, midsize sedans typically get 28-38 MPG, and SUVs or trucks usually average 18-28 MPG. Hybrid and electric vehicles can exceed 50 MPG-equivalent. Compare your result to your specific vehicle's EPA-rated MPG rather than a single universal benchmark.
Why does my actual gas mileage differ from the EPA rating on the window sticker?
EPA ratings come from standardized lab tests that don't fully reflect real-world driving. Actual MPG varies with driving style (hard acceleration lowers it), speed (highway MPG typically peaks around 50-60 mph and drops at higher speeds due to aerodynamic drag), terrain, temperature, tire pressure, and vehicle load.
How is cost per mile calculated?
Cost per mile equals the price per gallon divided by your MPG: cost per mile = price per gallon ÷ MPG. For example, at $3.50 per gallon and 30 MPG, the cost per mile is $3.50 ÷ 30 ≈ $0.117, or about 11.7 cents per mile.
What's the difference between MPG and L/100km?
MPG (miles per gallon) measures distance per unit of fuel — higher is better. L/100km (liters per 100 kilometers), used in most of the world outside the US, measures fuel per unit of distance — lower is better. The two are inversely related, which is why a small MPG improvement at low MPG values saves much more fuel than the same MPG improvement at high MPG values.
How can I improve my car's gas mileage?
Keep tires properly inflated, avoid aggressive acceleration and braking, remove excess weight and roof cargo, use cruise control on highways, keep up with engine maintenance (air filters, spark plugs, oil), and avoid excessive idling. Driving at moderate, steady highway speeds typically maximizes fuel economy.
Learn More

Authoritative Resources on Fuel Economy

Official references to complement this calculator

Related Calculators

Other driving and vehicle tools