Automotive calculators

Gas Mileage Calculator

Updated Dec 3, 2026 By Infinity Calculator Formulas Sources
1.0 · Rate
miles
miles
gallons
/gal

Results
24.00 MPG
Average
24.00
MPG
L/100km
360
miles driven
$0.125
per mile
$45.00
Total Fuel Cost
Route Stops
A Start
B Destination
Segment Distances

Enter approximate driving distance for each segment:

A → B: miles

No route map
Distances are entered manually for each segment

Vehicle & Fuel Details
MPG
/gal
gal

Trip Summary
225
total miles
9.00
gallons needed
$27.00
Total Fuel Cost
$0.120
cost per mile
0.64
tank fills needed
Segment Breakdown
Segment Distance (mi) Fuel (gal) Cost
A → B 225 9.00 $27.00
Total 225 9.00 $27.00

Introduction

The Gas Mileage Calculator helps you figure out how many miles your car gets per gallon of gas. Just enter how far you drove and how much gas you used, and the calculator returns your gas mileage. Knowing your gas mileage is important because it tells you how well your car uses fuel. A higher number means your car is more efficient and you spend less money at the pump. Whether you drive a truck, sedan, or SUV, tracking your gas mileage can help you save money and spot problems with your car early. If your mileage drops, it could mean your engine needs a tune-up or your tires need air. Use this simple tool to stay on top of your fuel costs and keep your car running its best.

How to Use Our Gas Mileage Calculator

Enter your driving distance and fuel details to find out your car's gas mileage, fuel cost, and efficiency rating. This tool has two modes: a Quick Calculator for simple mileage checks and a Trip Planner for estimating fuel costs on longer drives.

Quick Calculator

Unit System: Pick the unit system that works for you. Choose US (miles per gallon), Metric (kilometers per liter), or UK (miles per imperial gallon). The calculator updates the labels and converts the numbers you have entered to the new units.

Distance Mode: Use the toggle switch to choose how you want to enter your distance. You can either type in your previous and current odometer readings, or enter the total distance you drove directly.

Previous Odometer Reading: If using odometer mode, type the number shown on your odometer before your trip started. This must be 0 or more.

Current Odometer Reading: If using odometer mode, type the number shown on your odometer at the end of your trip. This number must be higher than your previous reading.

Distance Driven: If you toggled on direct distance mode, type the total number of miles or kilometers you drove.

Fuel Added to Tank: Enter the amount of fuel you put into your car in gallons, liters, or imperial gallons, depending on your chosen unit system.

Fuel Price (optional): Type the price you paid per gallon or liter of fuel. Pick your currency from the dropdown menu. If you fill this in, the calculator will show your total fuel cost and cost per mile or kilometer.

Click Calculate to see your results. You will get your fuel efficiency (like MPG or km/L), a color-coded rating from Excellent to Poor, the total distance driven, cost per mile or kilometer, and your total fuel cost. A gauge at the top gives you a quick visual of how your car is doing.

Trip Planner

Unit System: Just like the Quick Calculator, pick US, Metric, or UK units for your trip planning.

Route Stops: Enter your starting point and destination. You can also click Add Stop to include extra stops along your route, up to 10 total. Remove any extra stop by clicking the X button on its card.

Segment Distances: For each leg of your trip (like A to B, B to C), type in the driving distance. This lets you plan multi-stop routes with different distances between each stop.

Fuel Efficiency: Enter your car's fuel efficiency in MPG, km/L, or miles per imperial gallon. You can find this number on your car's window sticker or on fueleconomy.gov, or use a result from the Quick Calculator.

Fuel Price: Type the price per gallon or liter you expect to pay for fuel on your trip. Choose your currency from the dropdown.

Tank Size (optional): Enter the size of your car's fuel tank. If you provide this, the calculator will tell you how many full tank fills you will need for the entire trip.

Click Calculate to see your trip summary. You will get the total distance, total fuel needed, total fuel cost, cost per mile or kilometer, and the number of tank fills required. A segment breakdown table shows the distance, fuel, and cost for each leg of your trip, and a chart shows the cost and distance of each leg.

What Is Gas Mileage?

Gas mileage tells you how far your car can travel on a set amount of fuel. In the United States, it is measured in miles per gallon (MPG). A higher MPG number means your car uses less fuel to go the same distance, which saves you money at the pump. In other countries, fuel efficiency is measured in kilometers per liter (km/L) or liters per 100 kilometers (L/100km).

How Is Gas Mileage Calculated?

The basic formula is simple: divide the distance you drove by the amount of fuel you used.4 For example, if you drove 360 miles and used 15 gallons of gas, your gas mileage is 360 ÷ 15 = 24 MPG. You can find the distance by subtracting your previous odometer reading from your current one, or by entering the distance directly if you already know it.4 For an accurate result, fill the tank completely each time and measure the distance from one full fill-up to the next.4

What Is Good Gas Mileage?

The calculator rates your result on this scale, which is in US miles per gallon. Metric and UK results are converted to US MPG first, so 45 miles per imperial gallon (about 37.5 US MPG) is rated Good. Where a car lands depends a lot on the type of vehicle:

  • Excellent (40+ MPG): Hybrids and the most efficient small gas cars reach this level. The 2024 Toyota Prius hybrid is rated at 57 MPG combined.6
  • Good (30 to 39 MPG): Many modern sedans and compact cars fall in this range. Not counting electric and plug-in hybrid models, sedans and wagons from the 2024 model year averaged 31.7 MPG in estimated real-world driving.6
  • Average (22 to 29 MPG): This is typical for many SUVs and minivans. Not counting electric and plug-in hybrid models, SUVs classed as light trucks averaged 24.7 MPG and minivans and vans 25.5 MPG in the 2024 model year.6
  • Below Average (15 to 21 MPG): Larger SUVs, pickup trucks and many older vehicles land here. Not counting electric and plug-in hybrid models, pickups from the 2024 model year averaged 20.3 MPG, and the average new vehicle of 2004 got 19.3 MPG.6
  • Poor (below 15 MPG): The least efficient vehicles are mostly high-performance cars and large trucks.6

Factors That Affect Your Gas Mileage

Several things can make your car use more or less fuel:

  • Driving habits: Hard acceleration, speeding, and frequent braking all lower your MPG.1
  • Tire pressure: Underinflated tires create more resistance, which forces the engine to work harder.2
  • Vehicle weight: Carrying heavy loads or towing a trailer reduces fuel efficiency.5
  • Road conditions: Stop-and-go city driving uses more gas than steady highway cruising. Hills, mountains and unpaved roads can lower your MPG, and so can idling in traffic.5
  • Weather: Cold temperatures can hurt your mileage.3 Using the air conditioner lowers it too.5 Strong winds can lower it as well.
  • Engine maintenance: A poorly tuned engine burns more fuel.5 The wrong grade of motor oil can also lower your gas mileage.2

How to Improve Your Gas Mileage

You can take a few easy steps to get more miles out of every gallon:

  • Drive at steady speeds and avoid rapid acceleration.
  • Keep your tires inflated to the recommended pressure listed on the sticker inside your driver's door.2
  • Remove extra weight from your trunk or cargo area.
  • Use the grade of motor oil your car's maker recommends, which can improve your gas mileage by 1% to 2%.2
  • Use cruise control on the highway when it is safe to do so.
  • Plan your trips to combine errands and avoid unnecessary driving.

Why Tracking Gas Mileage Matters

Keeping an eye on your gas mileage over time helps you spot problems early. If your MPG suddenly drops, it could be a sign that something is wrong with your car, like a failing oxygen sensor, a clogged fuel injector, or a tire losing air. Tracking your fuel usage also makes it easier to budget for gas, especially on long road trips where fuel is one of the biggest expenses. Knowing your cost per mile helps you compare driving costs to other options like flying or taking a train. Your car's horsepower also plays a role, since more powerful vehicles are generally less efficient when everything else is the same.6


Formulas used

Fuel Efficiency 4
\text{Fuel Efficiency} = \frac{\text{Distance Driven}}{\text{Fuel Added}}
Distance from Odometer 4
\text{Distance} = \text{Current Odometer} - \text{Previous Odometer}
Fuel Consumption (L/100 km)
\text{L/100km} = \frac{\text{Fuel Used}}{\text{Distance}} \times 100
Cost per Distance Unit
\text{Cost per Unit} = \frac{\text{Fuel Price}}{\text{Fuel Efficiency}}
Total Fuel Cost
\text{Total Cost} = \text{Fuel Added} \times \text{Fuel Price}
Fuel Needed (Trip)
\text{Fuel Needed} = \frac{\text{Distance}}{\text{Fuel Efficiency}}
Tank Fills Needed
\text{Tank Fills} = \frac{\text{Total Fuel Needed}}{\text{Tank Size}}

Frequently asked questions

How do I find my car's fuel efficiency for the Trip Planner?

Check your car's window sticker, or look up its rating by year, make and model on fueleconomy.gov. You can also use the Quick Calculator tab to figure it out from a recent fill-up. Enter your distance and fuel used, and the MPG or km/L result is your fuel efficiency number.


Sources

  1. Driving More Efficiently. U.S. Department of Energy and U.S. Environmental Protection Agency (fueleconomy.gov). Drive Sensibly; Remove Excess Weight. Accessed September 29, 2026.
  2. Keeping Your Vehicle in Shape. U.S. Department of Energy and U.S. Environmental Protection Agency (fueleconomy.gov). Keep Tires Properly Inflated. Accessed September 29, 2026.
  3. Fuel Economy in Cold Weather. U.S. Department of Energy and U.S. Environmental Protection Agency (fueleconomy.gov). Accessed September 29, 2026.
  4. My MPG Help. U.S. Department of Energy and U.S. Environmental Protection Agency (fueleconomy.gov). Adding Fuel Purchases; Understanding Fuel Purchase Gaps. Accessed November 22, 2026.
  5. Many Factors Affect Fuel Economy. U.S. Department of Energy and U.S. Environmental Protection Agency (fueleconomy.gov). How You Drive; Vehicle Maintenance. Accessed November 22, 2026.
  6. The 2025 EPA Automotive Trends Report (EPA-420-R-26-001). U.S. Environmental Protection Agency. 2026;p. 7; Table 2.1, p. 12; Figure 3.3, p. 18; Vehicle Power and Fuel Economy, p. 31; Appendix C, p. C-2. Accessed November 22, 2026.