Gas vs Electric Cost per Mile Calculator
Compare energy cost per mile and over a distance for a gasoline car and an electric car using your own prices.
How it works
Gasoline cost = distance ÷ MPG × price per gallon. Electric cost = distance × (kWh per 100 miles ÷ 100) × price per kWh. The calculator compares fuel and electricity cost only.
Worked example: 12,000 miles: gas at 30 MPG and $3.50 is 400 gallons = $1,400.00. Electric at 30 kWh/100 mi and $0.16/kWh is 3,600 kWh = $576.00. Difference $824.00.
Assumptions
- Fuel/energy cost only: purchase price, maintenance, insurance, incentives, charger installation and depreciation are excluded.
- Constant prices and constant efficiency over the whole distance.
- The EV efficiency is wall-to-wheels (EPA label kWh/100 mi or MPGe include Level 2 charging losses).
- The default prices are placeholders. Use your local gasoline price and electricity rate.
Frequently asked questions
What is MPGe and can I compare it directly to MPG?
EPA defines MPGe as the miles a vehicle can go using the same energy content as one gallon of gasoline (33.705 kWh). It compares energy use, not cost, so this calculator uses your actual prices to compare cost.
Related calculators
- EV charging cost calculator
- MPGe, kWh/100 mi and miles/kWh converter
- EV charging time calculator
- EV charger power and miles-per-hour calculator
- eGallon gas price equivalent calculator
- EV home charging cost per month
- kWh/100 km, Wh/mi and MPGe converter
Sources
Formulas and reference values are from these sources. Page last reviewed 2026-10-19.