Other

Gas Mileage Calculator

Results

Enter values and calculate to see results.

Embed on your site

Any ezcalcs calculator can be embedded with one script tag. Copy the snippet below or use the homepage playground to preview and customize.

<!-- ezcalcs embed: gas-mileage-calculator — paste anywhere in the body -->
<script
  async
  src="https://ezcalcs.net/embed.js"
  data-calc="gas-mileage-calculator"
  data-theme="light"
  data-width="100%"
  data-height="640"
></script>

Enter your trip distance, your vehicle's miles per gallon, and the current gas price. The gas mileage calculator estimates your total fuel cost in seconds.

Knowing your fuel cost before you drive helps you budget for road trips, daily commutes, and everything in between. This free gas mileage calculator handles both US and metric units so you can calculate fuel cost for any route, any vehicle.

Gas Mileage Calculator

Use the calculator above to estimate how much gas your trip will use and what it will cost. You only need three inputs:

  • Distance you plan to drive (miles or kilometers)
  • Fuel economy of your vehicle (MPG or km/L)
  • Fuel price at the pump (price per gallon or per liter)

The calculator estimates your total fuel usage and trip cost instantly. Adjust any input to compare scenarios, like checking how a different route or a higher gas price changes your total.

Calculate Fuel Cost for Your Vehicle

Every vehicle burns fuel at a different rate. A compact sedan rated at 35 MPG costs far less per mile than a full-size truck rated at 16 MPG.

To calculate fuel cost for your specific vehicle, start with your EPA fuel economy rating. You can find it on the window sticker, in your owner's manual, or by searching the U.S. Department of Energy's fueleconomy.gov database by year, make, and model.

Enter that number into the calculator along with your trip distance and the current gas price. The result is an estimate. Real-world fuel usage varies with driving conditions, speed, and vehicle maintenance.

How the Fuel Cost Calculator Works

The math behind this fuel cost calculator is straightforward. Two formulas cover the most common unit systems worldwide.

Miles Per Gallon Calculation

For vehicles rated in MPG (standard in the U.S.):

  1. Gallons used = Distance (miles) ÷ MPG
  2. Trip cost = Gallons used × Price per gallon

Example: A 300-mile drive in a vehicle that gets 25 MPG at $3.50 per gallon.

  • 300 ÷ 25 = 12 gallons
  • 12 × $3.50 = $42.00 estimated fuel cost

You can also figure out your cost per mile: $42.00 ÷ 300 = $0.14 per mile.

Kilometers Per Liter Calculation

For vehicles rated in km/L or liters per 100 km (common outside the U.S.):

  1. Liters used = Distance (km) ÷ km/L
  2. Trip cost = Liters used × Price per liter

If your vehicle is rated in liters per 100 km, divide 100 by that number to convert to km/L. The calculator handles both metric and US units.

Calculate Fuel Usage by Route

Distance is the biggest variable in any fuel cost estimate. Two ways to get it:

  • Odometer reading. Record your odometer at the start and end of a trip, then subtract. This gives you the actual distance driven.
  • Map tools. Use Google Maps or another route planner to find the distance before you leave. Keep in mind that detours, construction, and alternate routes can change the total.

Once you have your route distance, plug it into the calculator. Compare a direct highway route to a scenic back-road route to see how the extra miles affect fuel usage and cost.

For a road trip with multiple stops, add up each leg's distance or enter the total. The calculator estimates fuel cost for the full trip in one step.

Fuel Price and Gas Cost Calculator

Gas prices swing from week to week and vary by region, grade, and fuel type. The calculator lets you enter any price per gallon (or per liter) so your estimate reflects what you actually pay at the pump.

Calculate Fuel Cost Per Gallon

To get the most accurate estimate:

  • Check current gas prices near your route. Apps and sites like AAA or GasBuddy show local prices updated daily.
  • Use the price of the grade your vehicle requires. Regular, mid-grade, premium, and diesel all carry different costs.
  • For future trips, consider adding a small buffer. Fuel prices can shift between the time you plan and the day you fill up.

Is the fuel price per gallon constant? No. Prices change based on crude oil markets, refinery output, seasonal demand, and state taxes. That is why this gas cost calculator lets you update the price for every estimate.

Vehicle Fuel Efficiency and Gas Mileage

Fuel efficiency (measured in MPG or km/L) describes how far your vehicle travels on a set amount of fuel. Higher MPG means less fuel burned per mile, which means lower costs.

What Affects Vehicle Fuel Economy and MPG

Many factors influence your vehicle's fuel economy:

  • Speed. Fuel economy can drop noticeably above 50 mph. Every 5 mph over 50 is roughly like paying an extra amount per gallon.
  • Tire pressure. Tires that are not properly inflated increase rolling resistance. Check your owner's manual for the recommended PSI.
  • Vehicle weight and cargo. Extra cargo reduces MPG. Remove roof racks and heavy items you do not need.
  • Engine condition. A properly tuned engine with clean air filters and a functioning oxygen sensor improves fuel efficiency. Using the manufacturer's recommended motor oil grade (like 5W-30 instead of 10W-30) also helps.
  • Driving behavior. Rapid acceleration, hard braking, and excessive idling all burn more fuel.
  • Fuel type and additives. Using the correct fuel specification for your engine matters. Low-quality fuel or wrong octane can reduce efficiency.

Highway Fuel Efficiency vs. City Fuel Usage

Your EPA rating lists two numbers for a reason. Highway driving at a steady speed uses less fuel than stop-and-go city traffic.

  • Highway MPG is typically 3 to 10 MPG higher than city MPG. Maintaining a steady speed and using cruise control reduces fuel consumption.
  • City MPG drops because of frequent braking, accelerating from stops, and idling at traffic lights. Stop-and-go traffic is the least fuel-efficient way to drive.

For mixed driving, the EPA combined rating gives a reasonable middle ground. If your trip is mostly highway, lean toward the highway number. If it is mostly city, use the city number for a more realistic estimate.

Gas Mileage Calculator for Route Planning

Planning ahead saves money. Use this gas mileage calculator to compare options before you commit to a route.

  • Compare routes. A shorter highway route may cost less in fuel than a longer scenic drive, even if toll costs are separate.
  • Budget for a road trip. Enter your total round-trip distance to estimate how much fuel you will need and what it will cost. This helps you plan your route and set a realistic travel budget.
  • Evaluate commute costs. Calculate your daily or weekly commute fuel cost. Multiply by the number of work days to see monthly spending. This number is useful when comparing driving to public transport or carpooling.
  • Plan fill-ups. Divide your total trip distance by your vehicle's range (tank size × MPG) to estimate how many fuel stops you will need.

Looking to calculate fuel cost for your trip on Google Maps? Find your route distance in Google Maps first, then enter it here. This calculator estimates fuel cost. Google Maps shows distance and time but does not estimate gas cost on its own.

Fuel Cost Calculator Limitations and Calculation Accuracy

This fuel cost calculator estimates your trip cost based on the inputs you provide. It is a planning tool, not a guarantee.

Keep these limitations in mind:

  • Real-world MPG varies. Your actual fuel economy depends on traffic, weather, terrain, driving habits, and vehicle condition. The EPA rating is tested under controlled conditions.
  • Elevation changes affect fuel usage. Driving through mountains uses more fuel than flat terrain, even over the same distance.
  • Wind and weather. Headwinds, rain, and cold temperatures all increase fuel consumption.
  • Idling and detours. Sitting in traffic or taking an unplanned detour adds fuel usage the calculator cannot predict.
  • Vehicle load. The calculator does not account for passengers, cargo weight, or towing.

For the best estimate, use a realistic MPG number based on your own driving experience rather than the EPA best-case figure. If you have tracked your fuel usage across a few fill-ups, that personal average is more accurate than the sticker number.

Gas Cost Calculator for Different Vehicle Types

This gas cost calculator works for any vehicle that burns fuel, not just sedans.

  • Trucks and SUVs. Enter your truck's MPG rating. Full-size trucks typically range from 14 to 22 MPG depending on engine size and whether you are towing.
  • Motorcycles. Most motorcycles get 35 to 60 MPG. Enter the distance and your bike's rating.
  • Diesel vehicles. Diesel engines often achieve better MPG than gasoline engines, but diesel fuel usually costs more per gallon. Enter the diesel price for an accurate estimate.
  • Hybrids and plug-in hybrids. For hybrids, use your combined MPG. For plug-in hybrids, the estimate covers the gasoline portion only. Your actual cost may be lower if you charge regularly and drive short distances on electric power.
  • Flex fuel vehicles. If your vehicle runs on E85 ethanol, note that E85 typically delivers fewer miles per gallon than regular gasoline. Enter the E85 price and your E85 MPG rating for a fair comparison.
  • RVs and motorhomes. Fuel economy ranges from 6 to 18 MPG depending on class and size. Even small MPG differences add up over long distances.

Can I use this calculator for other types of vehicles? Yes. Any vehicle with a known fuel economy rating and fuel price works.

How to Improve Your Miles Per Gallon

Small changes in how you drive and maintain your vehicle can meaningfully reduce fuel costs.

Driving habits:

  • Drive at moderate speeds. Staying at or below 60 mph improves fuel efficiency for most vehicles.
  • Use cruise control on the highway to maintain a steady speed.
  • Avoid rapid acceleration and hard braking. Smooth, gradual speed changes use less fuel.
  • Reduce idling. Turn off the engine if you expect to wait more than 60 seconds.
  • Combine errands into one trip. A warm engine is more fuel-efficient than a cold start.

Vehicle maintenance:

  • Keep tires properly inflated to the recommended PSI. Under-inflated tires increase fuel consumption.
  • Replace air filters on schedule. A clogged filter restricts airflow and hurts efficiency.
  • Use the motor oil grade recommended in your owner's manual (for example, 5W-30 rather than a heavier weight like 10W-30).
  • Keep your engine properly tuned. A faulty oxygen sensor alone can reduce MPG significantly.
  • Pass your scheduled emissions test and maintenance intervals.

Planning and lifestyle:

  • Plan your route to avoid stop-and-go traffic when possible.
  • Consider carpooling for your commute. Splitting fuel costs cuts your per-person spending.
  • Evaluate whether driving a smaller, more fuel-efficient vehicle makes sense for daily use.
  • Remove unnecessary cargo and roof racks to reduce weight and drag.
  • Look into public transport for trips where driving is not cost-effective.

According to research cited by the U.S. Department of Energy and national laboratory studies, these combined steps can improve gas mileage by 10% to 30% for many drivers.

Fuel Cost and Fuel Usage Over Time

Fuel is one of the largest ongoing costs of owning a vehicle. Tracking it over time reveals patterns and savings opportunities.

How to calculate gas mileage between fill-ups:

  1. Fill your tank completely and record your odometer reading.
  2. Drive normally until your next fill-up.
  3. Fill the tank again and note the odometer reading and the total number of gallons pumped.
  4. Subtract the first odometer reading from the second to get miles driven.
  5. Divide miles driven by gallons pumped. That is your real-world MPG.

Track this across several fill-ups for a reliable average. Many drivers find their actual MPG is 2 to 5 MPG lower than the EPA estimate.

Estimating monthly and annual fuel cost:

  • Calculate your weekly mileage (commute plus errands).
  • Divide by your average MPG to get weekly gallons used.
  • Multiply by the current price per gallon for weekly cost.
  • Scale up to monthly or yearly figures.

This gives you a clear picture of fuel spending. If the number surprises you, revisit the improvement tips above. Even a 2 MPG improvement across 15,000 miles per year can save hundreds of dollars, depending on fuel prices.

Use this gas mileage calculator regularly as gas prices change or your driving habits shift. It is a quick way to keep your fuel budget realistic and find savings before they slip away.