Gas vs Electric Car Calculator

Compare electric vehicle (EV) and gas car costs using your miles, energy prices, charging mix, and ownership plans.

Advanced options
Driving and charging
Purchase, yearly costs, and resale
Calculating...
Did we solve your problem today?


How to use our Gas vs Electric Car Calculator

  1. Enter Miles you drive each year (miles), Gas price ($ per gallon), and Gas car fuel economy (miles per gallon).
  2. Enter Home electricity price ($ per kWh) and EV energy use (kWh per 100 miles) for the electric vehicle.
  3. Open Advanced options if you want to add public charging, charging loss, years owned, upfront cost, credits, yearly non-fuel cost changes, or resale value.
  4. Select Calculate and read Estimated yearly savings with the EV first; a negative savings number means the EV costs more for the values you entered.
  5. Sanity-check the result by comparing EV energy cost per mile with Gas fuel cost per mile; if one looks surprising, recheck prices, MPG, kWh per 100 miles, and charging mix.
Example inputs for Gas vs Electric Car Calculator
Example inputs for Gas vs Electric Car Calculator

Definitions

EV: Electric vehicle, meaning a car powered by electricity stored in a battery.

kWh: Kilowatt-hour, a unit of electric energy. Your power bill and many public chargers price electricity by kWh.

EV energy use (kWh per 100 miles): How much electricity the EV uses to drive 100 miles. Lower numbers mean less electricity per mile.

Gas car fuel economy (miles per gallon): How many miles the gas car drives on one gallon of gas. Higher numbers mean less gas per mile.

Miles charged away from home (percent): The share of EV miles charged at public, workplace, or other non-home prices. EVs can be charged at home, public stations, and some workplaces [1].

Extra electricity lost while charging (percent): Extra wall electricity needed because some energy is lost before it reaches the battery.

EV yearly non-fuel cost minus gas ($ per year): The EV's yearly maintenance, insurance, registration, or charger-related cost minus the gas car's similar cost.

Time until the EV catches up: The number of months needed for yearly savings to cover the EV's net extra upfront cost after credits.


Common mistakes and quick fixes

Mistake: Using a guess in Miles you drive each year (miles) that is far from your real driving.
Fix: Check recent odometer readings, insurance mileage, or commute miles before using Estimated yearly savings with the EV.

Mistake: Entering highway-only numbers in Gas car fuel economy (miles per gallon).
Fix: Use combined MPG when possible so Gas yearly fuel cost is not too low.

Mistake: Putting a monthly electric bill total into Home electricity price ($ per kWh).
Fix: Enter the price per kWh from the bill, not the full bill amount.

Mistake: Leaving Miles charged away from home (percent) at 0 when you often use public charging.
Fix: Add your public or workplace charging share and fill Away-from-home charging price ($ per kWh).

Mistake: Treating EV extra upfront cost ($) as the full EV price.
Fix: Enter only the EV price minus the gas car price, before EV credit or rebate you can use ($).

Mistake: Reversing the sign in EV yearly non-fuel cost minus gas ($ per year).
Fix: Enter a positive number if the EV costs more each year outside fuel, and a negative number if it costs less.


Limitations & Key Assumptions / Boundary Conditions

  • The calculator estimates cost differences from your entered prices, miles, efficiency, charging mix, upfront gap, credits, yearly non-fuel cost difference, and resale difference.
  • It does not automatically include financing interest, sales tax differences, insurance, registration, maintenance, charger installation, parking, or repairs unless you put them in EV yearly non-fuel cost minus gas ($ per year) or EV extra upfront cost ($).
  • Gas price, electricity price, public charging price, and driving efficiency can change over time. The calculator uses one average value for each.
  • Public charging sessions may include idle fees, membership fees, parking fees, or per-minute pricing. Convert those to an expected $ per kWh before entering Away-from-home charging price ($ per kWh).
  • EV credit or rebate you can use ($) should include only incentives you are confident you qualify for. Incentive rules can depend on vehicle, buyer, income, location, and purchase date.
  • Time until the EV catches up ignores EV resale value minus gas at sale ($), because resale happens at sale rather than month by month.
  • A negative Estimated yearly savings with the EV or Total savings over your time owning it is kept negative on purpose. It means the gas car is cheaper for the inputs entered.

Methodology

Calculation steps

The calculator first blends home and away-from-home charging into one electricity price. Percent entries are divided by 100 before use.

blended_electric_rate = (1 - public_charging_percent / 100) * home_electric_rate + (public_charging_percent / 100) * public_charging_rate

It then adjusts EV energy use for charging loss. If charging loss is 0, billed kWh per mile is just kWh per 100 miles divided by 100.

ev_billed_kwh_per_mile = (ev_kwh_per_100_miles / 100) / (1 - charging_loss_percent / 100)

Yearly fuel and electricity costs use your annual miles and the entered fuel or electricity price.

annual_gas_fuel_cost = annual_miles / gas_mpg * gas_price

annual_ev_energy_cost = annual_miles * ev_billed_kwh_per_mile * blended_electric_rate

Yearly savings compares gas fuel cost with EV electricity cost, then subtracts the EV yearly non-fuel cost difference. Negative savings is not changed to 0, because it means the EV costs more per year.

annual_net_savings = annual_gas_fuel_cost - annual_ev_energy_cost - ev_yearly_nonfuel_delta

monthly_net_savings = annual_net_savings / 12

Total savings over the ownership period adds repeated yearly savings, subtracts the net upfront extra cost after credits, and adds the expected resale difference.

net_upfront_extra = ev_upfront_extra - ev_credit_rebate

comparison_total_savings = annual_net_savings * years_owned - net_upfront_extra + ev_resale_delta

Break-even time is 0 months when the EV has no net upfront gap after credits. If there is an upfront gap but yearly savings are 0 or negative, break-even is shown as N/A.

if net_upfront_extra <= 0, break_even_months = 0

else if annual_net_savings <= 0, break_even_months = N/A

else break_even_months = net_upfront_extra / (annual_net_savings / 12)

Cost per mile compares the two cars on driving energy only. Cost-equivalent MPG is the gas MPG that would match the EV's energy cost per mile.

gas_cost_per_mile = gas_price / gas_mpg

ev_cost_per_mile = annual_ev_energy_cost / annual_miles

cost_equivalent_mpg = gas_price / ev_cost_per_mile

Mini example

With 12,000 miles per year, $3.50 gas, 30 MPG, $0.16 per kWh home electricity, 30 kWh per 100 miles, no public charging, and no ownership add-ons, gas costs $1,400 per year. The EV uses 0.30 kWh per mile, so electricity costs $576 per year. Estimated yearly savings with the EV is $824, average monthly savings is about $68.67, and total savings over 5 years is $4,120.


Sources