# 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.

- Calculator id: `fuel-vs-ev-cost` · Category: Home Energy & Electrical (`energy`) · Tool name: `compare_fuel_vs_ev_cost`
- Canonical page: https://tttkmbb.com/energy/fuel-vs-ev-cost · This document: https://tttkmbb.com/energy/fuel-vs-ev-cost.md · JSON definition: https://tttkmbb.com/energy/fuel-vs-ev-cost.json

## Purpose

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.

**Use when:** 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).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `annual_distance_km` | number | km | required | Kilometres driven per year. (> 0, max 1000000) |
| `fuel_consumption_l_per_100km` | number | L/100 km | required | Combustion car consumption in litres per 100 km (use fuel-economy to convert from mpg). (> 0, max 100) |
| `fuel_price_per_liter` | number | per L | required | Price of petrol or diesel per litre in your currency. (min 0, max 100) |
| `ev_consumption_kwh_per_100km` | number | kWh/100 km | required | Electric car consumption in kWh per 100 km including charging losses (typically 15–22). (> 0, max 100) |
| `electricity_price_per_kwh` | number | per kWh | required | Price per kWh for charging (home tariff or public-charger rate) in the same currency. (min 0, max 100) |
| `ev_price_premium` | number |  | optional | Optional extra purchase price of the EV over the combustion car, to compute a simple payback time from the annual savings. (min 0, max 10000000) |

## Output

| Field | 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. |

## 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.

## Data Sources

- U.S. DOE Alternative Fuels Data Center – Vehicle Cost Calculator — https://afdc.energy.gov/calc/ (government, retrieved 2026-09-24)
- Wikipedia – Fuel economy in automobiles — https://en.wikipedia.org/wiki/Fuel_economy_in_automobiles (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/fuel-vs-ev-cost?annual_distance_km=…&fuel_consumption_l_per_100km=…&fuel_price_per_liter=…&ev_consumption_kwh_per_100km=…&electricity_price_per_kwh=…`
- `POST https://tttkmbb.com/api/v1/calculate/fuel-vs-ev-cost` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/fuel-vs-ev-cost · OpenAPI operationId `compare_fuel_vs_ev_cost` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "fuel-vs-ev-cost", "inputs": {…}}`

## Example

- 15,000 km/yr: 7 L/100 km at 1.80 vs 16 kWh/100 km at 0.30: inputs `{"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: inputs `{"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
```

## Limitations

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). 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. All values are computed from the formula above; no measurement or live data is involved.

## 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

- [Fuel Cost Calculator](https://tttkmbb.com/everyday/fuel-cost.md) — Fuel cost of a single trip.
- [Driving Carbon Footprint Calculator](https://tttkmbb.com/weather/carbon-footprint-driving.md) — CO₂ emissions of the same annual distance.
- [EV Range and Efficiency Calculator](https://tttkmbb.com/energy/ev-range-efficiency.md) — Convert the EV's efficiency units before entering kWh/100 km.
