Gas cost calculator
Enter your car’s mpg, the trip distance and the price per gallon to see what the drive costs in gas, how many gallons you need and each person’s share. Prefer liters and kilometers? Switch the units.
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.
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.
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:
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.
- Discount calculatorPercent off calculator: sale price and savings for any discount, stacked discounts like 20% + 10%, the percent off between two prices and the original price.
- VAT calculator for France and SpainAdd or remove French VAT (TVA 20%, 10%, 5.5%, 2.1%) or Spanish VAT (IVA 21%, 10%, 4%) – net to gross and back, rounded to the cent, with official sources.
- Hourly to salary calculatorConvert an hourly wage to annual salary or salary to hourly pay – plus daily, weekly and monthly amounts. Gross pay, any hours per week, any currency.