{
  "id": 18009414,
  "title": "Building an EV-vs-petrol cost model: total cost of ownership in the browser",
  "url": "https://urgent.news/2026/11/03/building-an-ev-vs-petrol-cost-model-total-cost-of-ownership-in-the",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-03T19:24:06.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/farbodf/building-an-ev-vs-petrol-cost-model-total-cost-of-ownership-in-the-browser-3ic9"
  },
  "original_language": "en",
  "account": "An electric vehicle (EV) that costs $10,000 more than a petrol car with similar capabilities only breaks even after 8.6 years if driven an average of 12,000 miles per year. However, this cost advantage disappears if the EV is frequently charged using public fast chargers. The misconception arises because people often focus on the initial sticker price rather than the total cost of ownership, which includes purchase price and expenses related to operating the car over its lifetime.\n\nThe model is based on three simple functions to calculate the annual cost of each car type: annualCost(miles, fuelPerMile, maintenance) = miles * fuelPerMile + maintenance. The totalCost(price, years, miles, fuelPerMile, maintenance) = price + years * annualCost(miles, fuelPerMile, maintenance) captures the total cost over a specified number of years.\n\nThe main divergence between EVs and petrol cars is fuel consumption: EVs use electricity per mile, calculated as electricity price divided by vehicle efficiency (miles per kilowatt-hour), while petrol cars use fuel price per mile, calculated as fuel price divided by fuel economy (miles per gallon). Using average US figures of $0.16 per kWh for electricity and $3.50 per gallon for petrol, the EV's fuel cost per mile is $0.0457, whereas the petrol car's is $0.1094 per mile, making the EV cheaper to fuel by a significant margin.\n\nIllustrating this with an example: a $38,000 EV versus a $28,000 petrol car driven 12,000 miles annually results in an annual fuel cost saving of $763.93 for the EV versus $1,312.50 for the petrol car. Adding a relatively low maintenance cost differential of $400 per year, the EV saves $1,163.93 per year against the petrol car. When accounting for a $10,000 higher purchase price, the EV pays a premium for 8.59 years (around 103,100 miles) before becoming cheaper. After eight years, the EV is still $688.57 behind the petrol car, but at ten years, the EV overtakes, becoming $1,639.29 cheaper overall.",
  "summary": "An electric car that costs $10,000 more than its petrol equivalent breaks even after 8.6 years at 12,000 miles a year — and never breaks even at all if you charge it mostly at public fast chargers. Both facts fall out of one small model, and the second one is the reason \"EVs are cheaper to run\" needs a qualifier. The sticker price is the worst way to compare two cars. What matters is total cost…",
  "key_points": [
    "EV costing $10,000 more than petrol car breaks even after 8.6 years with 12,000 miles/year usage",
    "Model calculates annual cost of each car type using miles, fuel price, and maintenance",
    "EV cheaper to fuel due to lower fuel consumption per mile compared to petrol cars"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}