Skip to content
Calcapedia
Money

EV vs Gas Cost Calculator

See what an electric car and a gas car would each cost you to run every year, from your mileage, fuel economy, gas price and electricity rates.

Level: Grades 6–7

  • Common Core standard 6.RP.A.3.bSolve unit rate problems including those involving unit pricing and constant speed.
  • Common Core standard 7.RP.A.3Use proportional relationships to solve multistep ratio and percent problems. Examples: simple interest, tax, markups and markdowns, gratuities and commissions, fees, percent increase and decrease, percent error.
Printable worksheet

EV vs Gas Cost Calculator

Know the answer you need? Pick an input to work backward.

Inputs

Window stickers list kWh per 100 miles; some dashboards show miles per kWh.

Optional. Oil changes and other upkeep you expect.

Optional.

Optional. Its price minus the gas car's, after any incentives; used for the payback time.

Result

Yearly savings with the electric car

$567.20

At these prices the electric car costs $712.80 a year against $1,280.00 for gas, saving $567.20 a year.

Gas car cost per year
$1,280.00
Electric car cost per year
$712.80
Savings over 5 years
$2,836.00
Gas fuel cost per mile
$0.11
Charging cost per mile
$0.06
Gas price at which yearly costs are equal
$1.78Per gallon, with everything else as entered.

See the step-by-step solution ↓

Step-by-step solution

  1. Find the gallons of gas a year: divide your miles by the car's miles per gallon

    12,00030=400 gal
  2. Multiply those gallons by the price per gallon to get the yearly gas bill

    400×$3.20=$1,280.00
  3. Find the electricity used a year: the rating is per 100 miles, so multiply your miles by it and divide by 100

    12,000×30100=3,600 kWh
  4. Blend the home and public prices by how much charging happens at each, to get your average price per kWh

    90%×$0.17+10%×$0.45=0.198
  5. Multiply the kWh by that average price to get the yearly charging bill

    3,600×0.198=$712.80
  6. Subtract the electric car's yearly cost from the gas car's to see what you save (negative means the gas car costs less)

    $1,280.00−$712.80=$567.20
  7. Multiply by the number of years to get the savings over 5 years

    $567.20×5=$2,836.00

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

Please note: Results are estimates for planning and comparison. Lenders, banks, and tax authorities may round differently or include fees not modeled here, so confirm figures with your provider before deciding.

What this calculator does

Find out how much you'd save, or spend, each year by driving an electric car instead of a gas car. The calculator compares the cost of driving the same miles in each one. For the gas car, it works out the gallons you'd burn and what they cost. For the electric car, it works out the kilowatt-hours (kWh, the unit on your power bill) you'd use. It prices them at your mix of home and public charging. The difference is your yearly savings, or extra cost, from going electric.

Gas and electricity prices vary a lot from place to place and month to month. So every price here is something you enter. You can also add yearly maintenance for each car. And you can add how much more the electric model costs to buy. Then you'll see how many years of savings it takes to earn that back.

Where it's used

Why this math matters outside the classroom:

  • Car shopping. A commuter driving 12,000 miles finds 400 gallons at $3.20 costs $1,280, against $712.80 to charge an electric car.
  • Unit rates. Students compare 10.7 cents a mile for gas with 5.9 cents a mile for electricity as two unit rates.
  • Charging plans. An owner sees that moving from 10% to 50% public charging raises the yearly charging bill sharply.
  • Fleet decisions. A delivery business compares running costs per van before replacing gas vans with electric ones.
  • Payback estimates. A buyer divides a $4,000 price difference by $567.20 of yearly savings to get a payback of about 7.1 years.

Grade level and standards: Grades 6–7; Common Core State Standards for Mathematics 6.RP.A.3.b, 7.RP.A.3. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

How to use it

  1. Enter how many miles you drive a year, the gas car's mpg (miles per gallon) and the gas price.
  2. Enter the electric car's efficiency and your home electricity price. Then enter the share of charging done at public chargers and their price.
  3. If you like, add yearly maintenance for each car and the electric car's extra price.
  4. Read the yearly savings, the cost per mile of each car and the payback time.

What the inputs mean

Electric car efficiency
Lower kWh per 100 miles is better. Window-sticker figures are measured from the wall outlet. So they already include the energy lost while charging.
Home electricity price
Your total price per kWh, including delivery charges and taxes. To find it, divide your bill's total by the kWh used. Time-of-use plans may offer a lower overnight rate.
Charging done at public chargers
The share of your charging energy that comes from public chargers. Fast chargers usually cost several times more per kWh than charging at home.
Gas car maintenance
Optional. Oil changes and other upkeep you expect.
Electric car maintenance
Optional.
Extra price of the electric car
The electric car's price minus the gas car's, after any incentives you actually receive.

Formula and method

gallons = miles ÷ mpg;  gas cost = gallons × gas price
kWh = miles × kWh per 100 mi ÷ 100   (or miles ÷ miles per kWh)
price per kWh = (1 − public share) × home price + public share × public price
charging cost = kWh × price per kWh
yearly savings = (gas cost + gas maintenance) − (charging cost + EV maintenance)
payback = extra price ÷ yearly savings

In the formulas, mpg is the gas car's miles per gallon and kWh is kilowatt-hours of electricity. EV means the electric car. Public share is the fraction of charging done at public chargers, and payback is in years.

Both cars drive the same miles. Fuel economy turns miles into gallons, and efficiency turns miles into kilowatt-hours. Each is then multiplied by its price.

Mixing home and public charging gives a weighted average price. For example, if 10% of your energy comes from public chargers, 10% of each kWh is priced at the public rate.

The break-even gas price is the gas price that would make both cars cost exactly the same to run. Everything else stays as you entered it.

Worked example

You drive 12,000 miles a year. The gas car gets 30 mpg, with gas at $3.20. The electric car uses 30 kWh per 100 miles. Home power costs $0.17 per kWh, and 10% of charging is public at $0.45. Compare over 5 years.

  1. Gas: 12,000 ÷ 30 = 400 gallons × $3.20 = $1,280.00 a year.
  2. Electricity: 12,000 × 30 ÷ 100 = 3,600 kWh.
  3. Average price: 90% × $0.17 + 10% × $0.45 = $0.198 per kWh.
  4. Charging: 3,600 × $0.198 = $712.80 a year.
  5. Savings: $1,280.00 − $712.80 = $567.20 a year, or $2,836.00 over 5 years.

Result: At these prices, the electric car saves $567.20 a year in energy. That's about 5.9 cents a mile, against 10.7 cents for gas. Gas would have to fall to about $1.78 a gallon for the two to cost the same.

Understanding the result

A positive result means the electric car is cheaper to run; a negative one means the gas car is. The cost per mile makes it easy to compare against other cars.

Where and how you charge matters as much as the car. Charging mostly at home on a low rate gives the biggest savings. Relying on fast chargers can wipe them out.

Payback only covers running costs. Insurance, registration, resale value and financing can differ between the two cars. They're worth checking separately.

Assumptions and limitations

  • Both cars drive the same miles each year, and prices stay the same over the years compared.
  • Efficiency figures already include charging losses, as wall-to-wheels ratings do.
  • Maintenance is whatever yearly amounts you enter; none is assumed.
  • Cold weather, highway speeds and heavy loads can raise both cars' energy use above their ratings.
  • Purchase incentives, tax credits and charger installation costs aren't included, unless you fold them into the extra price.
  • No one knows future gas and electricity prices. Try several to see how much the savings change.

Frequently asked questions

Where do I find my car's kWh per 100 miles?

It's printed on the window sticker and listed in official fuel-economy ratings. If your car shows miles per kWh instead, switch the unit. 3.3 miles per kWh is about the same as 30 kWh per 100 miles.

Why does public charging matter so much?

Public fast charging often costs two to three times typical home rates, or more. At $0.45 per kWh instead of $0.17, the electric car in the example would cost $1,620 a year to charge. That's more than the gas car.

Should I include maintenance?

If you have estimates, yes. Electric cars need no oil changes and wear their brakes less, but tires and other parts still need attention. Enter your own figures for each car rather than relying on averages.

How is the payback time worked out?

It divides the electric car's extra purchase price by the yearly savings. With a $4,000 difference and $567.20 saved a year, it would take just over 7 years. Payback ignores price changes and the time value of money (the idea that a dollar today is worth more than a dollar later).

How this calculator is checked

Method: Unit-rate energy cost comparison: miles ÷ mpg × gas price against miles × kWh per mile × blended electricity price, plus optional maintenance. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this EV vs Gas Cost Calculator on your own website or blog for free. Paste this code where you want it to appear: