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_costEV Annual Fuel Cost
ev_cost = ev_fuel_costGas Annual Fuel Cost
gas_cost = gas_fuel_costAnnual CO2 Savings
co2_savings = gas_co2 - ev_co2Variables
| Variable | Description | Default |
|---|---|---|
annual_miles | Annual Miles Driven(miles) | 12000 |
ev_efficiency | EV Efficiency(kWh/100mi) | 30 |
gas_mpg | Gas Car MPG(mpg) | 28 |
elec_rate | Electricity Rate(USD/kWh) | 0.15 |
gas_price | Gas Price(USD/gal) | 3.5 |
ev_fuel_cost | Derived value= annual_miles * ev_efficiency / 100 * elec_rate | calculated |
gas_fuel_cost | Derived value= annual_miles / gas_mpg * gas_price | calculated |
ev_co2 | Derived value= annual_miles * ev_efficiency / 100 * 0.92 / 2204.6 | calculated |
gas_co2 | Derived value= annual_miles / gas_mpg * 19.6 / 2204.6 | calculated |
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
- 01EV fuel cost: 12,000 * 30/100 * $0.15 = $540
- 02Gas fuel cost: 12,000 / 28 * $3.50 = $1,500
- 03Annual savings: $1,500 - $540 = $960
- 04EV CO2: 12,000 * 0.30 * 0.92 / 2,204.6 = 1.50 metric tons
- 05Gas CO2: 12,000 / 28 * 19.6 / 2,204.6 = 3.81 metric tons
Ready to run the numbers?
Open EV vs Gas Calculator