HomeHome Energy & Electrical › Fuel vs EV Cost Calculator

Fuel vs EV Cost Calculator

Compares the annual energy cost of a combustion car (L/100 km × fuel price) with an electric car (kWh/100 km × electricity price) over the same distance, and reports the savings, cost per km and the years needed to recover an EV price premium.

When to use

You want to know how much an EV saves in fuel per year, the cost per kilometre of each car, or how long a higher purchase price takes to pay back from energy savings alone.

Do not use when: You need total cost of ownership (insurance, maintenance, depreciation, taxes are not included), CO₂ comparison (use carbon-footprint-driving), or a single trip's fuel cost (use fuel-cost).

Formula

fuel_annual_cost = annual_distance_km / 100 × fuel_consumption_l_per_100km × fuel_price_per_liter; ev_annual_cost = annual_distance_km / 100 × ev_consumption_kwh_per_100km × electricity_price_per_kwh; annual_savings = fuel_annual_cost − ev_annual_cost; savings_percent = annual_savings / fuel_annual_cost × 100; payback_years = ev_price_premium / annual_savings

Energy cost only, at constant prices; the U.S. DOE vehicle cost calculator adds maintenance, insurance and depreciation for a full ownership comparison. Home charging tariffs and public fast-charging rates can differ by a factor of 2–3, so use the price you actually pay.

Inputs

ParameterTypeUnitRequiredDescription
annual_distance_kmnumberkmyesKilometres driven per year. Range: > 0, ≤ 1000000
fuel_consumption_l_per_100kmnumberL/100 kmyesCombustion car consumption in litres per 100 km (use fuel-economy to convert from mpg). Range: > 0, ≤ 100
fuel_price_per_liternumberper LyesPrice of petrol or diesel per litre in your currency. Range: ≥ 0, ≤ 100
ev_consumption_kwh_per_100kmnumberkWh/100 kmyesElectric car consumption in kWh per 100 km including charging losses (typically 15–22). Range: > 0, ≤ 100
electricity_price_per_kwhnumberper kWhyesPrice per kWh for charging (home tariff or public-charger rate) in the same currency. Range: ≥ 0, ≤ 100
ev_price_premiumnumbernoOptional extra purchase price of the EV over the combustion car, to compute a simple payback time from the annual savings. Range: ≥ 0, ≤ 10000000

Outputs

OutputTypeUnitDescription
fuel_annual_costnumberannual_distance_km / 100 × fuel_consumption_l_per_100km × fuel_price_per_liter.
ev_annual_costnumberannual_distance_km / 100 × ev_consumption_kwh_per_100km × electricity_price_per_kwh.
annual_savingsnumberfuel_annual_cost − ev_annual_cost (negative when the EV costs more to run).
fuel_cost_per_kmnumberper kmfuel_annual_cost / annual_distance_km.
ev_cost_per_kmnumberper kmev_annual_cost / annual_distance_km.
savings_percentnumber%annual_savings / fuel_annual_cost × 100.
payback_yearsnumberyearsev_price_premium / annual_savings; only when a premium is given and the savings are positive.

Example

15,000 km/yr: 7 L/100 km at 1.80 vs 16 kWh/100 km at 0.30: {"annual_distance_km":15000,"fuel_consumption_l_per_100km":7,"fuel_price_per_liter":1.8,"ev_consumption_kwh_per_100km":16,"electricity_price_per_kwh":0.3}{"fuel_annual_cost":1890,"ev_annual_cost":720,"annual_savings":1170,"fuel_cost_per_km":0.126,"ev_cost_per_km":0.048,"savings_percent":61.9}

20,000 km/yr with an 8,000 price premium: {"annual_distance_km":20000,"fuel_consumption_l_per_100km":8.5,"fuel_price_per_liter":1.65,"ev_consumption_kwh_per_100km":18,"electricity_price_per_kwh":0.25,"ev_price_premium":8000}{"fuel_annual_cost":2805,"ev_annual_cost":900,"annual_savings":1905,"payback_years":4.2,"savings_percent":67.91}

GET https://tttkmbb.com/api/v1/calculate/fuel-vs-ev-cost?annual_distance_km=15000&fuel_consumption_l_per_100km=7&fuel_price_per_liter=1.8&ev_consumption_kwh_per_100km=16&electricity_price_per_kwh=0.3

Machine access

Sources

FAQ

Which EV consumption should I enter?

A figure that includes charging losses, such as the WLTP/EPA rating or your wall-meter reading; dashboard values understate grid energy by roughly 10 %.

Does the payback include maintenance or resale value?

No. It divides the price premium by energy savings only; EVs usually have lower maintenance and possibly different depreciation, which shorten or lengthen the real payback.

My fuel economy is in mpg – what do I enter?

Convert with the fuel-economy calculator: L/100 km = 235.215 / mpg (US) or 282.481 / mpg (UK).

Related calculators