Gas cost calculator
Enter your car’s mpg, the trip distance and the price per gallon and this gas cost calculator shows what the drive costs in gas, how many gallons you need and each person’s share. Prefer liters and kilometers? Switch the units.
Example: Units: US (miles, gallons, mpg) · Fuel economy 30 mpg · Distance (one way) 200 miles · Gas price 3.5 per gallon · Number of people 1 → Total fuel cost: US$23.33. Source: NIST Handbook 44 (2026), Appendix C – 1 US gallon = 231 in³ = 3.785 411 784 L; 1 mile = 1.609 344 km (exact; accessed 2026-09-27). Updated: .
How it is calculated
How to calculate gas cost for a trip
The fuel cost of a trip depends on three numbers: distance, fuel economy and the price of gas.
How to calculate gas cost for a trip
- Choose US units (miles, gallons, mpg) or metric units with L/100 km or km/L.
- Enter fuel economy, one-way distance and gas price; tick round trip to double the distance.
- Add the number of people – you get the total cost, the fuel needed and each person’s share.
Formula: gas cost = miles ÷ mpg × price per gallon
Miles divided by mpg gives the gallons you burn. Divide the total by the number of people to get each person’s share.
Example: a road trip split two ways
Two friends drive 200 miles to a lake and back. The car gets 30 mpg, and in this example gas costs 3.50 a gallon.
- Total distance: 2 × 200 = 400 miles
- Gas used: 400 ÷ 30 = 13.33 gallons
- Total cost: 13.33… × 3.50 = 46.67
- Per person: 46.67 ÷ 2 = 23.33
- Per mile: 3.50 ÷ 30 = 0.12
mpg, L/100 km and km/L
US window stickers show miles per gallon; most other countries use liters per 100 km, some kilometers per liter. The calculator converts with the exact definitions from NIST: 1 US gallon = 3.785411784 liters and 1 mile = 1.609344 km. For a quick conversion, L/100 km ≈ 235.215 ÷ mpg – 30 mpg is about 7.84 L/100 km. Note that the imperial (UK) gallon is larger than the US gallon, so UK mpg figures are not the same as US mpg; for UK trips switch to metric and enter the price per liter.
What the calculator does not include
The result is the cost of fuel only – not tolls, parking, maintenance, tires, insurance or depreciation, so it is not the same as a mileage reimbursement rate. Real-world fuel economy varies with speed, traffic, load and weather; use the average from your trip computer or your fill-up log for the best estimate.
More driving calculators: compare with the EV charging cost calculator, plan the whole holiday with the travel budget calculator, and work out what your appliances cost with the electricity cost calculator.
Frequently asked questions
How do I calculate gas cost for a road trip?
Divide the miles by your car’s mpg and multiply by the price per gallon. 200 miles at 30 mpg and 3.50 a gallon is 6.67 gallons, or 23.33.
How do I split gas money between passengers?
Divide the total fuel cost by the number of people sharing it – whether the driver counts is up to you. A 46.67 round trip split two ways is 23.33 each.
How do I work out my car’s mpg?
Fill the tank, reset the trip meter, and at the next fill-up divide the miles driven by the gallons you put in. 330 miles on 11 gallons is 30 mpg.
What is the gas cost per mile?
Price per gallon ÷ mpg. At 3.50 a gallon and 30 mpg, each mile costs about 0.12 in gas.
Can I use kilometers and liters?
Yes. Set the units to metric and enter liters per 100 km (or km per liter), kilometers and the price per liter. The calculator then shows liters and the cost per 100 km.
Does it include tolls and wear and tear?
No, only fuel. Tolls, parking, maintenance and depreciation come on top when you look at the full cost of driving.
Sources and legal basis
- NIST Handbook 44 (2026), Appendix C – 1 US gallon = 231 in³ = 3.785 411 784 L; 1 mile = 1.609 344 km (exact; accessed 2026-09-27)
- NIST SP 811, Appendix B.8 – mpg to L/100 km: 235.215 ÷ mpg (accessed 2026-09-27)
As of: · Editorial policy
Related tools
- EV charging cost calculatorWork out what charging your electric car costs at home and at a public charger – from battery size, state of charge, charging losses and your price per kWh.
- Electricity cost calculator for appliancesWork out what an appliance costs to run: enter watts, hours per day, days per week and your rate per kWh to get kWh and cost per day, month and year.
- Proportion CalculatorSolve direct and inverse proportion problems (rule of three) online: find x from a ↔ b and c, with the unit value and step-by-step working.
- kg to lbs converterConvert kg to lbs and back: 1 kg = 2.2046 lb. Shows pounds and ounces, stone and pounds, grams, tons and a kg to lbs chart – exact to the legal definition.
- Fahrenheit to Celsius converterConvert Fahrenheit to Celsius and back: °C = (°F − 32) ÷ 1.8. Also Kelvin, Rankine and Réaumur, with the working shown and a chart of common temperatures.
- Mileage Reimbursement CalculatorMileage reimbursement calculator: enter miles driven and a rate per mile – pre-filled with the 2026 IRS business rate of 76 cents – and get the amount.
- EV charging time calculator – how long will it take to charge?EV charging time calculator: enter battery size, charge levels and charger power from a wall socket to a fast charger and see time, energy and range added.
- Lease vs buy car calculator: which costs less?Lease vs buy car calculator: compare paying cash, a loan and a lease over the same term, with resale value, extra miles and lost interest, with a chart. Free.
- Electric car vs gas car cost: which is cheaper?Compare electric car vs gas car cost with your own numbers: total cost, cost per mile and the year the electric car pays off, with a chart. Free and private.