Fuel Cost Calculator: Gas, Diesel or Electric
Enter the distance, your car's economy and the price you pay, in whatever units you use, and see what the drive costs and what each mile or kilometre costs. Works for petrol, diesel and electric cars.
- Fuel or energy
- --
- Trip cost
- --
- Per mile
- --
- Per km
- --
The cost is in whatever currency you entered the price in. Everything runs in your browser.
The arithmetic
cost = distance ÷ economy × price
That is all a fuel cost calculator does, once the units agree. The units are where it goes wrong: a US gallon is 3.785 litres and a UK gallon is 4.546, so 30 mpg in a British car magazine is a thirstier car than 30 mpg in an American one.
| mpg (US) | mpg (UK) | L/100 km | km/L |
|---|---|---|---|
| 20 | 24.0 | 11.8 | 8.5 |
| 30 | 36.0 | 7.8 | 12.8 |
| 40 | 48.0 | 5.9 | 17.0 |
| 50 | 60.0 | 4.7 | 21.3 |
Electric cars
For an electric car the same arithmetic uses kilowatt-hours: energy used per mile or kilometre, times the price per kWh. The EPA's MPGe figure on US window stickers compares the two by treating 33.7 kWh as the energy in a gallon of gasoline, so a car rated at 100 MPGe uses 33.7 kWh per 100 miles. What you actually pay depends heavily on where you charge: home electricity is usually far cheaper per kWh than a public fast charger.
Fuel cost is not the cost of driving
Fuel is the cost you notice at the pump, but it is a minority of what a mile really costs once depreciation, insurance, servicing and tyres are counted. That is why the IRS mileage rate for business driving is several times a typical fuel cost per mile. For reimbursement, use the official rate and a mileage log; for budgeting a trip or splitting the cost with friends, the fuel cost is the number you want.
Sources
- US EPA, Fuel economy and EV range testing: 33.7 kWh as the energy of a gallon of gasoline (MPGe).
- Gallons: the US gallon is 3.785411784 litres and the imperial gallon 4.54609 litres, both exact by definition.
Common questions
How do I calculate the fuel cost of a trip?
Divide the distance by the car's miles per gallon to get the gallons used, then multiply by the price per gallon. 300 miles at 30 mpg is 10 gallons; at 3.50 dollars a gallon that is $35.
How do I convert mpg to L/100 km?
For US gallons, divide 235.2 by the mpg: 30 mpg is about 7.8 L/100 km. For UK (imperial) gallons, divide 282.5 by the mpg: 30 mpg is about 9.4 L/100 km.
How much does it cost to drive an electric car per mile?
Multiply the energy per mile by the electricity price. A car that does 3.5 miles per kWh, charged at 15 cents per kWh, costs about 4.3 cents a mile in electricity.
Is the fuel cost the same as the IRS mileage rate?
No. Fuel is only part of what the IRS rate covers; the rate also allows for depreciation, insurance, repairs and tyres, which is why it is much higher than the fuel cost alone.