EV vs Gas Calculator Formula

Understand the math behind the ev vs gas calculator. Each variable explained with a worked example.

Formulas Used

Annual Fuel Savings (EV)

annual_savings = gas_fuel_cost - ev_fuel_cost

EV Annual Fuel Cost

ev_cost = ev_fuel_cost

Gas Annual Fuel Cost

gas_cost = gas_fuel_cost

Annual CO2 Savings

co2_savings = gas_co2 - ev_co2

Variables

VariableDescriptionDefault
annual_milesAnnual Miles Driven(miles)12000
ev_efficiencyEV Efficiency(kWh/100mi)30
gas_mpgGas Car MPG(mpg)28
elec_rateElectricity Rate(USD/kWh)0.15
gas_priceGas Price(USD/gal)3.5
ev_fuel_costDerived value= annual_miles * ev_efficiency / 100 * elec_ratecalculated
gas_fuel_costDerived value= annual_miles / gas_mpg * gas_pricecalculated
ev_co2Derived value= annual_miles * ev_efficiency / 100 * 0.92 / 2204.6calculated
gas_co2Derived value= annual_miles / gas_mpg * 19.6 / 2204.6calculated

How It Works

How to Compare EV vs Gas Costs

EVs are typically cheaper to fuel and produce less CO2 even accounting for electricity generation.

Formulas

EV Fuel Cost = Miles * (kWh/100mi) / 100 * Electricity Rate

Gas Fuel Cost = Miles / MPG * Gas Price

EV CO2 = Miles * kWh/100mi / 100 * Grid Factor / 2,204.6

Gas CO2 = Miles / MPG * 19.6 / 2,204.6

Worked Example

Driving 12,000 miles/year comparing an EV (30 kWh/100mi) at $0.15/kWh to a gas car (28 mpg) at $3.50/gal.

annual_miles = 12000ev_efficiency = 30gas_mpg = 28elec_rate = 0.15gas_price = 3.5
  1. 01EV fuel cost: 12,000 * 30/100 * $0.15 = $540
  2. 02Gas fuel cost: 12,000 / 28 * $3.50 = $1,500
  3. 03Annual savings: $1,500 - $540 = $960
  4. 04EV CO2: 12,000 * 0.30 * 0.92 / 2,204.6 = 1.50 metric tons
  5. 05Gas CO2: 12,000 / 28 * 19.6 / 2,204.6 = 3.81 metric tons

Ready to run the numbers?

Open EV vs Gas Calculator