Driving & Travel

EV vs Gas Cost Calculator: What Each Car Costs Per Mile

Put gasoline and electricity on the same footing: two cost-per-mile formulas, a worked annual comparison, and the charging and weather factors that move the answer.

By the Life Calculator team Updated Free, no sign-up Nothing you type leaves your device

Your numbers

Result

Result
--

Runs entirely in your browser. Nothing you type is sent anywhere, stored or shared.

In short

  • Gasoline cost per mile is pump price divided by MPG; electricity cost per mile is kWh per 100 miles divided by 100, times your rate.
  • kWh per 100 miles is more useful than MPGe because it multiplies straight into dollars, while MPGe deliberately ignores price.
  • Charging losses mean the meter typically records about 10 to 15 percent more energy than the battery actually receives.
  • Home charging versus public fast charging is the largest single swing in the comparison and can reverse the result.
  • The model covers running costs only: purchase price, financing, insurance, depreciation and incentives are all excluded.
On this page
  1. The formula
  2. A worked example, done by hand
  3. Where each input comes from
  4. kWh per 100 miles versus MPGe
  5. Charging losses: wall energy versus battery energy
  6. Home charging versus public fast charging
  7. Cold weather, degradation and other drift
  8. How to read the result
  9. What this model leaves out
  10. Common mistakes

Switching from a gasoline car to an electric one changes a recurring cost that most drivers never measure directly: the price of moving one mile. Gasoline is sold by the gallon and burned at an efficiency you rarely think about. Electricity is sold by the kilowatt-hour and consumed at a rate that varies with speed, temperature and driving style. This calculator puts both on the same footing, converts them into an annual number, and shows the difference.

The comparison it makes is deliberately narrow. It compares the running cost of two cars you might drive over the same year: the energy each one uses, plus a maintenance difference you supply. It does not compare purchase prices, loans, insurance or depreciation. Those are large, they vary enormously by vehicle and buyer, and mixing them into an energy calculation hides the part you can actually measure.

Read the result as a running-cost gap, not as a verdict on whether to buy. The gap is usually the most stable and predictable piece of the decision, which is exactly why it is worth isolating.

The formula

The whole model rests on two cost-per-mile figures and one adjustment.

Formula: Gasoline cost per year = (annual miles / MPG) x price per gallon. Electricity cost per year = (annual miles x kWh per 100 miles / 100) x price per kWh. Annual difference = gasoline cost - electricity cost + extra gas maintenance.

Every symbol:

  • Annual miles is total distance driven in a year, the same figure for both cars.
  • MPG is the gas car's real-world fuel economy in miles per gallon.
  • Price per gallon is what you actually pay at the pump, taxes included.
  • kWh per 100 miles is the EV's energy consumption measured at the wall or at the plug, not the battery.
  • Price per kWh is your marginal electricity rate, entered in cents and divided by 100 to get dollars.
  • Extra gas maintenance is the annual servicing cost you expect on the gas car and not on the EV: oil changes, filters, spark plugs, exhaust work.

Cost per mile follows directly. For gasoline it is price per gallon / MPG. For electricity it is (kWh per 100 miles / 100) x price per kWh. The five- and ten-year figures are simply the annual difference multiplied out, with no inflation and no discounting applied.

A worked example, done by hand

Take a driver covering 12,000 miles a year. Assume the gas car averages 28 MPG, gasoline costs $3.40 a gallon, the EV uses 30 kWh per 100 miles, home electricity costs 17 cents per kWh, and the gas car needs $300 a year of servicing the EV does not.

  1. Gallons burned: 12,000 / 28 = 428.57 gallons.
  2. Gasoline cost: 428.57 x $3.40 = $1,457.14 a year.
  3. Energy used by the EV: 12,000 x 30 / 100 = 3,600 kWh.
  4. Electricity cost: 3,600 x $0.17 = $612.00 a year.
  5. Gasoline cost per mile: $1,457.14 / 12,000 = $0.1214, or 12.14 cents.
  6. Electricity cost per mile: $612.00 / 12,000 = $0.0510, or 5.10 cents.
  7. Energy difference: $1,457.14 - $612.00 = $845.14.
  8. Add the maintenance difference: $845.14 + $300 = $1,145.14 a year.

Over five years that is $5,725.70 and over ten years $11,451.40, holding every assumption fixed. Those multiples are the least trustworthy numbers on the page, because no fuel price or electricity rate stays still for a decade.

Where each input comes from

Annual miles. Take two odometer readings a year apart, or read the mileage off consecutive service invoices. Guessing from a daily commute usually undercounts, because errands and trips add up. If your driving is mostly a fixed journey, the commute cost calculator builds the annual figure from days per week instead.

MPG. Use your own measured economy, not the window sticker. Fill the tank, reset the trip meter, drive normally, refill, and divide miles by gallons added. Repeat over three tanks and average. The fuel economy calculator does that arithmetic and converts between MPG and L/100km using L/100km = 235.215 / MPG.

Gasoline price. Use the price you actually pay, averaged over recent fills, not a headline national figure.

kWh per 100 miles. The car's trip computer usually reports this, or its inverse in miles per kWh. If you have a metered home charger, divide the kWh it delivered by the miles driven in that period and multiply by 100; that version already includes charging losses.

Electricity price. Divide the total dollars on a recent bill by the total kWh billed, including fixed charges spread across usage, rather than reading the headline energy rate. If you are on a time-of-use plan and charge overnight, use the off-peak rate. The electricity cost calculator walks through pulling a real rate off a bill.

Maintenance difference. Add up a year of oil changes, filters, plugs and exhaust or emissions work on the gas car. Tires, brakes, suspension, wipers and insurance apply to both cars, so leave them out. EVs are heavier and can wear tires faster, which is a reason to keep this number conservative.

The answer is most sensitive to electricity price and to MPG. A cheap-to-run gas car meeting expensive public charging can erase the gap entirely.

kWh per 100 miles versus MPGe

MPGe converts an EV's electricity use into a gasoline equivalent using a fixed conversion of 33.7 kWh to one gallon of gasoline, the gasoline-equivalent figure used for US federal fuel-economy labelling and therefore for the number printed on a window sticker. It exists so that window stickers can show one comparable number, and it is useful for that.

It is close to useless for cost, because it deliberately discards price. A gallon of gasoline and 33.7 kWh of electricity cost wildly different amounts, and the ratio between them changes by region, by season and by whether you charge at home or in a parking garage. MPGe answers "how much energy," while your bill asks "how much money."

kWh per 100 miles is the number that multiplies directly by a price to give dollars. It is also easier to reason about: 30 kWh per 100 miles means every 100 miles adds 30 kWh to the meter.

kWh per 100 miles Approximate MPGe Cost per mile at 12c/kWh at 17c at 25c at 40c
24 about 140 2.88c 4.08c 6.00c 9.60c
28 about 120 3.36c 4.76c 7.00c 11.20c
32 about 105 3.84c 5.44c 8.00c 12.80c
38 about 89 4.56c 6.46c 9.50c 15.20c

The gasoline side moves the same way, driven by pump price and MPG:

Gas price 20 MPG 25 MPG 30 MPG 40 MPG 50 MPG
$2.80 14.00c 11.20c 9.33c 7.00c 5.60c
$3.40 17.00c 13.60c 11.33c 8.50c 6.80c
$4.00 20.00c 16.00c 13.33c 10.00c 8.00c
$4.60 23.00c 18.40c 15.33c 11.50c 9.20c

Read the two tables together. A 50 MPG hybrid at $2.80 costs 5.60 cents a mile, which an EV only beats on cheap home electricity.

Charging losses: wall energy versus battery energy

Not all the electricity that leaves the wall reaches the battery. Some is lost in the charger, in the on-board converter, in heating or cooling the pack during charging, and in the car's own standby draw between sessions. Typical round-trip losses on home AC charging run about 10 to 15 percent.

That matters because the number on the car's dashboard is often battery energy, while the number on your bill is wall energy.

Worked example: if the car reports 27 kWh consumed over 100 miles and charging is 88 percent efficient, the meter sees 27 / 0.88 = 30.7 kWh per 100 miles. At 17 cents that is 5.22 cents a mile instead of 4.59 cents, a difference of about 14 percent on the whole year.

If your consumption figure came from a metered charger or from comparing utility bills, the losses are already inside it and adding them again would double-count.

Home charging versus public fast charging

This is the single largest swing in the model, and it is the reason two people with identical cars can reach opposite conclusions.

Home charging is billed at your residential rate. Public DC fast charging is a separate retail product with its own pricing, and it commonly costs substantially more per kWh than charging at home, sometimes with session fees or idle fees on top. How much more depends on the network, the location and the time of day, so look up what the chargers you would actually use are charging rather than assuming a multiple of your home rate. Someone without a driveway or a dedicated parking space may do most of their charging that way.

Charging mix (assumed rates) Effective rate Annual energy cost, 3,600 kWh Difference vs the gas car
All home, 17c/kWh 17c $612 $845 cheaper
All home, cheap overnight 10c 10c $360 $1,097 cheaper
Home 22c, no off-peak plan 22c $792 $665 cheaper
Mixed home and fast charging, 30c 30c $1,080 $377 cheaper
Mostly fast charging, 45c 45c $1,620 $163 cheaper

Those rates are illustrative, not quoted prices. Substitute what you are actually charged. The pattern is what matters: the advantage narrows steadily as the effective rate rises, and at a high enough rate against an efficient gas car it disappears.

Cold weather, degradation and other drift

Cold weather raises consumption in two ways. Battery chemistry is less efficient below freezing, and cabin heating draws directly from the pack because there is no waste engine heat to reuse. A car averaging 30 kWh per 100 miles in mild conditions can reach 40 or more in a hard winter month. At 17 cents across a whole year at that rate, the same 12,000 miles would cost $816 instead of $612.

Gasoline cars also lose economy in the cold, from longer warm-up and denser air, but usually by a smaller proportion.

Battery degradation reduces usable range over time. It affects how often you charge and how much buffer you keep, more than it changes energy per mile. The running cost per mile is fairly stable as a pack ages; convenience is what changes.

Speed matters more than most drivers expect. Aerodynamic drag rises with the square of speed, so sustained highway driving pushes consumption up for both cars, though EVs feel it more sharply because they are so efficient at low speeds.

How to read the result

The annual figure is a running-cost difference under your assumptions, not a prediction. Treat it as the size of the gap you would need to justify any price premium, not as money already in hand.

A useful move is to divide a purchase price difference by the annual saving. If one car costs $6,000 more and the modeled saving is $1,145 a year, that is roughly 5.2 years of driving before the energy and maintenance gap covers the difference, ignoring financing and resale entirely. The cost per use calculator applies the same reasoning to any durable purchase.

Run the calculation twice, once with pessimistic inputs and once with optimistic ones. If the sign of the answer flips between them, the honest conclusion is that running cost does not decide this for you.

What this model leaves out

  • Purchase price and financing. No vehicle price, down payment, loan term or interest. Compare monthly payments with the loan calculator.
  • Depreciation. Usually the largest single cost of owning any car, and entirely absent here.
  • Insurance. Premiums often differ between an EV and a comparable gas car.
  • Tax credits, rebates and fees. Federal, state and utility incentives change, and several states charge EV registration surcharges to replace fuel tax.
  • Home charger installation. A dedicated circuit is a one-time cost that varies with panel capacity and wiring distance.
  • Time and inconvenience. Waiting at a charger on a long trip has a value that no per-mile figure captures.
  • Solar self-supply. Charging from panels you already own changes the marginal cost of electricity; the solar payback calculator handles that separately.
  • Price movement. Both fuel and electricity prices are held flat across the five- and ten-year projections.

Common mistakes

Using sticker MPG instead of measured MPG. Real-world economy is usually below the rating, which understates the gas car's cost and, in this comparison, understates the EV's advantage.

Using the dashboard consumption figure as if it were wall energy. That skips charging losses of roughly 10 to 15 percent.

Using a headline electricity rate. Delivery charges, fixed fees and tiered pricing mean the effective rate is often well above the advertised energy rate.

Assuming home charging when you cannot charge at home. This is the error that changes the answer most.

Double-counting maintenance. Tires, brakes, wipers and insurance apply to both cars. Only the genuinely gas-only items belong in that field.

Reading the ten-year number literally. It is the annual figure times ten with no price movement and no ownership change. Treat it as a scale, not a forecast.

Comparing a small EV to a large truck. Hold vehicle class constant, or you are measuring the size difference and calling it a drivetrain difference.

Frequently asked questions

How do I work out the cost per mile of an electric car?
Divide the car's consumption in kWh per 100 miles by 100 to get kWh per mile, then multiply by your electricity price in dollars. A car using 30 kWh per 100 miles uses 0.30 kWh per mile; at an assumed 17 cents per kWh that is 5.1 cents a mile. Use an effective rate taken from a full bill, including delivery and fixed charges spread across your usage, rather than the headline energy rate.
Why does the calculator ask for kWh per 100 miles instead of MPGe?
MPGe converts electricity into a gasoline equivalent using the 33.7 kWh per gallon figure adopted for US federal fuel-economy labelling, so it describes energy use rather than cost. Since a gallon of gasoline and 33.7 kWh of electricity rarely cost the same, MPGe cannot be multiplied by a price to get dollars. kWh per 100 miles can. It is also easier to check against your own charging records or a metered home charger.
Do charging losses really matter?
They matter enough to change the result by a noticeable margin. Energy is lost in the charger, the on-board converter, battery thermal management and standby draw, commonly around 10 to 15 percent on home AC charging. If your consumption figure comes from the car's dashboard it usually reflects battery energy, so the meter sees more. If it comes from a metered charger or a utility bill comparison, the losses are already included and should not be added twice.
What happens to the comparison if I cannot charge at home?
It narrows sharply and can reverse. Public DC fast charging is priced as a retail service and generally costs considerably more per kWh than home charging, sometimes with session or idle fees on top. The size of the gap varies by network and location, so price the chargers you would actually use. Against an efficient gasoline car, a high effective charging rate can wipe out the energy advantage entirely. If you expect a mix, work out a weighted average rate across home and public sessions and enter that instead of the home rate.
How much does cold weather change electricity costs?
Consumption rises in cold conditions because battery chemistry is less efficient and cabin heat is drawn from the pack rather than from engine waste heat. A car averaging 30 kWh per 100 miles in mild weather can reach 40 or more during a hard winter month. Gasoline cars also lose economy in the cold, but usually by a smaller proportion. For an annual figure, use a consumption number averaged across the seasons you actually drive.
Does battery degradation raise the cost per mile?
Not much directly. Degradation reduces usable capacity, which affects how far you can go between charges and how much buffer you keep, more than it affects energy consumed per mile. Cost per mile therefore stays fairly stable as a pack ages, while convenience and long-trip planning change more. Any allowance for replacement or repair belongs in a total ownership cost estimate, not in a running-cost comparison.
Why does the calculator ignore the purchase price?
Purchase price, financing, insurance and depreciation vary enormously between specific vehicles and buyers, and folding them in would bury the one part of the comparison you can measure precisely. Keeping the model to energy and a maintenance difference produces a clean annual gap. You can then divide any price difference by that annual gap yourself to see how many years of driving it would take to close.
Is the ten-year figure a forecast?
No. It is the annual difference multiplied by ten, with fuel prices, electricity rates, mileage and vehicle condition all held constant. No price stays fixed for a decade, and few people keep the same car and the same driving pattern that long. Treat the multi-year numbers as a sense of scale, and rerun the calculation with pessimistic and optimistic inputs to see how wide the plausible range really is.

Sources and further reading

Where this page relies on a published formula, an official figure or a legal rule, the primary source is listed here. External links open in a new tab and we earn nothing from them.

  1. U.S. Energy Information Administration -- energy price and consumption data
  2. FuelEconomy.gov -- vehicle fuel economy and MPGe ratings
  3. Alternative Fuels Data Center -- electric vehicle charging information
  4. U.S. Department of Energy -- vehicle and charging efficiency resources
  5. U.S. Environmental Protection Agency -- vehicle emissions and fuel economy testing