Home › Home 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
annual_distance_km | number | km | yes | Kilometres driven per year. Range: > 0, ≤ 1000000 |
fuel_consumption_l_per_100km | number | L/100 km | yes | Combustion car consumption in litres per 100 km (use fuel-economy to convert from mpg). Range: > 0, ≤ 100 |
fuel_price_per_liter | number | per L | yes | Price of petrol or diesel per litre in your currency. Range: ≥ 0, ≤ 100 |
ev_consumption_kwh_per_100km | number | kWh/100 km | yes | Electric car consumption in kWh per 100 km including charging losses (typically 15–22). Range: > 0, ≤ 100 |
electricity_price_per_kwh | number | per kWh | yes | Price per kWh for charging (home tariff or public-charger rate) in the same currency. Range: ≥ 0, ≤ 100 |
ev_price_premium | number | no | Optional extra purchase price of the EV over the combustion car, to compute a simple payback time from the annual savings. Range: ≥ 0, ≤ 10000000 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
fuel_annual_cost | number | annual_distance_km / 100 × fuel_consumption_l_per_100km × fuel_price_per_liter. | |
ev_annual_cost | number | annual_distance_km / 100 × ev_consumption_kwh_per_100km × electricity_price_per_kwh. | |
annual_savings | number | fuel_annual_cost − ev_annual_cost (negative when the EV costs more to run). | |
fuel_cost_per_km | number | per km | fuel_annual_cost / annual_distance_km. |
ev_cost_per_km | number | per km | ev_annual_cost / annual_distance_km. |
savings_percent | number | % | annual_savings / fuel_annual_cost × 100. |
payback_years | number | years | ev_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
- API:
GET https://tttkmbb.com/api/v1/calculate/fuel-vs-ev-cost(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/fuel-vs-ev-cost · Markdown: https://tttkmbb.com/energy/fuel-vs-ev-cost.md · JSON definition: https://tttkmbb.com/energy/fuel-vs-ev-cost.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="fuel-vs-ev-cost" - OpenAPI operationId:
compare_fuel_vs_ev_cost - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
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
- Fuel Cost Calculator — Fuel cost of a single trip.
- Driving Carbon Footprint Calculator — CO₂ emissions of the same annual distance.
- EV Range and Efficiency Calculator — Convert the EV's efficiency units before entering kWh/100 km.