AutoMath
The car itself

Gas vs Electric Total Cost Calculator

Side-by-side lifetime cost of a combustion car and an equivalent EV — purchase net of incentive, energy with charging losses, maintenance, and resale — plus how fast the EV premium pays back.

Your numbersSaved on this device only
⛽ Gas car
🔋 Electric car
Over 8 years, 🔋 electric is cheaper by

$8,424

gas $39,200 · ev $30,776

EV premium pays back in 2.1 yr
Cheap home electricity, lower EV maintenance, and the incentive outweigh the higher sticker over this horizon and mileage.
⛽ Energy (life)
$11,200
🔋 Energy (life)
$4,876
⛽ Net price
$32,000
🔋 Net price
$34,500after incentive

What this computes

"Gas or electric?" is usually argued with anecdotes. This settles it for two specific cars and your driving: it totals purchase (EV net of incentive), lifetime energy with charging losses, maintenance, and the resale value each retains, then reports the gap and the payback on any EV price premium.

The math

gas total = price − resale + (miles/MPG·gasPrice)·yrs + upkeep·yrs
ev total  = (price − incentive) − resale
            + (miles·(1/eff)/(1−loss)·elecRate)·yrs + upkeep·yrs
payback   = (ev net − gas net) / annual running saving

The honest comparison nets resale (an asset you keep) and includes the charging-loss term most back-of-envelope EV math omits.

The EV question isn't ideological. It's mileage × energy-price gap × incentive × resale — four numbers, one answer.

How to use this

  1. Compare two real cars, not a category — use the actual prices and specs you'd buy.
  2. Enter only an incentive you'll get. Eligibility is narrow and changing; a credit you can't claim distorts the result.
  3. Use your real electricity rate, ideally off-peak if you charge overnight — it's the EV's biggest lever.
  4. Be conservative on EV resale unless you have strong model-specific data; it's the most uncertain input.

What actually decides it

  • Annual mileage. The EV's per-mile energy advantage only adds up if you drive enough miles.
  • Energy-price gap. Cheap home electricity vs expensive gas is where the savings live; public-only charging erases it.
  • Net premium. Incentives can eliminate the upfront gap entirely — or not apply at all.
  • Resale. A ten-point difference in retained value can outweigh years of fuel savings.

What this calculator doesn't model

  • Home-charger install cost. A one-time Level 2 install should be added to the EV side if relevant.
  • Battery replacement. Rare within typical ownership but a tail risk; not modeled.
  • Financing interest. Compare cash-equivalent here; use Auto Loan for the financing cost of each.
  • Time-of-use and demand charges, and gas-price inflation over the period.

Frequently asked questions

Is an EV really cheaper than a gas car? +
It depends on four things: your annual mileage, your electricity rate versus local gas price, the EV's price premium net of incentives, and how each car holds value. High mileage, cheap home electricity, and a meaningful incentive favor the EV; low mileage, expensive public charging, and a large premium favor gas. This calculator makes the trade-off explicit instead of asserting an answer.
What is the EV-premium payback? +
If the EV costs more upfront (net of incentive) but less to run each year, the payback is the upfront premium divided by the annual running saving — the number of years before the EV pulls ahead. If there's no premium, or no running saving, payback doesn't apply and the calculator reports that.
Why include charging losses? +
Energy billed at the wall is higher than energy stored in the battery because charging isn't 100% efficient (typically ~10% loss on home Level 2). Ignoring it understates EV running cost by roughly a tenth, which can be the difference in a close comparison. The calculator grosses EV energy up by the loss.
How should I handle resale value? +
Enter each car's expected value at the end of your ownership period as a percentage of its purchase price. This matters a lot: EV resale has historically been more volatile than mainstream gas cars (battery-life perception, fast technology turnover), and a difference of even ten points can flip the verdict. Use real used-value data for the specific models.
Does the federal/state incentive always apply? +
No. EV incentives depend on the model, where it's built, battery sourcing, your income, and whether it's a purchase or lease — and they change. Enter only the incentive you'll actually qualify for; a credit you can't claim shouldn't be in the comparison.
Is this financial advice? +
No. AutoMath is an educational tool. Prices, rates, incentives, and resale values vary and change. The output depends entirely on the inputs you provide — use it to compare two specific cars on consistent assumptions, not as a verdict on EVs in general.

Related calculators

The four numbers that decide it: gas vs electric, explained.

AutoMath is an educational tool. The numbers above depend entirely on assumptions you provide and are not financial advice.