Blucalculator Open Tool

Gas Calculator

Calculate trip fuel cost, fuel needed for a journey, or how far you can drive on your current tank.

miles
MPG
$ /gallon

Embed This Calculator

Copy the code and paste it into any webpage to embed this calculator.

WordPress users: add a Custom HTML block (not the Embed block) and paste the code there.

More embed options

Free to use. A small "Powered by Blucalculator" credit is appreciated but not required.

How to Use This Gas Calculator

Three modes cover every common fuel calculation you will need on the road.

Trip Cost is the most used tab. Enter your destination distance, your vehicle’s fuel economy, and the current gas price. Toggle “Round Trip” if you’re planning a return journey and the calculator doubles the distance automatically. Switch the unit toggle from Imperial (miles + MPG) to Metric (km + km/L) if you’re driving in a country that uses liters and kilometers.

Fuel Needed answers a different question: if your tank is partially full, how much fuel do you need to add and what will it cost? Enter your tank capacity, your current fuel percentage, your MPG, and the price per gallon. The calculator tells you exactly how many gallons to pump and gives you the fill-up cost.

Distance Range tells you how far you can drive on what’s currently in your tank. This is useful before a long drive when you want to know if you can reach the next city without stopping. Enter tank size, current level percentage, and your MPG. The result shows your full range and a safe range at 90% consumption, leaving a buffer so you’re never stranded.

Hit Calculate. Results appear below with a chart, a full cost breakdown, and step-by-step calculations you can follow manually.


The Formulas Behind Every Calculation

All three tabs use the same fundamental relationships between distance, fuel, and price.

Fuel needed (gallons):

Fuel (gal) = Distance (miles) / MPG

If you’re driving 300 miles in a car that gets 30 MPG, you need exactly 10 gallons. Every extra mile per gallon saves you fuel in direct proportion.

Trip fuel cost:

Trip Cost ($) = Fuel Needed (gal) x Price per Gallon ($)

At 10 gallons and $3.50 per gallon: $35.00. Simple multiplication, but the calculator removes the mental arithmetic on every trip.

Cost per mile:

Cost per Mile ($/mi) = Trip Cost / Distance

At $35.00 for 300 miles: $0.117 per mile. This is the most actionable number for comparing vehicles or routes.

Metric equivalent (fuel needed in liters):

Fuel (L) = Distance (km) / km/L

At 10 km/L for 500 km: 50 liters needed.

Driving range:

Range (miles) = Current Fuel (gal) x MPG

A 15-gallon tank at 75% full has 11.25 gallons. At 28 MPG: 11.25 x 28 = 315 miles of range.

Worked example: Weekend road trip

You’re planning a 450-mile round trip (225 miles each way). Your car gets 32 MPG. Gas near you is $3.60/gal.

  • Total distance: 450 miles (round trip enabled)
  • Fuel needed: 450 / 32 = 14.06 gallons
  • Trip cost: 14.06 x $3.60 = $50.63
  • Cost per mile: $50.63 / 450 = $0.112/mile

If you rent a car that gets 25 MPG instead: 450 / 25 = 18 gallons, 18 x $3.60 = $64.80. Your own car saves you $14.17 on fuel alone.


Gas Prices and How They Affect Trip Budgets

Fuel prices are the single biggest variable in trip cost calculations because they’re outside your control. A $0.50 per gallon swing in gas prices changes a 500-mile road trip cost by roughly $8-10. Over a full year at 15,000 miles, a $0.50 increase costs the average driver $300-375 in extra fuel.

Regional price differences matter too. States like California and Hawaii consistently run $0.50-1.00 above the US average due to taxes and refinery requirements. States like Texas and Oklahoma often run $0.20-0.40 below average. If a road trip crosses state lines, checking prices in advance on apps like GasBuddy can save meaningful money on a multi-tank journey.

Internationally, fuel prices vary even more dramatically. Western European countries charge $6-9 per gallon equivalent due to high fuel taxes. Australia runs $1.50-2.00 per liter. Mexico is often cheaper than the US for regular unleaded.

The calculator accepts any price you enter, so you can use a forecasted price for planning or the exact current price from the pump for post-trip accounting.

Gas Price10-Gallon Tank300-Mile Trip at 30 MPG
$3.00/gal$30.00$30.00
$3.50/gal$35.00$35.00
$4.00/gal$40.00$40.00
$4.50/gal$45.00$45.00
$5.00/gal$50.00$50.00

Fuel Economy: How MPG Affects Cost More Than You Think

MPG has a non-linear effect on cost. Going from 20 MPG to 25 MPG saves more fuel per mile than going from 40 MPG to 45 MPG, even though both improvements are 5 MPG. This is because fuel consumption is the reciprocal of efficiency.

At 20 MPG you use 5 gallons per 100 miles. At 25 MPG you use 4 gallons. The 5 MPG improvement saves 1 gallon per 100 miles.

At 40 MPG you use 2.5 gallons per 100 miles. At 45 MPG you use 2.22 gallons. The same 5 MPG improvement saves only 0.28 gallons per 100 miles.

This matters practically when buying a vehicle. Improving a 15 MPG truck to 20 MPG saves far more money annually than improving a 35 MPG car to 40 MPG.

Fuel cost comparison at 15,000 miles/year, $3.50/gal

  • 15 MPG vehicle: 1,000 gallons/year = $3,500
  • 20 MPG vehicle: 750 gallons/year = $2,625 (saves $875)
  • 25 MPG vehicle: 600 gallons/year = $2,100 (saves $525 vs 20 MPG)
  • 30 MPG vehicle: 500 gallons/year = $1,750 (saves $350 vs 25 MPG)
  • 40 MPG vehicle: 375 gallons/year = $1,313 (saves $437 vs 30 MPG)
  • 50 MPG vehicle: 300 gallons/year = $1,050 (saves $263 vs 40 MPG)

Use the Fuel Cost tab in the Gas Mileage Calculator (linked below) to model exactly how much a specific MPG improvement saves over a year at your actual mileage.


Tips to Reduce Your Gas Costs on Any Trip

Plan your route around gas prices. On long trips, look at gas prices in each town you’ll pass through. A short detour to a cheaper station can pay off when you’re filling a 15-gallon tank.

Drive at highway speeds, not maximum speeds. Most vehicles achieve peak fuel efficiency between 55 and 65 mph. Every 5 mph over 60 mph effectively adds $0.15-0.25 per gallon in fuel cost due to aerodynamic drag. On a 6-hour highway drive, slowing from 75 to 65 mph often saves $5-10 in fuel.

Use cruise control on flat highways. Cruise control maintains speed better than your foot does, eliminating small speed fluctuations that waste fuel. Studies show consistent speed can improve highway fuel economy by 5-14%.

Check tire pressure before a long trip. Under-inflated tires create more rolling resistance. The US Department of Energy estimates that every 1 PSI drop in all four tires reduces MPG by 0.2%. On a 15 PSI under-inflation scenario (4 tires each 3-4 PSI low), that is a 2-3% MPG penalty.

Avoid excess weight. Every 100 lbs of extra cargo reduces fuel economy by about 1-2%. Before a road trip, remove gear you won’t need. A roof rack adds aerodynamic drag even when empty, reducing MPG by 5-10% at highway speeds.

Consider time-of-day gas pricing. While not as dramatic as expected, gas prices can vary slightly by day of week and time of day. Prices tend to be lowest Monday through Wednesday mornings. Friday afternoons before long weekends are typically the highest.


Converting Between Imperial and Metric

If you’re in a country that uses liters and kilometers, or if your rental car displays km/L, here’s the quick conversion reference:

MPG to km/L:

km/L = MPG x 0.4251

km/L to MPG:

MPG = km/L x 2.3521

MPG to L/100km:

L/100km = 235.21 / MPG

Price per liter to price per gallon:

Price/gal = Price/L x 3.7854

This calculator handles all these conversions automatically when you toggle between Imperial and Metric mode. You don’t need to remember the numbers above for day-to-day use.

Quick reference: Common MPG to km/L conversions

MPGkm/LL/100km
208.511.76
2510.69.41
3012.77.84
3514.96.72
4017.05.88
5021.34.70

How gas prices affect your trip budget

Gas prices are the single most volatile input in any fuel cost calculation. The same road trip can cost 40% more or less depending on when you drive. Understanding the relationship helps you plan and decide when flexibility in timing makes financial sense.

The price per gallon to trip cost relationship is perfectly linear. If gas is $3.00/gallon and your trip costs $45 in fuel, it costs $60 if prices rise to $4.00/gallon (a 33% increase in price creates a 33% increase in trip cost). There’s no diminishing return or threshold effect.

National average vs. regional prices. US gas prices vary significantly by state. California regularly runs $1.00-$1.50/gallon above the national average due to state taxes and fuel blend requirements. Midwest states often run $0.20-$0.40 below. For long road trips that cross state lines, the weighted average price along your route matters more than any single price.

RegionTypical premium vs. national avg
California+$0.80 to +$1.50
Northeast+$0.10 to +$0.40
Midwest-$0.10 to -$0.30
Southeast-$0.10 to -$0.20
Mountain West+$0.05 to +$0.30

Fuel grade matters too. If your vehicle requires premium (91+ octane), you’re paying $0.30-$0.60/gallon more than regular. That adds $3-6 to every tank fill and $150-300/year at typical driving distances. Using regular in a premium-required vehicle can cause engine knock and reduce fuel economy, so it’s not a reliable cost-cutting strategy.

When to buy gas. Gas prices tend to be lower on Mondays and Tuesdays, and higher on Thursdays and Fridays as weekend travel demand picks up. Prices are also typically higher in summer (summer blend fuel is more expensive to produce) and lower in fall. GasBuddy and similar apps let you find the cheapest stations along your planned route before you leave.


Trip fuel planning: how much to carry and when to fill

For most daily driving, fuel planning means stopping when the gauge gets low. For long road trips, a little more thought saves both money and stress.

The 1/4 tank rule. Most experienced road trippers fill up when they hit a quarter tank rather than waiting until empty. This gives a 50-75 mile buffer in most vehicles, plenty to reach the next station even in rural areas where gas stations can be 30+ miles apart.

Fill up before interstates end. Gas prices at highway exits and in tourist areas run $0.20-$0.50 above surrounding areas. Filling up in the last major city before a long rural stretch typically saves money compared to fueling at captive-market locations.

Calculate fuel stops for your trip. Take your total trip mileage, divide by your MPG, and you know exactly how many gallons you need. If your tank holds 15 gallons and gets 30 MPG (450-mile range), a 900-mile trip requires exactly 2 full tanks. Plan fuel stops at the 400-mile mark and again at 800 miles, leaving 50-mile buffers.

Planning fuel stops for a 750-mile road trip

Vehicle: 28 MPG highway, 14-gallon tank, starting full Total fuel needed: 750 / 28 = 26.8 gallons Tank range: 28 × 14 = 392 miles (conservative at 80% = 313 miles)

Stop 1: Around mile 300 (fill from ~60% empty = ~8.5 gallons) Stop 2: Around mile 600 (fill again) Arrive with ~half tank remaining

Total fuel cost at $3.50/gallon: 26.8 gallons × $3.50 = $93.80

Frequently Asked Questions

How much gas do I need for a trip?

Divide your trip distance by your fuel economy. At 30 MPG for a 300-mile trip: 300 / 30 = 10 gallons needed. In metric: at 10 L/100km for 500 km: (500 / 100) x 10 = 50 liters needed.

How do I calculate gas cost for a road trip?

Multiply fuel needed by price per gallon (or liter). Formula: trip cost = (distance / MPG) x price per gallon. Example: 300 miles, 30 MPG, $3.50/gal = 10 gallons x $3.50 = $35.00.

How much does a road trip cost in gas?

A typical 1,000-mile road trip in a 30 MPG car at $3.50/gal costs about $117. At 25 MPG it costs $140. At 20 MPG it costs $175. Fuel economy and gas prices are the two biggest variables.

What is the average gas cost per mile?

At $3.50/gal and 30 MPG: $3.50 / 30 = $0.117 per mile. At 25 MPG: $0.14/mile. At 20 MPG: $0.175/mile. The IRS mileage rate (67 cents/mile for 2024) covers all vehicle operating costs, not just fuel.

How do I calculate MPG?

Fill your tank, reset the trip odometer, drive until you need to refuel, then fill again. MPG = miles driven / gallons used. Example: drove 350 miles and used 11.5 gallons: 350 / 11.5 = 30.4 MPG.

How much gas for 100 miles?

Gallons for 100 miles = 100 / MPG. At 25 MPG: 4 gallons. At 30 MPG: 3.33 gallons. At 40 MPG: 2.5 gallons. Cost for 100 miles at $3.50/gal: 25 MPG = $14.00, 30 MPG = $11.67, 40 MPG = $8.75.

How much gas do I need to drive 500 miles?

At 25 MPG: 500/25 = 20 gallons. At 30 MPG: 500/30 = 16.7 gallons. At 35 MPG: 500/35 = 14.3 gallons. If your tank holds 15 gallons, a 500-mile trip at 25 MPG will need one fill-up plus about 5 extra gallons.

How does gas price affect trip cost?

Trip cost scales directly with price. A 500-mile trip at 30 MPG (16.7 gallons) costs $50 at $3/gal, $58.33 at $3.50/gal, and $66.67 at $4/gal. A $1 increase per gallon adds about $16.70 to this example trip.

What are the best ways to reduce gas costs on a road trip?

Drive at highway speeds (55-65 mph is most efficient for most cars), avoid hard acceleration and braking, keep tires inflated to the recommended PSI, use cruise control on flat highway, remove roof racks when not in use, and use apps like GasBuddy to find cheap gas along your route.

How should I budget gas for a road trip?

Calculate your base fuel cost using this calculator, then add a 10-15% buffer for detours, traffic, and air conditioning use. If crossing multiple states, check regional gas prices in advance. Budget about $0.12-0.18 per mile for a typical 25-35 MPG vehicle at average US prices.

Related Calculators