EV vs Gas Cost per Mile

Excel Formulas › Automotive & Fleet

All versions

Compare the fuel cost per mile of an electric vehicle and a gas car. Gas is price ÷ MPG; EV is kWh-per-mile × electricity price. Side by side, the cheaper-to-drive option is obvious.


Quick formula: gas vs EV cost per mile:
=gas_price / MPG // gas =kwh_per_mile * elec_price // EV
Gas: price per gallon over MPG. EV: energy used per mile times the electricity price per kWh.

The example

$3.50/30 MPG vs 0.30 kWh × $0.15.

AB
1Vehicle$/mile
2Gas$0.117
3EV$0.045

The formula

The formula:

=gas_price / MPG vs =kwh_per_mile * elec_price // two fuel costs per mile

How it works

How it works:

  1. Gas cost per mile = gas_price / MPG.
  2. EV cost per mile = kWh_per_mile × electricity_price (efficient EVs use ~0.25–0.35 kWh/mi).
  3. Multiply each by annual miles for the yearly fuel cost.
  4. The gap funds the EV’s often-higher purchase price — feed it into the break-even recipe.

Electricity price swings the answer. Home charging at $0.15/kWh makes an EV far cheaper per mile; expensive public fast-charging can erase the advantage. Use the rate you’ll actually pay — and remember fuel is only part of TCO. The per-mile gap is the input to a full break-even against the price premium.

Try it: interactive demo

Live demo

Gas: price & MPG. EV: kWh/mi & $/kWh.

Gas · EV

Variations

Annual fuel cost

Either vehicle:

=cost_per_mile * annual_miles

Savings per mile

The gap:

=gas_price/MPG - kwh_per_mile*elec_price

MPGe equivalent

EV efficiency:

=33.7 / kwh_per_mile

Pitfalls & errors

Real electricity rate. Home vs public charging differ hugely — use your actual cost.

Fuel isn’t everything. Compare full TCO, not just cost per mile.

kWh/mi varies. Cold weather and speed raise an EV’s consumption.

Practice workbook

📊
Download the free EV vs Gas Cost per Mile practice workbook
An EV-vs-gas sheet with the annual-cost, savings, and MPGe variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I compare EV and gas cost per mile in Excel?
Gas = gas_price / MPG; EV = kwh_per_mile * elec_price. At $3.50/30 MPG vs 0.30 kWh × $0.15, that's $0.117 vs $0.045.
How do I get annual fuel savings?
Multiply the per-mile gap by annual miles: =(gas_price/MPG - kwh_per_mile*elec_price) * annual_miles.
What's MPGe?
Miles per gallon equivalent: =33.7 / kwh_per_mile, since a gallon of gas ≈ 33.7 kWh of energy.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Fuel cost for a trip · Break-even on efficiency upgrade · Cost per mile