Free online tool

Upload a file

Drop your file hereTap to choose a file

or click to browse, or paste from the clipboard

← Back to Blog

How to Calculate Gas Cost for a Trip: Formula, Units and Splitting

To calculate gas cost for a trip, divide the distance by your car's miles per gallon to get the gallons you'll use, then multiply by the price per gallon. A 300-mile drive at 30 mpg uses 10 gallons, and at $3.64 a gallon that is $36.40.

For a round trip, double the distance first, then add tolls and parking and divide by the number of people sharing. With a rating in liters per 100 km, multiply the kilometers by the rating and divide by 100 to get liters. The Trip Fuel Cost Calculator handles any mix of miles, kilometers, liters and US or UK gallons.

How to calculate gas cost for a trip with Zutilium

  1. Open the Trip Fuel Cost Calculator. Under Trip, enter the Distance, choose km or miles in Distance unit, and tick Round trip (doubles the distance) if you are driving back the same way.
  2. Under Vehicle, enter the Fuel efficiency and pick its Efficiency unit: km/L, L/100 km, mpg (US) or mpg (UK). The line under the field repeats the figure in the other three units.
  3. Under Fuel price, type the price per liter or gallon in pounds, dollars or euros, not pence (in the UK, 161.9p is 1.619), and set Price is per to Liter, US gallon or UK gallon. The Currency symbol only labels the amounts; nothing is converted.
  4. Under Extras and sharing, fill in Tolls for the whole trip, Parking for the whole trip and People sharing the cost.
  5. To compare another car, tick Compare with a second vehicle and enter its efficiency in the same unit.
  6. Read the Result, then select Copy trip summary to paste the breakdown into a group chat.

The result shows the distance in miles and km, the fuel needed in liters with US and UK gallons, the fuel cost, tolls and parking, the total and the cost per person. It also gives the fuel cost per km and per mile, which leave out tolls and parking.

The units start from your browser's language, so check the three unit menus before you trust a figure. Everything is worked out in your browser and nothing is uploaded.

The trip fuel cost formula

A gas cost calculator does three things: it works out how much fuel the trip needs, prices that fuel, then adds the extras.

fuel needed = distance ÷ mpg or km/L
fuel needed = distance in km × L/100 km ÷ 100
fuel cost   = fuel needed × price per gallon or liter
trip cost   = fuel cost + tolls + parking
per person  = trip cost ÷ people sharing

The rule that trips most people up: the fuel and the price must be in the same unit. Gallons go with a price per gallon, liters with a price per liter, and a UK gallon is not a US gallon.

Two shortcuts give the fuel cost per mile or kilometer:

  • Per mile: price per gallon ÷ mpg. At $3.642 and 28 mpg, that is 13 cents a mile.
  • Per km: price per liter × L/100 km ÷ 100. At €1.79 and 6.8 L/100 km, that is 12 cents a kilometer.

In a spreadsheet with miles in A2, mpg in B2 and the price in C2, the fuel cost is =A2/B2*C2. With kilometers in A2 and L/100 km in B2, use =A2*B2/100*C2.

The round-trip box doubles the miles but not the extras, so enter tolls and parking for the whole journey.

Worked example: a 560-mile round trip split three ways

Three friends drive 280 miles each way in a car rated 28 mpg (US). Regular gas averaged $3.642 a gallon across the US in the week of November 23, 2026, according to the EIA's weekly gasoline and diesel update. Tolls come to $18.50 and parking to $24.

Step Working Result
Distance 280 × 2 560 miles
Fuel needed 560 ÷ 28 20 gallons (75.71 L)
Fuel cost 20 × $3.642 $72.84
Tolls and parking $18.50 + $24.00 $42.50
Total $72.84 + $42.50 $115.34
Per person $115.34 ÷ 3 $38.45

The calculator gives the same figures and puts the fuel at 13 cents a mile.

Tick Compare with a second vehicle and enter 42 in Second vehicle fuel efficiency in mpg (US): a car rated 42 mpg (US) would burn 50.47 L (13.33 gallons), or $48.56 of fuel. That is $24.28 less, about $8 per person.

Converting US mpg, UK mpg, L/100 km and km/L

Miles per gallon and km/L measure distance per unit of fuel, so higher is better and you divide by them. L/100 km measures fuel per distance, so lower is better and you multiply by it.

The gallon is the second trap. A US gallon is 3.785411784 liters and an imperial (UK) gallon is 4.54609 liters, about 20% more, while a mile is 1.609344 km in both countries, according to NIST's conversion factors. The same car therefore shows a 20% higher mpg in UK units.

L/100 km = 235.215 ÷ mpg (US) = 282.481 ÷ mpg (UK)
km/L     = 100 ÷ L/100 km     = mpg (US) × 0.425144
mpg (UK) = mpg (US) × 1.20095
mpg (US) mpg (UK) L/100 km km/L
20 24.02 11.76 8.50
25 30.02 9.41 10.63
30 36.03 7.84 12.75
35 42.03 6.72 14.88
40 48.04 5.88 17.01
50 60.05 4.70 21.26

Worked example: UK mpg with a price per liter

UK fuel economy is usually quoted in miles per imperial gallon while pumps charge per liter, so every UK estimate needs a conversion; the Vehicle Certification Agency uses 4.546 liters per gallon for its running-cost figures. Petrol averaged 161.96p a liter in the week of November 23, 2026, in the government's weekly road fuel prices. For 150 miles at 48 mpg (UK):

150 ÷ 48          = 3.125 UK gallons
3.125 × 4.54609   = 14.21 liters
14.21 × £1.6196   = £23.01

A calculator that assumes US gallons would turn the same 48 mpg into 11.83 liters and £19.16, which is £3.85 (about 17%) short. In the fuel cost calculator, choose mpg (UK) and set Price is per to Liter, and the conversion is done for you. A US car in Canada works the other way around: keep mpg (US), and switch the distance to km and the price to per liter.

Getting the distance, mpg and gas price right

  • Distance: take the driving distance from your map app, then add miles for detours, side trips and the drive to the hotel.
  • Fuel economy: your own average beats the label. Fill the tank, reset the trip meter, drive as usual, refill and divide the miles by the gallons it took (for L/100 km, liters × 100 ÷ km). For a rental, look up the EPA combined rating on fueleconomy.gov; the site says those ratings are meant for comparing cars and may not match your own average.
  • Gas price: where you fill up can matter more than when. In the same EIA survey, regular averaged $3.125 on the Gulf Coast and $5.274 in California, so the 20 gallons above would cost $62.50 in one and $105.48 in the other. On a long route, use an average of the prices along it.

Speed and load pull real mileage down. According to fueleconomy.gov's driving tips, gas mileage usually drops quickly above 50 mph, a large rooftop cargo box can cut highway fuel economy by 6% to 17%, and each extra 100 pounds costs about 1%. To leave a margin for a loaded car at interstate speeds, budget with about 10% less than the rating you would otherwise use: at 25.2 mpg instead of 28, the example trip needs $80.93 of gas instead of $72.84.

Splitting gas money fairly

The simplest split divides the cost by everyone in the car, driver included. Agree before you leave whether tolls and parking go in the pot, and whether the driver pays a share.

When someone rides only one way, run the calculator once per leg with the right number of people. Counting fuel only, a friend who rides out on the example trip and takes the train home pays $12.14, a third of the $36.42 outbound fuel. The other two pay that plus $18.21 each for the return leg, $30.35 in all.

The per-person figure includes tolls and parking, so leave those two fields empty for a fuel-only split. People sharing the cost takes a whole number from 1 to 100.

Commutes and driving for work

To budget a month of commuting, enter the whole month's mileage at once. For a 16-mile commute each way over 21 working days, enter 336 miles (16 × 21) and tick the round-trip box, which doubles it to 672 miles: at 28 mpg (US) and $3.642, that is 24 gallons and $87.41. The Business Days Calculator counts the working days in a month, leaving out weekends and holidays, and the guide to counting business days between two dates explains the rules.

If you drive for deliveries or rideshare, use the Work Hours Calculator to total the hours you drove, then compare the fuel cost with what you earned in those hours. For the arithmetic behind a time card, read how to calculate hours worked.

When a gas cost calculator gives the wrong answer

The estimate is lower than what you paid

Check that the distance includes the drive home and any detours, and that the mpg suits highway speeds and a loaded car.

The answer is 17% to 20% off

You have probably mixed US and UK gallons. A UK brochure or review quotes mpg (UK), while a US window sticker quotes mpg (US). Choosing the wrong one makes the result about 17% too low or 20% too high.

The fuel needed looks wildly wrong

An L/100 km figure has been entered as km/L, or the other way round. For 420 km, 6.8 L/100 km needs 28.56 L, but 6.8 km/L needs 61.76 L. If your figure goes down as a car gets thriftier, it is L/100 km.

A UK result is 100 times too high

UK pump prices are shown in pence. Enter 161.96p as 1.6196; typed as 161.96, the 150-mile trip above comes out at £2,300.89.

No cost appears

Until there is a price, the calculator shows only the fuel needed and asks for one. If a field is out of range, a message names it: prices take up to four decimals, tolls and parking up to two.

The shares don't add up to the total

Each share is rounded to the cent, so three shares of $38.45 make $115.35 against a $115.34 total. The driver's own share comes out a cent lower here; with other totals it can be a cent higher.

Frequently asked questions

How much does gas cost for a 1,000-mile trip?

At $3.642 a gallon (the US average in the week of November 23, 2026), 1,000 miles costs $145.68 in a car that gets 25 mpg, $121.40 at 30 mpg and $91.05 at 40 mpg. Divide 1,000 by your mpg for the gallons, then multiply by your local price.

How much gas money should each passenger pay?

Divide the fuel cost by everyone in the car, including the driver, and add tolls and parking if the group agreed to share them. On the 560-mile example, that is $24.28 each for fuel alone or $38.45 with tolls and parking. Anything extra for wear on the car is the group's choice, not part of the fuel cost.

Should I use the city, highway or combined mpg?

Use the highway figure for a trip that is mostly freeway and the combined figure when the route runs through towns or traffic. If you will cruise at 70 mph or more with a full car, enter a little less, since fueleconomy.gov notes that mileage usually drops quickly above 50 mph.

How do I convert UK mpg to US mpg?

Multiply UK mpg by 0.83267 to get US mpg, or multiply US mpg by 1.20095 to get UK mpg. A car that returns 48 mpg (UK) gets 39.97 mpg (US), and 40 mpg (US) is 48.04 mpg (UK). The difference is the size of the gallon, not the car.

Is gas money the same as the IRS mileage rate?

No. The IRS business standard mileage rate is 72.5 cents a mile for January to June 2026 and 76 cents from July 1, 2026, and it is based on the fixed and variable costs of running a car, not fuel alone. That is several times the 13 cents a mile of fuel in the example. This is general information, not tax advice.