Gas vs Electric Cost Calculator

Compare a gas car and an electric vehicle for the same trip and annual mileage. See energy cost, maintenance, five-year savings, and when a higher EV purchase price could break even.

Compare the same driving in two vehicles Start with the four main inputs. Open advanced options for a deeper ownership comparison.
1

Driving distance

Used for trip and long-term comparisons
The distance used for the one-trip comparison.
Used for monthly, annual, five-year, and break-even results.
Round trip Double only the trip distance. Annual driving stays unchanged.
2

Vehicle efficiency and energy price

Gas carGasoline or diesel
$
Electric vehicleBattery electric vehicle
$
3

Optional ownership costs

EV charging assumptions

The remaining share uses your home price.
$
Leave at 0% for battery-use cost only.

Maintenance and purchase price

$
$
$
$
$
Enter only an incentive you know applies to you.

Compare Gas and Electric Car Costs

This gas vs electric cost calculator compares the same distance in a gasoline vehicle and a battery electric vehicle. It starts with the costs that are easiest to verify: fuel or electricity, vehicle efficiency, annual driving, charging losses, and optional maintenance. Add purchase prices and an EV incentive only when you want a broader ownership and break-even estimate.

Trip comparison

See what one drive costs in each vehicle, how much fuel or electricity it uses, and the energy cost per mile or kilometer.

Annual comparison

Apply your annual mileage to compare monthly cost, annual operating cost, projected savings, and energy use.

Real charging mix

Combine a home electricity rate with a percentage of higher-priced public charging instead of assuming every kWh costs the same.

Purchase-price break-even

Compare the EV's net purchase price after an entered incentive with the gas vehicle and estimate how long operating savings take to recover the difference.

Gas vs Electric Cost Formulas

The calculator converts every efficiency format to a common energy-per-distance basis before comparing costs. It keeps full precision internally and rounds displayed money to two decimals.

Gas gallons used = miles ÷ MPG (US)
Gas energy cost = gallons used × fuel price per gallon
EV battery energy = miles ÷ miles per kWh
EV charger energy = battery energy × (1 + charging loss %)
Weighted electricity price = home price × home share + public price × public share
Annual operating savings = gas annual operating cost − EV annual operating cost
Break-even years = extra EV purchase cost ÷ annual operating savings

For metric vehicles, L/100 km is converted directly to liters used, while kWh/100 km is converted directly to electricity used. US and imperial gallons are treated as different units.

Why Home and Public Charging Should Be Separated

An EV driver may charge at home most of the time and use faster public charging on some trips. Enter the percentage of annual electricity bought publicly and its price. The calculator uses a weighted electricity rate, so 20% public charging does not incorrectly apply the public rate to the other 80% of your charging.

Charging loss is also optional. A 10% loss means the charger must supply approximately 1.10 kWh for each 1.00 kWh added to the battery. Leave the value at 0% when you want to compare battery energy only or do not have a reliable loss estimate.

Gas vs Electric Cost Example

Consider 12,000 miles of annual driving. The gas car returns 30 MPG and gasoline costs $3.50 per gallon. The EV returns 3.5 miles per kWh and electricity costs $0.17 per kWh.

MeasureGas carElectric vehicleDifference
Annual energy use400 gallons3,428.57 kWhDifferent energy units
Annual energy cost$1,400.00$582.86$817.14 EV savings
Energy cost per mile$0.1167$0.0486$0.0681 EV savings

This example excludes maintenance, purchase prices, incentives, public charging, and charging losses. Add those values when they are relevant to your decision.

What to Include in a Vehicle Cost Comparison

Use your real energy prices

Enter a local gasoline price and the electricity rate you actually pay. A single national average may not reflect your location or charging habits.

Use comparable efficiency

Use combined or real-world efficiency for both vehicles. Comparing highway MPG with city EV efficiency can distort the result.

Add maintenance carefully

Maintenance per mile is optional because costs vary by vehicle age, warranty, tires, service schedule, and local labor prices.

Do not invent an incentive

Tax credits and rebates can depend on the vehicle, buyer, location, purchase date, and other conditions. Enter only a value you have verified.

Frequently Asked Questions

Is an electric car always cheaper to drive than a gas car?

No. The result depends on gasoline price, electricity price, efficiency, charging losses, public charging use, maintenance, and annual mileage. Public fast charging can narrow or reverse the energy-cost advantage in some cases.

How do I compare gas cost with EV charging cost?

Convert each vehicle to cost per mile or kilometer. For gas, divide fuel price per gallon by MPG. For an EV, divide electricity price per kWh by miles per kWh, then account for charging loss and any public charging mix.

What is a good miles-per-kWh number?

A higher miles-per-kWh value means the EV travels farther on the same electricity. Use the vehicle's combined rating or a recent real-world average rather than assuming one value fits every EV.

Should I include public charging?

Yes, when it represents a meaningful part of your annual charging. Enter its share and price separately so the calculator can combine it with home charging.

How is EV break-even calculated?

The calculator subtracts the entered EV incentive from the EV purchase price, compares that net amount with the gas vehicle price, and divides any extra EV upfront cost by annual operating savings.

What happens if the EV costs more to operate?

The calculator reports that the gas vehicle costs less and does not show a positive EV break-even period. A higher EV purchase price cannot be recovered through operating savings when those savings are zero or negative.

Does this include depreciation and insurance?

No. Insurance, financing, depreciation, taxes, registration, unexpected repairs, resale value, and charger installation are excluded because they vary widely. The calculator states this clearly rather than hiding assumptions.

Can I compare diesel with an EV?

Yes. Enter the diesel vehicle's efficiency and diesel price in the gas-car column. The underlying fuel-cost formula is the same.

Can I use kilometers and L/100 km?

Yes. Switch to kilometers and enter the gas vehicle in L/100 km or km/L. The EV can use km/kWh or kWh/100 km.

Should I use EPA ratings or my real efficiency?

Official combined ratings provide a consistent starting point. Recent real-world efficiency from similar weather, speed, terrain, and driving conditions may provide a closer personal estimate.

Method: The calculator uses 1 mile = 1.609344 kilometers, 1 US gallon = 3.785411784 liters, and 1 imperial gallon = 4.54609 liters. Displayed values are rounded, while calculations retain greater precision. Last updated July 20, 2026.

Result copied