Fuel Cost CalculatorGas Cost Calculator for Any Trip

Fuel cost = (distance ÷ MPG) × price per gallon.

Work out what a drive will cost in gas — one way or round trip — from distance, fuel economy and price. Works in miles and MPG or kilometres and L/100 km, splits the cost per person and shows what the same trip would cost in other vehicles.

Built on official data fromEPA FuelEconomy.govEIA gas prices
Manzoor Ahmad, developer of the DexoCalc Fuel Cost Calculator
Built by Manzoor AhmadCalculator developer · Updated October 29, 2026

Your numbers

mi
MPG
$

per gallon

Fuel cost for this trip$34.29

300 miles one way at 28.0 MPG and $3.20/gal.

Fuel only
Fuel needed10.71 gal
Cost per mile$0.114per mile
Cost per person$34.291 person
Per 100 miles$11.43

Same trip, different vehicles

Pickup (18 MPG)$53.33
SUV (24 MPG)$40.00
Your vehicle$34.29
Sedan (34 MPG)$28.24
Hybrid (50 MPG)$19.20

If fuel prices change

Fuel priceTrip costChange
$2.70$28.93−$5.36
$2.95$31.61−$2.68
$3.20$34.29Your price
$3.45$36.96+$2.68
$3.70$39.64+$5.36
$4.20$45.00+$10.71

How do you calculate fuel cost for a trip?

Fuel cost = (distance ÷ MPG) × price per gallon. Divide the trip distance by your car’s miles per gallon to get gallons needed, then multiply by the fuel price. A 300-mile trip at 28 MPG and $3.20 a gallon uses 10.71 gallons and costs about $34.29. In metric: litres = km × L/100 km ÷ 100.

This is the main calculator in our Fuel, Mileage & Trip Cost calculators. Go deeper with the Gas Mileage Calculator and the Road Trip Cost Calculator.

How to use it

How to use the gas cost calculator

Pick your units

Choose miles, MPG and price per gallon, or kilometres, L/100 km and price per litre.

Enter the distance

Use your map app’s route distance. Switch to round trip if you’re coming back the same way.

Add fuel economy

Use your real-world MPG if you know it — the EPA combined figure if you don’t.

Enter today’s price

Check a local station or app. Add passengers to split the cost.

The formula

Fuel cost formula

Gallons needed = distance (miles) ÷ MPG
Fuel cost = gallons needed × price per gallon
Cost per mile = price per gallon ÷ MPG
Metric: litres needed = distance (km) × L/100 km ÷ 100
Metric: fuel cost = litres needed × price per litre

Round trips simply double the distance. If you’ll drive extra miles at your destination, add them to the distance before calculating.

Not sure of your real fuel economy? Measure it first with the Gas Mileage Calculator — a wrong MPG figure is the most common reason trip estimates miss.

Worked example

Example: a 300-mile drive

US units

300 mi ÷ 28 MPG = 10.71 gallons
10.71 gal × $3.20 = $34.29
Round trip: $68.57

Metric units

500 km × 7.0 L/100 km ÷ 100 = 35 litres
35 L × 1.75 per litre = 61.25 in your currency
Per km: 0.1225

The US example matches the calculator’s default inputs.

Price chart

Fuel cost per 100 miles by MPG and gas price

MPG$3.00/gal$3.50/gal$4.00/gal$4.50/gal
15$20.00$23.33$26.67$30.00
20$15.00$17.50$20.00$22.50
25$12.00$14.00$16.00$18.00
30$10.00$11.67$13.33$15.00
35$8.57$10.00$11.43$12.86
40$7.50$8.75$10.00$11.25
50$6.00$7.00$8.00$9.00

Notice how the savings shrink as MPG climbs: going from 15 to 20 MPG saves far more per 100 miles than going from 40 to 50. That’s why upgrading the least efficient vehicle in a household usually saves the most.

If you’re weighing a new car, the Car Affordability Calculator shows what you can spend once fuel is counted in the monthly budget.

Save money

How to lower your fuel cost

  • Ease off the highway speed. Drag rises sharply with speed, so cruising a little slower is one of the biggest free savings.
  • Check tire pressure monthly. Under-inflated tires increase rolling resistance.
  • Remove roof racks and cargo boxes when you’re not using them.
  • Combine errands so the engine stays warm and you skip extra cold starts.
  • Compare prices along the route — the cheapest station a few miles off the highway can beat the one at the exit.

For multi-day trips the Road Trip Cost Calculator adds lodging, food and tolls, and the Gas Split Calculator divides the total fairly between riders.

Next steps

Related calculators

FAQ

Fuel Cost Calculator FAQs

Divide 100 by your MPG and multiply by the gas price. At 28 MPG and $3.20 a gallon, 100 miles costs about $11.43. At 20 MPG it’s $16.00.

Double the one-way distance, divide by your MPG and multiply by the price per gallon. A 150-mile each-way trip at 30 MPG and $3.40 costs (300 ÷ 30) × 3.40 = $34.00.

Divide the trip distance by your MPG. A 420-mile trip in a 30 MPG car needs about 14 gallons.

Use your real-world MPG if you’ve measured it — it reflects your driving and routes. The EPA combined rating is a good fallback, but many drivers see somewhat lower figures.

Multiply the distance in kilometres by the L/100 km figure and divide by 100 to get litres, then multiply by the price per litre. 500 km at 7.0 L/100 km uses 35 litres.

Yes. Aerodynamic drag grows quickly with speed, so fuel economy usually drops at higher highway speeds and the same trip costs more.

Divide the total fuel cost by the number of people, including the driver if they’re sharing. Our Gas Split Calculator handles tolls, parking and whether the driver pays.

For one or two people on short trips, driving is often cheaper once you count airfare, bags and airport transport. Price the fuel here, add tolls and lodging, and compare with total airfare for everyone.

This tool is fuel only. Use the Road Trip Cost Calculator to add tolls, parking, lodging and food.

Who built this

About the developer

Manzoor Ahmad, web designer and calculator developer

Manzoor Ahmad

Web Designer & Calculator Developer · 13+ years of web development and SEO experience

I’m a professional pharmacist turned tech geek, and I designed and coded this fuel cost calculator myself. The math here is simple, but getting it right matters when you’re budgeting, so every output follows the FuelEconomy.gov approach and the worked example uses the calculator’s own default numbers.

Found a number that looks wrong, or want a feature added? Tell me through my author page — corrections are fixed and re-dated.

Published: October 29, 2026Last reviewed: October 29, 2026
References

Sources

  1. U.S. DOE & EPA — FuelEconomy.gov
  2. U.S. DOE & EPA — Driving more efficiently
  3. U.S. Energy Information Administration — Gasoline and diesel fuel update

Disclaimer: Estimates cover fuel only and depend on the distance, fuel economy and price you enter. Actual consumption varies with traffic, terrain, speed, weather and load.

Keep this fuel cost calculator handy

Bookmark it for next time, or add DexoCalc as a preferred source so our tools show up first in your Google results.