EV Cost Calculator (Total Cost of Ownership)
Compare the total cost of an electric car and a gas car over the years you plan to keep it.

How to use the EV Cost Calculator
- Choose an example or keep the starting values. The example buttons above the form (Compact EV vs sedan, 8-year ownership, High mileage, 20,000 mi, Metric, 15,000 km) load a full set of inputs that you can then change.
- Set Years of ownership to a whole number from 1 to 30.
- Enter Distance driven per year and choose mi or km.
- Enter the EV purchase price and the Gas car purchase price.
- Enter EV efficiency and choose its unit: mi/kWh, km/kWh, kWh/100 mi or kWh/100 km.
- Enter the Electricity price per kWh.
- Enter Gas car fuel economy in MPG or L/100 km.
- Enter the Gasoline price, per gallon (/gal) or per litre (/L).
- Open More options to enter the EV incentives or rebates, charging loss, EV and gas car maintenance per year, EV and gas car insurance per year, and EV and gas car resale value as a percent of price. Choose a currency symbol if you need one.
- Read the results: the EV saves over the period, the total cost of each car, the cost per mile (or per km), and the cumulative cost table by year. Check any warning shown with the results.
Copy result copies the result lines with a link. Copy link stores every input in the page address, so the same calculation reopens later. Print / save as PDF produces a copy with the inputs, results, steps and date. Reset restores the starting example.
Is an electric car cheaper to own than a gas car?
It depends on your numbers, and the calculator shows the answer for your inputs. A higher EV price can still come out ahead when the car is driven more and kept longer, because the savings on each mile add up.
With 11,100 miles a year over 5 years, an EV at $45,000 against a gas car at $35,000 gives an EV saving of $1,154. The same 5 years with an EV at $38,000 and a gas car at $28,000 leaves the EV just $47 cheaper. Keeping the $45,000 vs $35,000 pair for 8 years raises the saving to $2,896, and driving 20,000 miles a year over 5 years raises it to $5,086. The car prices, insurance, maintenance and resale values in these examples are illustrations, not averages; the fuel and electricity prices are the EIA figures used as defaults.
How do I calculate the total cost of owning an EV?
Total cost = purchase price − incentives + years × (energy + maintenance + insurance) − resale value at the end. The calculator applies this formula and shows each step under “How it was calculated.”
Energy for the EV is worked out in three steps. Divide annual miles by your efficiency to get battery energy in kWh. Divide that by (1 − charging loss) to get the energy taken from the wall. Multiply by your electricity price. For example, 11,100 miles at 3.5 miles per kWh uses 3,171 kWh of battery energy. With a 9.2 % charging loss, that is 3,493 kWh from the wall. At $0.18 per kWh, the yearly charging cost is about $629.
Gas car energy follows the same pattern: annual miles ÷ MPG gives gallons, and gallons × gasoline price gives the yearly fuel cost. Cost per mile is the total cost divided by the total miles driven over the whole period. No discounting is applied, so a dollar in year 5 counts the same as a dollar today.
What costs should I include in EV total cost of ownership?
Include the purchase price, any incentives you expect to receive, charging energy, maintenance, insurance, and what you expect to sell the car for at the end. Each of these has a field in the calculator, and each one changes the total.
Incentives are subtracted from the EV price, so enter only what you actually qualify for. Charging loss matters because the grid supplies more energy than reaches the battery. Resale value is set as a percent of the purchase price, and a higher percent lowers the total. The calculator has no field for other costs, such as registration or tires. If you expect them, add them to your maintenance or insurance estimates.
Worked examples
| Input | Result |
|---|---|
| 5 years, 11100 mi a year, EV $45,000 vs gas car $35,000 | EV saves $1,154 (EV $41,643, gas car $42,798) |
| 5 years, 11100 mi a year, EV $38,000 vs gas car $28,000 | EV saves $47 (EV $37,051, gas car $37,098) |
| 8 years, 11100 mi a year, EV $45,000 vs gas car $35,000 | EV saves $2,896 (EV $57,180, gas car $60,076) |
| 5 years, 20000 mi a year, EV $45,000 vs gas car $35,000 | EV saves $5,086 (EV $44,164, gas car $49,250) |
| 5 years, 15000 km a year, EV €42,000 vs gas car €32,000 | EV saves €1,337 (EV €40,913, gas car €42,250) |
Calculated by the tool above with these values.
Frequently asked questions
Is this EV cost calculator free and private?
Yes. It runs entirely in your browser, nothing is uploaded, and no sign-up is needed.
Does the calculator discount future costs?
No. Future costs are not converted to present value, so a dollar spent in year 5 counts the same as a dollar spent today.
Where do I enter a tax credit or rebate?
Enter it in the EV incentives or rebates field under More options. The amount is subtracted from the EV price. Leave it at 0 if you do not expect one.
Why does the calculator say the gas car costs less?
The warning appears when the gas car is cheaper over the period you chose. Check your purchase prices, incentives and resale values, since small changes in these can flip the result.
Can I use the results in a quote or report?
Yes. Results, charts and printouts may be used freely in commercial work such as quotes, proposals, reports and service records, and no attribution is needed. The calculator’s note says it is for estimation, so verify critical designs against the applicable standard.
Why is there no discounting?
To keep the comparison simple and checkable, all years count at face value. With high interest rates, money spent later is worth less today, which slightly favours the car with lower running costs; keep that in mind for long ownership periods.
Related tools
- EV vs gas calculator: Use it to compare an EV and a gas car when your main question is which one suits your situation.
- EV cost per mile calculator: Use it when you want to focus on the cost of each mile driven.
- EV charging cost calculator: Use it to estimate what charging costs for your driving.
- Hybrid gas savings calculator: Use it to see how much fuel a hybrid could save compared with a gas car.
- EV efficiency calculator: Use it to work out your EV’s efficiency before you enter it here.
- EV lease calculator: Use it when you are leasing an EV and want the monthly payment and total lease cost.
- All EV calculators: Use it to browse every calculator on the site.
Sources
- EIA Electric Power Monthly, Table 5.6.A: U.S. average residential price, July 2026 (18.31 ¢/kWh)
- EIA gasoline and diesel fuel update: U.S. regular retail price, week of 5 October 2026 ($4.354/gal)
- FHWA Highway Statistics 2023, Table VM-1: 11,106 miles per light-duty vehicle
- Idaho National Laboratory, INL/EXT-12-25761: Level 2 overall charging efficiency 90.8 % (Chevrolet Volt)