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

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

Sources

Formulas and reference values are from these sources. Page last reviewed 2026-10-19.