EV vs Gas Car Lifetime Cost Calculator
Compare total cost of ownership for electric vs gasoline vehicles over a chosen horizon.
What this calculates
EVs typically cost more upfront but less per mile to fuel and maintain. The breakeven depends on annual mileage, fuel and electricity prices, and how long you keep the car. This calculator compares lifetime cost (purchase + fuel + maintenance) for both options.
Formula & how it works
Lifetime cost = purchase − resale + (annual_miles × per_mile_cost + annual_maintenance) × years. Per mile gas = price_per_gal / mpg. Per mile EV = (price_per_kwh × kwh_per_mile).
Worked example
EV $42k, gas $30k. 12k mi/yr × 7 yr. Gas $3.50/gal at 28 mpg = $0.125/mi → $10.5k fuel. EV $0.13/kwh × 0.30 = $0.039/mi → $3.3k fuel. EV saves $7.2k fuel + $3k maintenance = $10.2k, offsetting most of the $12k price premium.
Frequently asked questions
What about tax credits?
$7,500 federal credit (2025-26 rules) + state incentives can flip the math. Apply the credit to the EV purchase price.
Battery replacement?
Modern EV batteries warranty 8-10 years / 100k mi. Out-of-warranty replacement is $8-20k but rarely needed.
Resale?
EV resale has been volatile. Used Tesla prices dropped 30-40% in 2024. Conservative assumption: 40% retained after 5 years.
Related calculators
- Fuel CostEstimate the fuel cost of a trip based on distance, your vehicle's mileage, and current fuel price.
- Gas MileageCalculate fuel economy in MPG (miles per gallon) or L/100km from distance driven and fuel used. Converts between both standards.
- EV ChargingCalculate the cost and time to charge an electric vehicle from any state of charge to any target, at any kW charger speed and electricity rate.