How to use the fuel cost calculator
- Choose Miles, mpg, gallons or km, L/100 km, liters. Switching converts the numbers you already typed.
- Enter the Distance one way and leave Round trip ticked if you are coming back.
- Enter your Fuel economy and the Fuel price per gallon or liter, then pick your currency.
- Set Split between (people) to see each rider's share.
- For a commute, fill in Trips per week and Weeks per year to get the weekly, monthly and yearly cost.
How the fuel cost is calculated
US: Fuel = distance / mpg
Metric: Fuel = distance / 100 x L per 100 km
Cost = fuel x price
Miles per gallon and liters per 100 km are inverses: L per 100 km = 235.215 / mpg. The factor comes from 1 mile = 1.609344 km and 1 US gallon = 3.785411784 liters, both published by NIST. Weekly cost is the trip cost times trips per week, the year multiplies that by weeks per year, and the month is a twelfth of the year.
Worked example with the default numbers
A 50-mile commute each way is 100 miles round trip. At 28 mpg that uses 100 / 28 = 3.57 gallons. At $4.47 a gallon the trip costs $15.96, or $0.160 per mile. Five trips a week for 50 weeks comes to $79.82 a week, $332.59 a month and $3,991.07 a year.
Limits and edge cases
- The default price of $4.47 a gallon is an example near the recent US average for regular gasoline; the EIA publishes the weekly figure. Prices move fast, so use your own.
- This is fuel only. Maintenance, tires, insurance and depreciation are extra. For comparison, the IRS business standard mileage rate is 76 cents a mile from July 1, 2026 (72.5 cents before), which is meant to cover the full cost of running a car.
- Window-sticker mpg is usually better than real life. Traffic, cold weather, speed and cargo all cut it, so divide miles by gallons over a few fill-ups to get your true figure.
- The tool uses US gallons. For UK miles per imperial gallon, switch to metric and use 282.48 / mpg as your L per 100 km.
- To price home charging for an EV, try the electricity cost calculator. To convert distances, use kilometers to miles, and to see what owning the car costs in total, use the auto loan calculator.
Fuel cost questions people ask
How do I calculate the fuel cost of a trip?
Divide the distance by your miles per gallon to get gallons, then multiply by the price per gallon. For 100 miles at 28 mpg and $4.47 a gallon, that is 3.57 gallons and $15.96.
How do I convert mpg to liters per 100 km?
Divide 235.215 by the mpg figure. 28 mpg is 8.40 L per 100 km. The same formula works backward, so 8 L per 100 km is about 29.4 mpg.
How do I split fuel cost fairly between drivers and passengers?
The simplest split is equal shares including the driver. Some groups give the driver a discount for wear on the car. Agree on the method before the trip.
Why does my actual fuel cost differ from this estimate?
Real fuel economy changes with traffic, weather, terrain, load and driving style. Hard acceleration and high speeds cut mpg, and cold engines burn more fuel. Use the mpg you actually measure.
How do I work out the cost of driving an electric vehicle?
Multiply the miles you drive by your EV's kWh per mile, usually 0.25 to 0.40, and by your electricity rate. For example, 1,000 miles x 0.30 kWh x $0.18 = $54. Public fast charging usually costs more per kWh than home charging.
Sources: U.S. Energy Information Administration, Gasoline and Diesel Fuel Update. Internal Revenue Service, standard mileage rates. NIST, conversion factors. fueleconomy.gov on why real mpg differs from ratings.
Results are estimates for planning only. Actual costs depend on your driving, your vehicle and local fuel prices.