What this calculator does
Find out what a drive will cost in gas, one way or round trip, and what each person owes if you split it. The cost depends on three things. There's how far you drive, how much fuel your car uses, and the price per gallon or liter.
The calculator puts them together and shows each step along the way. It also lists what the same trip would cost if gas were up to a dollar more or less.
Fuel economy (how far a car goes on its fuel) is measured differently around the world. The US uses miles per US gallon (mpg). The UK uses miles per imperial gallon, which is a bigger gallon. Much of Europe uses liters per 100 kilometers, and some places use kilometers per liter.
Enter the figure in whichever form you have. You can price fuel per US gallon, imperial gallon or liter. The result also shows your fuel economy in the other system.
Where it's used
Why this math matters outside the classroom:
- Road trip budget. A 450-mile trip in a car that gets 30 mpg uses 15 gallons, which costs $51 at $3.40 a gallon.
- Splitting gas money. Four friends sharing that $51 fuel cost each pay $12.75.
- Daily commute. Commuters multiply a 25-mile round trip by work days to estimate fuel spending for a month.
- Comparing vehicles. Families compare the fuel cost of the same trip in a car that gets 22 mpg and one that gets 35 mpg.
Grade level and standards: Grade 6; Common Core State Standards for Mathematics 6.RP.A.3.b. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.
How to use it
- Enter the one-way distance and choose miles or kilometers. Tick Round trip if you'll drive back the same way.
- Enter your vehicle's fuel economy and pick the unit it's measured in.
- Enter the fuel price and the unit it's sold in.
- If you're sharing the cost, enter how many people. Then read the total, the cost per person, the fuel needed and the cost per mile.
- Open the price table under the result to see how the trip cost changes with the price at the pump.
What the inputs mean
- Trip distance (one way)
- The driving distance in one direction. The route distance from a map app is more accurate than a straight line.
- Fuel economy
- For mpg and km/L, a higher number is better. For L/100 km, lower is better. Real driving often uses more fuel than the official rating, especially at highway speeds, in cold weather or with a heavy load.
- Fuel price
- The pump price you expect to pay, in dollars per unit. If prices vary along the route, use an average.
- Split the cost between
- Everyone splitting the fuel bill equally. Count the driver too if they pay a share.
Formula and method
fuel (gallons) = distance (miles) ÷ mpg fuel (liters) = distance (km) × L/100 km ÷ 100 fuel (liters) = distance (km) ÷ km/L cost = fuel (in the price's unit) × price per unit cost per person = cost ÷ number of people L/100 km = 235.2146 ÷ mpg (US) (282.4809 ÷ mpg for imperial)
In the formulas, mpg is miles per gallon, L/100 km is liters per 100 kilometers, and km/L is kilometers per liter. First, the calculator converts the distance, if needed, to match your fuel economy. That's miles for mpg, and kilometers for the metric measures. The matching formula then gives the fuel used, in gallons or liters.
If the fuel price uses a different unit, the calculator converts the amount of fuel. It uses exact definitions: 1 mile = 1.609344 km, 1 US gallon = 3.785411784 liters, and 1 imperial gallon = 4.54609 liters.
Multiplying the fuel by the price gives the trip cost. For a round trip, the distance is doubled before anything else is worked out.
Worked example
A one-way drive of 300 miles in a car that averages 28 mpg (US), with fuel at $3.25 per US gallon, paid by one person.
- Fuel used: 300 ÷ 28 = 10.714 US gallons.
- Cost: 10.714 × $3.25 = $34.82.
- Cost per mile: $34.82 ÷ 300 = about $0.12.
- In metric terms, 28 mpg (US) is 235.2146 ÷ 28 = 8.40 L/100 km.
- Ticking Round trip doubles it to 600 miles and $69.64. Shared by 4 people, that's $17.41 each.
Result: The trip needs about 10.71 US gallons of fuel and costs about $34.82 one way, or $69.64 there and back ($17.41 each for four people).
Understanding the result
Treat the result as an estimate. Traffic, speed, hills, air conditioning, tire pressure and cargo all change how much fuel you really use. The difference is often 10% or more.
Cost per mile or kilometer is handy for comparing vehicles. It also helps you decide whether driving beats another way to travel, once tolls and parking are added.
The price table shows how much fuel prices matter for your trip. For this default trip, each 25-cent change per gallon moves the cost by about $2.68, because it burns about 10.7 gallons.
Assumptions and limitations
- Fuel economy stays the same for the whole trip.
- The price per unit is the same at every fill-up.
- A round trip uses the same distance and fuel economy in both directions.
- The cost is shared equally between everyone counted.
- Only fuel is counted. Tolls, parking, wear and tear, insurance and depreciation (the car losing value) aren't included.
- Electric vehicles aren't covered, since their energy is priced per kilowatt-hour, not per gallon or liter.
- Results use the price you enter. The calculator has no live fuel price data.
Frequently asked questions
How do I find my car's real fuel economy?
Fill the tank and reset the trip meter. At the next fill-up, divide the distance driven by the amount of fuel it takes to refill. Averaging this over a few tanks gives a more realistic figure than the official rating.
Why are there two kinds of mpg?
The US gallon (about 3.785 liters) is smaller than the imperial gallon (about 4.546 liters) used in the UK. So the same car shows a higher mpg in imperial gallons. Choose the version that matches where your figure came from.
How do I convert mpg to L/100 km?
Divide 235.215 by the US mpg figure, or 282.481 by the imperial mpg figure. For example, 30 mpg (US) is about 7.84 L/100 km. You don't need to convert first, though. This calculator accepts either.
How much gas money should I give the driver?
Work out the round-trip fuel cost and divide it by the number of people sharing. Take a 300-mile trip each way at 28 mpg and $3.25 a gallon. The round trip is about $69.64, so four people sharing equally pay about $17.41 each. Some groups add a little for tolls or parking, which this calculator leaves out.
How do I estimate a monthly commuting cost?
Enter your one-way commute and tick Round trip. Then multiply the result by the number of days you drive each month. A 20-mile commute at 28 mpg and $3.25 costs about $4.64 a day round trip. That's roughly $97.50 over 21 working days.
Should the driver pay a share?
That's up to the group. If everyone, including the driver, splits the fuel equally, count the driver in the number of people. Some groups leave the driver out, to thank them for their time and the wear on their vehicle.
How this calculator is checked
Method: Definitions of fuel economy (distance per volume, volume per distance); exact unit definitions for the international mile, US gallon and imperial gallon. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this Gas Cost Calculator on your own website or blog for free. Paste this code where you want it to appear: