Fuel & Charging
EV vs. Gas Cost Calculator
Price the same miles both ways. Enter what you pay for fuel and electricity and what each car is rated to do with them — the division is printed under every figure, and nothing is assumed on your behalf.
Gas
—
—/gal ÷ — MPG
Electric
—
—/kWh ÷ — mi/kWh
- Gas, per year
- —
- Electric, per year
- —
- Difference per year
- —
- Same gap over 5 years
- —
Energy only — before depreciation, insurance, maintenance, tires, purchase price, tax credits, or registration. The 5-year figure is five times the annual gap, not adjusted for inflation or the time value of money.
Informational only, not professional advice. This tool computes the energy cost of driving from figures you supply. It does not account for the full cost of owning either vehicle, and it is not financial advice. Nothing you type is sent anywhere — the arithmetic runs in your browser.
How this is calculated
Both sides are the same division, expressed in the units each fuel is sold in. Fuel is priced by the gallon and range is rated per gallon; electricity is priced by the kilowatt-hour and range is rated per kilowatt-hour. So:
gasoline $ per gallon ÷ miles per gallon = $ per mile electricity $ per kWh ÷ miles per kWh = $ per mile annual cost = $ per mile × miles driven per year difference = gas annual cost − electric annual cost
If you enter efficiency as kWh per 100 miles — the unit EPA prints on the window sticker — it is converted first, with miles per kWh = 100 ÷ kWh per 100 miles. That conversion is the tool's job rather than yours, because doing it by hand is where a misplaced decimal enters a cost figure.
Where the ratings come from
Combined MPG and kWh/100 mi figures for a specific model year are published at fueleconomy.gov, maintained by the U.S. Department of Energy with data provided by the EPA. We do not store or bundle any vehicle database — you look up your car and enter the number, which keeps this tool correct for model years we have never heard of.
The charging-loss trap
This is the most likely way a comparison like this goes quietly wrong. EPA's electric ratings are measured at the wall, not at the battery. In EPA's own words, the ratings “assume level 2, alternating current (AC) charging and account for losses from the charging cable… and the on-board vehicle charger. This moves the measurement from the vehicle to the outlet in the wall to better represent how much users would pay to refuel their car.”
A car's own efficiency display usually reports energy drawn from the battery, which excludes those losses. Enter that figure and the electric side will look cheaper than your utility bill will show. Use the EPA rating, or work your own figure out from miles driven and kilowatt-hours actually billed.
On “combined” ratings
EPA's combined figure blends its separate city and highway tests, weighted 55 percent city and 45 percent highway. It is worth being precise about how: under 40 CFR 600.210-12, manufacturers “shall harmonically average the unrounded city and highway fuel economy values.” That is 1 ÷ (0.55/city + 0.45/highway), not 0.55×city + 0.45×highway. Fuel economy is a rate, so the consumption is what gets weighted — averaging the MPG values directly gives a number that is too high. Several calculator sites publish the wrong form.
What this figure does not cover
Energy only — before depreciation, insurance, maintenance, tires, purchase price, tax credits, and registration. That is a deliberate limit rather than an omission: those costs vary enormously by vehicle, driver and location, and folding an assumed figure for them into a per-mile number would hide the one thing this page can actually tell you precisely. For the purchase-price side of the decision, see Keeping & Replacing.
Two further simplifications worth naming. The five-year figure is simply five times the annual gap — it is not discounted, so it does not account for inflation or the time value of money. And it holds your fuel price, electricity rate and mileage constant for those five years, which no real five-year period has ever done. Treat it as the size of the gap at today's prices, not a forecast.
Last reviewed: August 2026
Frequently asked questions
Should I use my car's dashboard mi/kWh readout or the EPA rating?
Prefer EPA's. EPA measures electricity at the wall and includes losses in the charging cable and the car's onboard charger — in EPA's words, this 'moves the measurement from the vehicle to the outlet in the wall to better represent how much users would pay to refuel their car.' Most dashboard displays count only the energy that leaves the battery, so they miss those losses and understate what your utility actually bills you. If you use the dashboard figure, treat the resulting electric cost as a floor rather than an estimate.
What electricity rate should I enter?
Your all-in delivered rate — take a recent bill, divide the total amount by the kilowatt-hours used, and enter that. This matters because many utilities split the bill into a supply charge and a per-kWh delivery charge, and using only the supply rate can understate the true cost substantially. If you mostly charge on public DC fast chargers, use that network's price instead; it is typically several times the residential rate, which is exactly why this is an input rather than a number we assume for you.
Why doesn't this include the purchase price or the tax credit?
Because mixing them into a per-mile energy figure would hide what the figure actually measures. This tool answers one question — what the miles themselves cost — and states that scope on the page. The purchase-price difference between two cars, and how many miles it takes for cheaper fuel to repay it, is what the Break-Even Mileage Calculator is for. Total cost of keeping a car, including depreciation, insurance and maintenance, belongs to the True Cost per Mile Calculator.
What does 'combined' MPG mean, and why use it?
Combined is EPA's single blended rating from its separate city and highway tests, weighted 55 percent city and 45 percent highway. It is not a plain average of the two MPG numbers: under 40 CFR 600.210-12, manufacturers 'shall harmonically average' them, meaning the fuel consumption is what gets weighted rather than the MPG values. Combined is the right input here because it reflects a realistic mix of driving. If your commute is nearly all highway, entering the highway figure instead will model your situation more closely.
Related tools
How many miles the cheaper-to-run car has to cover before it repays the extra you paid for it.
What getting to work costs per day, per month, and per year — energy only, or all-in at the IRS standard mileage rate.
Open tool →Every cost of keeping a car divided by the miles it covers — fuel, depreciation, insurance, maintenance, tires.