Compare gas and electric cost per mile or kilometer
This calculator compares what a year of driving costs in energy: gasoline for a gas car against electricity for an EV. You enter your own distance, your own gas price and consumption, your own electricity prices and how much of your charging happens at home. Nothing is looked up for you, because prices differ by region, tariff, time of day and charger. The result is the energy cost per year, per month and per mile or kilometer, plus the electricity price at which the two vehicles cost the same to run.
- Gas energy = distance ÷ MPG (US units) or distance × L per 100 km ÷ 100 (metric). Gas cost = gas energy × price per gallon or liter.
- EV energy = distance × kWh per 100 ÷ 100, divided by the charging efficiency if your figure is battery use.
- Blended electricity price = home share × home price + (1 − home share) × public price.
- EV cost = EV energy × blended price. Difference = gas cost − EV cost; a negative difference means the EV costs more to run.
- Break-even price = gas cost per distance ÷ EV energy per distance.
Unit systems are kept separate on purpose. US mode uses miles, MPG for the US gallon of 3.785411784 liters and kWh per 100 miles; metric mode uses kilometers, liters per 100 km and kWh per 100 km, with 1 mile = 1.609344 km. Switching units resets the fields to an example rather than reinterpreting your numbers. An imperial (UK) gallon is larger than a US gallon, so convert MPG figures quoted per UK gallon before entering them.
EV charging cost calculator
To price a single charge, use the “One charge” tab. Enter the usable battery capacity, the starting and ending charge and the charging efficiency. The energy stored in the battery is capacity × (end − start). The energy you are billed for is that amount divided by the efficiency, because some energy is lost as heat in the charger and cable. Cost = wall energy × price per kWh. Charging a 60 kWh battery from 20% to 80% stores 36 kWh; at 90% efficiency that draws 40 kWh from the wall and, at 0.22 per kWh, costs 8.80. At a perfect 100% efficiency the same charge would draw 36 kWh. A charge that starts and ends at the same level costs nothing because no energy is added. .
Home versus public charging
Many drivers pay a low rate for most energy at home and a much higher rate on the road. The calculator blends them using the share of the energy delivered at home, not the share of visits: one fast-charging stop can deliver far more kWh than several top-ups. The “Home versus public charging” table in the results recomputes the EV cost for home-only, your mix and public-only charging, so you can see how sensitive the comparison is. In the example, charging only at home costs 600 a year and charging only in public costs 2,000, against 1,400 for gas: the answer flips from a saving of 800 to a loss of 600. Use the charging prices you actually pay, including idle or session fees if your network adds them to the price per kWh.
Charging losses: battery use versus wall energy
Not all electricity drawn from the wall reaches the battery. How you enter an EV’s consumption therefore matters, and the calculator asks which basis your figure uses. The US Environmental Protection Agency states that the MPGe values it provides include charging losses, measured from the wall outlet for level 2 AC charging (EPA, Fuel Economy and EV Range Testing). If your consumption figure comes from the EPA label, choose “From the wall” and no extra loss is added. If it comes from the car’s dashboard or trip computer, it usually measures energy used by the battery, so choose “Battery use” and set the charging efficiency. Entering a wall-basis figure and adding a loss on top would count the loss twice and overstate your cost.
Worked example: 12,000 miles per year
A gas car does 30 MPG and gas costs 3.50 per gallon. An EV uses 30 kWh per 100 miles on a battery basis, charges at 90% efficiency, and 80% of the energy is charged at home at 0.15 per kWh with 20% at public chargers at 0.50 per kWh. Over 12,000 miles the gas car burns 400 gallons and costs 1,400. The EV uses 12,000 × 30 ÷ 100 = 3,600 kWh at the battery, which is 3,600 ÷ 0.90 = 4,000 kWh from the wall. The blended price is 0.8 × 0.15 + 0.2 × 0.50 = 0.22, so the EV costs 4,000 × 0.22 = 880. The energy difference is 520 a year, and the break-even electricity price is 0.35 per kWh. If the same 30 kWh per 100 miles were already a wall figure, the EV would use 3,600 kWh and cost 792, not 880.
What energy savings leave out
Energy is only part of what a car costs. This comparison leaves out the purchase price or lease payment, depreciation, financing, insurance, maintenance and repairs, tires, registration and taxes, incentives, charger installation and battery wear. A lower energy bill can be outweighed by a higher vehicle price, and the reverse can also be true. To weigh those costs, see the car affordability calculator for what a vehicle payment fits in your budget, and the lease vs buy calculator to compare two ways of paying for the vehicle itself. If you already have a loan, the auto loan payoff calculator shows how extra payments change the time and interest remaining. The result here is an estimate under your inputs, not financial advice; see the disclaimer.
Frequently asked questions
How much does it cost to charge an EV?
Energy stored in the battery, divided by the charging efficiency, times your price per kWh. The “One charge” tab does this for any battery size and charge window.
Is charging an EV cheaper than buying gasoline?
It depends on your prices, your car’s consumption and how much you charge at home or in public. The results can favor either; compare with your own figures.
Does the EPA efficiency figure already include charging losses?
Yes. EPA states that its MPGe values include charging losses, so enter a figure taken from the label using the “From the wall” basis.
How does public charging change the savings?
Higher public prices raise the blended price and shrink the difference. Check the all-public row of the sensitivity table against your own mix.
How do I calculate charging cost per mile?
Divide the modeled yearly charging energy cost by the distance driven. The cost-per-distance table does this and shows n/a when the distance is zero.
Is this total cost of ownership?
No. It covers energy only. Vehicle price, depreciation, financing, insurance, maintenance and charger installation are not included.