Compare gasoline and EV energy costs over the same driving distance. See annual energy savings, cost per mile or kilometer, and optional simple energy-only payback. This is not a total ownership-cost comparison.
Gas vs Electric Car Cost Formula
The calculator compares the running cost of a gasoline car and an electric car over the same distance. The annual fuel cost of the gas car is the fuel it burns times the price of gas:
C_gas = (D / FE) * P_gas
For battery-side EV efficiency, divide battery energy by the grid-to-battery charging-efficiency fraction before multiplying by electricity price. For wall/grid-side efficiency, use the entered energy directly (n = 1). EPA electricity-consumption ratings include wall-to-vehicle charging losses, so do not add those losses again. See the EPA Automotive Trends report.
C_ev = (D * e / n) * P_elec
The annual savings from driving the EV is the difference between the two, and the payback period converts an upfront price premium into years:
S = C_gas - C_ev Y = dP / S
Variables:
- C_gas is the annual gasoline cost and C_ev is the annual electricity cost
- D is annual distance in miles after conversion; monthly and weekly entries are multiplied by 12 and 52 respectively
- FE is the gas car fuel economy in miles per gallon; L/100km and km/L inputs are converted to MPG (US)
- P_gas is the gas price per gallon and P_elec is the electricity price per kWh
- e is the EV energy use in kWh per mile, derived from the efficiency you enter
- n is the entered charging-efficiency fraction for battery-side data, or 1 for wall-side data that already includes charging losses
- S is the annual savings, dP is the EV price premium, and Y is the payback period in years
EV energy per mile e comes from the selected efficiency: mi/kWh is inverted, kWh/100 mi is divided by 100, and Wh/mi by 1000. Metric units use 1 mile = 1.609344 km. Select the matching wall or battery energy basis; a dashboard figure and an EPA label figure may use different boundaries.
Annual Fuel Cost: Gas vs Electric
This illustrative table uses a 28 US MPG gas car and a 3.5 mi/kWh battery-side EV efficiency over 12,000 miles per year, with an assumed 90% grid-to-battery charging efficiency (about 3,810 grid kWh and 429 US gallons). These are example inputs, not defaults or vehicle-specific claims.
| Gas price | Electricity price | Gas car / year | Electric car / year | Annual savings |
|---|---|---|---|---|
| $3.00/gal | $0.13/kWh | $1,286 | $495 | $790 |
| $3.50/gal | $0.17/kWh | $1,500 | $648 | $852 |
| $4.00/gal | $0.20/kWh | $1,714 | $762 | $952 |
| $4.50/gal | $0.25/kWh | $1,929 | $952 | $976 |
| $5.00/gal | $0.30/kWh | $2,143 | $1,143 | $1,000 |
Energy-cost differences depend on the entered prices, efficiencies and charging basis. Use your own applicable gasoline and electricity rates; neither vehicle is guaranteed to be cheaper.
Example Problems
Example 1: Annual savings.
You drive 12,000 miles a year. Your gas car gets 28 US MPG and gas is $3.50 per US gallon. Your EV’s battery-side efficiency is 3.5 mi/kWh, electricity is $0.17 per kWh, and the assumed charging efficiency is 90%.
Gas cost = (12,000 / 28) * $3.50 = 428.6 gallons * $3.50 = $1,500 per year. EV cost = (12,000 * (1/3.5) / 0.90) * $0.17 = 3,810 kWh * $0.17 = $648 per year. Savings = $1,500 – $648 = $852 per year, so the EV is about 57% cheaper to run, at $0.125 per mile for gas versus $0.054 per mile for electric.
Example 2: Payback period.
You drive 15,000 miles a year. The gas car gets 25 US MPG at $3.80 per US gallon; the EV’s battery-side efficiency is 3.0 mi/kWh at $0.15 per kWh with an assumed 90% charging efficiency. The EV costs $7,000 more to buy.
Gas cost = (15,000 / 25) * $3.80 = $2,280. EV cost = (15,000 * (1/3.0) / 0.90) * $0.15 = 5,556 kWh * $0.15 = $833. Savings = $2,280 – $833 = $1,447 per year. Payback = $7,000 / $1,447 = about 4.8 years to recover the EV price premium from fuel savings alone.
Frequently Asked Questions
Is it cheaper to charge an EV or buy gas?
Charging can cost less or more than gasoline for the same trip. Compare applicable electricity and gasoline prices and vehicle efficiency, accounting for the efficiency data’s energy boundary. Public charging may also include session, time or other fees that this energy-only calculator excludes.
How do I calculate cost per mile for each car?
For a gas car at $3.50 per US gallon and 28 US MPG, fuel cost is $3.50 / 28 = $0.125 per mile. For a battery-side EV efficiency of 3.5 mi/kWh at $0.17 per kWh and assumed 90% charging efficiency, cost is (1/3.5) × $0.17 / 0.90 ≈ $0.054 per mile. With wall-side efficiency, omit the charging-efficiency division.
What electricity price should I use?
Use the marginal rate you actually pay per kWh at home, including delivery and taxes, since that is what each charge costs you. Many EV owners charge overnight on a lower off-peak or time-of-use rate, which can be well below the average residential price, so check your utility bill or plan. If you rely on public fast charging, use that network’s per-kWh price instead, as it is usually higher than home electricity.
