Calculate gas or diesel cost for a trip from distance, MPG or L/100 km and fuel price, or find what a number of gallons or liters of fuel costs.

Changing the unit system reinterprets the entered numbers.

Trip options


Related Calculators

Calculator Functions

FunctionWhat it doesWhat it requires
Trip fuel costFinds the fuel cost of a trip from its distance, the fuel economy and the fuel priceRequires the one-way distance, the fuel economy and the fuel price
Fuel price per gallon or liter from trip costFinds the fuel price implied by what a trip costRequires the one-way distance, the fuel economy and the total fuel cost
Maximum distance for a budgetFinds the farthest one-way distance a fuel budget coversRequires the total fuel budget, the fuel economy and the fuel price
Cost of a number of gallons or litersFinds the cost of a known amount of fuelRequires the fuel amount in US gallons or liters and the price per gallon or liter
Price per gallon or liter from amount and costFinds the price per gallon or liter paid at a fill-upRequires the fuel amount in US gallons or liters and the total fuel cost

The three trip functions work in miles and MPG (US gallons), kilometers and L/100 km, or kilometers and km/L. Trip options set one way or round trip, a number of identical trips and the number of people sharing the cost. The currency choice only labels the result and converts nothing. Every result also lists the fuel amount, the total cost and the cost per person, and trip results add the fuel cost per mile or kilometer.

Fuel Price Formulas

Cost = Fuel ร— Price
CostTotal fuel cost
FuelAmount of fuel (US gallons or liters)
PriceFuel price per gallon or liter

Trip fuel cost

Fuel = D รท MPG

D is the total distance: the one-way distance times the number of trips, doubled for a round trip. With km/L the fuel is D รท km/L, and with L/100 km it is D ร— L/100 km รท 100. A 300-mile drive at 25 MPG and $3.50 per gallon uses 12 gallons and costs $42.00 one way, or $84.00 as a round trip. A 100 km drive at 8 L/100 km uses 8 liters, which is 14.40 at 1.80 per liter.

Fuel price per gallon or liter from trip cost

Price = Cost รท Fuel

The fuel amount comes from the distance and fuel economy as above. A 300-mile drive at 25 MPG that cost $45.00 in fuel works out to $3.75 per gallon.

Maximum distance for a budget

D = Budget รท Price ร— MPG

With L/100 km, D = Budget รท Price ร— 100 รท L/100 km. The total is divided by the number of trips, and by 2 for round trips, to give a one-way distance. A $50.00 budget at $3.50 per gallon and 25 MPG covers 357.14 miles one way, or 178.57 miles each way as a round trip.

Cost of a number of gallons or liters

The main formula applies directly: 10 gallons at $3.50 per gallon cost $35.00, and 40 liters at 1.80 per liter cost 72.00.

GallonsAt $3.00At $3.50At $4.00
5$15.00$17.50$20.00
10$30.00$35.00$40.00
12$36.00$42.00$48.00
15$45.00$52.50$60.00
16$48.00$56.00$64.00
20$60.00$70.00$80.00
25$75.00$87.50$100.00
30$90.00$105.00$120.00

Price per gallon or liter from amount and cost

The fill-up cost is divided by the amount bought. A fill-up of 12.4 gallons for $43.40 is $3.50 per gallon.

Limits of This Estimate

  • MPG means miles per US gallon. A figure in miles per Imperial gallon has to be converted before it is entered.
  • Fuel economy is treated as one fixed number. Real consumption changes with speed, load, terrain and weather, and the calculator plans no route and keeps no reserve.
  • Prices are whatever is entered. No live fuel prices are looked up, and choosing a currency does not convert anything.