Fuel cost calculator
Find out how much gas a trip will take and what it will cost. Enter the distance, your car's fuel economy and the price per gallon to get the total, the cost per mile and the share for each passenger. Use it for a one-off road trip or set it to every workday to see what your commute costs per month and per year. Fuel economy works in mpg (US or UK), L/100 km or km/L, prices per gallon or per litre, with 19 currencies. Electric cars are covered too in kWh/100 mi or mi/kWh with your price per kWh, and you can put two vehicles side by side to see which is cheaper to run.
Free · No sign-up
How to use it
- Enter the one-way distance and tick round trip if you are coming back.
- Enter your fuel economy and the current gas price.
- Add passengers, tolls or a repeat such as every workday.
- Read the total, cost per mile, per person and yearly cost.
Why use this tool
Any unit
mpg US or UK, L/100 km, km/L, per gallon or per litre, miles or km.
Commute costs
Monthly and yearly totals for daily, workday or weekly trips.
Split the cost
Share per passenger for carpooling and road trips, with tolls.
Electric cars
kWh/100 mi or mi/kWh with your electricity price.
Compare two vehicles
Gas vs hybrid vs EV side by side with yearly savings.
Range and stops
Range on a full tank and refuel stops on long drives.
How is fuel cost calculated?
Fuel cost = distance ÷ fuel economy × price per gallon. A 300-mile trip in a car that gets 30 mpg uses 10 gallons; at $3.20 a gallon that is $32. For metric units the formula is distance × L/100 km ÷ 100 × price per litre.
Real-world economy is usually 10–20% worse than the window sticker, especially at highway speeds above 65 mph, with a roof box, in winter or in city traffic. Use the average from your trip computer or from a few fill-ups for the most accurate result.
What does a commute cost?
A 20-mile each-way commute in a 25 mpg car at $3.20 a gallon costs about $5.12 a day, roughly $111 a month and $1,330 a year in gas alone, before maintenance, insurance and depreciation. Choose Every workday and tick Round trip to see your own numbers.
Splitting gas money on a road trip
- Enter everyone in the car, including the driver, under People sharing the cost.
- Add tolls and parking so they are split as well.
- Some groups also add a small amount per mile for wear on the driver's car; the IRS mileage rate is a common reference.
Gas car vs electric car
An EV that does 3.5 mi/kWh charged at home for $0.17 per kWh costs about 5 cents a mile, compared with about 11 cents for a 28 mpg car at $3.20 a gallon. Public fast charging can cost $0.40–0.60 per kWh, which narrows the gap. Tick Compare with a second vehicle to check your case.
Frequently asked questions
How do I calculate gas cost for a trip?
Divide the miles by your mpg to get gallons, then multiply by the price per gallon. The calculator does this and adds round trip, tolls and passengers.
How do I convert L/100 km to mpg?
US mpg = 235.21 ÷ L/100 km. UK mpg = 282.48 ÷ L/100 km. Change the unit in the menu and the value converts automatically.
What is the cost per mile to drive?
Fuel alone is usually 8–20 cents a mile in the US. The result shows your exact fuel cost per mile.
Does it work for diesel and electric cars?
Yes. Choose diesel, LPG or electric. For EVs enter kWh/100 mi or mi/kWh and your price per kWh.
How accurate is it?
As accurate as the economy figure you enter. Speed, weather, load and traffic can change real consumption by 10–30%.
Are my numbers saved?
Your last inputs are kept only in this browser so you don't have to type them again.
How to calculate fuel cost and spend less on gas
Related tools
Need something built?
Tell us what you want to create.
Tell us what you need built, from a simple website to a complete app, AI solution, automation, or custom system.