About the Gas Cost calculator
This gas cost calculator estimates how much fuel a trip will use and what it will cost. Enter the distance, your car's fuel economy and the price of fuel, and it shows the total cost, the fuel used and the cost per mile or kilometer.
Tick round trip to double the distance, and split the cost between passengers to see what each person should chip in. You can work in US units (miles, miles per gallon and price per gallon) or metric units (kilometers, liters per 100 km and price per liter).
How to use it
- Choose Units: Miles & MPG, or Km & L/100 km.
- Enter the one-way Trip distance.
- Enter your Fuel economy in MPG, or in liters per 100 km for metric.
- Enter the Fuel price per gallon, or per liter for metric.
- Tick Round trip if you're coming back, and set Split between for shared costs.
The formula
First the fuel needed, then its cost:
US units: gallons = miles ÷ MPG
Metric units: liters = km × (L/100 km) ÷ 100
cost = fuel used × price per unitcost per person = cost ÷ peoplecost per mile (or km) = cost ÷ distance
- Round trip doubles the distance before the fuel is worked out.
- MPG is "distance per fuel", so a bigger number is better. L/100 km is "fuel per distance", so a smaller number is better. That's why one divides and the other multiplies.
Worked examples
US units. A 300-mile drive in a car that gets 28 MPG, with gas at $3.45 a gallon:
- Fuel: 300 ÷ 28 = 10.71 gallons
- Cost: 10.71 × $3.45 = $36.96
- Round trip: 600 miles, $73.93, or $36.96 each for two people
Metric units. A 500 km drive in a car that uses 6.5 L/100 km, with fuel at 1.80 per liter: 500 × 6.5 ÷ 100 = 32.5 liters, and 32.5 × 1.80 = 58.50 in your currency.
To convert between systems, use L/100 km = 235.215 ÷ MPG (with US gallons). So 28 MPG is about 8.4 L/100 km, and the same formula works in reverse: 235.215 ÷ 8.4 ≈ 28 MPG.
Tips for a better estimate
Use the fuel economy you actually get, not just the sticker figure. Your car's trip computer, or the miles driven between two fill-ups divided by the gallons added, gives a realistic number. Highway driving usually uses less fuel per mile than stop-and-go city traffic, while heavy loads, roof boxes, towing and high speeds use more.
Fuel prices can differ along a route, so a rough average price is fine for planning. This calculator covers fuel only. Tolls, parking and wear on the car are extra.
For converting distances, use the length converter. For splitting a meal on the trip, the tip calculator handles the tip and each person's share. To estimate the cost of a car itself, try the auto loan calculator.
Frequently asked questions
How do I calculate gas cost for a trip?
Divide the distance by your MPG to get gallons, then multiply by the price per gallon. 240 miles at 30 MPG and $3.50 a gallon is 8 gallons, or $28.
How do I convert MPG to L/100 km?
Divide 235.215 by the MPG figure (US gallons). For example, 25 MPG is about 9.41 L/100 km.
Should I use city or highway MPG?
Use the figure that matches most of your trip. For a long highway drive, the highway rating or your own highway average is closest.
Does the calculator include tolls or parking?
No, it only covers fuel. Add tolls, parking and other costs separately.
How should we split gas money?
Dividing the fuel cost evenly is the simplest. Set Split between to the number of people sharing, and the per-person amount appears.
Last updated October 24, 2026. Results are estimates for education and planning — see our disclaimer.