Everyday

EV vs. gas cost calculator

Compare gasoline and electricity for the same annual miles. This is an energy-cost difference, not the cost of owning either vehicle.

Free to useNo sign-upCalculated in your browser

Miles and energy

miles

0–100,000 whole miles. The same miles are used for both vehicles.

MPG

0.01–150.00 miles per U.S. gallon. Zero is rejected.

US dollars

0–20.0000 dollars per U.S. gallon. Not a live price.

kWh

0.01–150.00 kilowatt-hours per 100 miles. Zero is rejected.

US dollars

0–10.000000 dollars per kilowatt-hour. Up to 6 decimal places.

Percent

0–99.99%. Use 0 when the kWh figure already includes charging losses.

years

1–15 whole years.

Miles and energy prices stay in this browser.

The example is 12,000 miles, 30 MPG at $4.00 a gallon, and 30 kilowatt-hours per 100 miles at $0.20, with no extra charging loss, for 5 years.

Gallons and kilowatt-hours, then the prices you type

Gasoline use is annual miles divided by miles per U.S. gallon. Electricity use starts as annual miles times kilowatt-hours per 100 miles, divided by 100. That figure is energy at the vehicle. If you enter a charging loss of L percent, grid energy is the vehicle energy divided by 1 − L/100. A 10 percent loss means the grid supplies about 1.111 times the energy that reaches the vehicle. The cost is that grid energy times the price per kilowatt-hour. Savings are the gasoline cost minus the electricity cost. A negative result means gasoline is cheaper under the numbers you entered.

FuelEconomy.gov explains the label’s kilowatt-hours per 100 miles as a consumption rate, not a promise that the car can travel 100 miles on one charge. The U.S. Environmental Protection Agency says official MPGe values include Level 2 charging losses, because the measurement is taken at the wall outlet. If you type a window-sticker kilowatt-hour figure, leave charging loss at 0. Adding another loss would count the same waste twice. Use the loss field only when the kilowatt-hour figure is energy stored or used by the vehicle and does not already include the charger.

Prices are not looked up. Weather, speed, hills, cabin heat, and a time-of-use rate can all move the result. The Department of Energy vehicle cost calculator is a separate tool with its own assumptions.

A five-year example

12,000 miles a year, 30 miles per gallon, gasoline at $4.00 a gallon, an EV at 30 kilowatt-hours per 100 miles, electricity at $0.20 per kilowatt-hour, 0 percent charging loss, and 5 years.

Gasoline is 12,000 / 30 = 400 gallons, or $1,600 a year. Vehicle and grid electricity are both 12,000 × 30 / 100 = 3,600 kilowatt-hours, or $720 a year. EV electricity costs $880 less each year and $4,400 less over five years.

The same miles with a 10 percent charging loss need 3,600 / 0.9 = 4,000 kilowatt-hours from the grid. The electricity bill rises. The gasoline side does not change.

This is not a car ownership cost. It leaves out the purchase price, depreciation, insurance, maintenance, registration, financing, a home charger, and tax credits. Trip fuel prices one route. The electricity cost calculator prices an appliance, not a car. Car depreciation repeats a percent decline and does not price energy.

Frequently asked questions

Should I add charging loss to an EPA kilowatt-hour rating? No. Those ratings already include Level 2 charging losses measured from the wall. Enter 0, or you will count the loss twice. Enter a loss only for a vehicle-energy figure that stops at the battery.

Does a negative result mean the EV is a worse purchase? It means gasoline costs less than electricity for these miles and prices. It says nothing about purchase price, insurance, or maintenance.

Are the miles and prices sent to analytics? No. Analytics may record that this calculator ran. Miles, economy, prices, and costs stay in this browser.

Sources & review

Last reviewed: . The formula is reproduced above so you can check the math independently.

How we check calculations and describe their limits

Educational estimate only. Energy prices are the ones you enter.