How cost per mile is calculated
Energy cost per distance is the energy used per distance multiplied by the price of that energy. For an electric car, use consumption measured at the wall, because that is the energy on your bill. For a fuel car, use the fuel it burns per distance.
EV cost per km = (kWh per 100 km at the wall ÷ 100) × Electricity price Fuel cost per km = (Litres per 100 km ÷ 100) × Fuel price per litre Break-even electricity price = Gasoline cost per km ÷ EV kWh per km
Internally, every value is converted to kilometres, litres and kWh per 100 km, calculated, and converted back for display. That is why switching between miles and kilometres, US and Imperial gallons, or kWh/100 mi and mi/kWh gives consistent answers.
Worked example
An EV uses 30 kWh per 100 miles at the wall, or 0.30 kWh per mile. At 0.17 per kWh it costs 0.051 per mile (5.10 per 100 miles); at 0.45 on a DC rapid charger, 0.135 per mile. A 30 MPG gasoline car with fuel at 3.505 per gallon costs 3.505 ÷ 30 = 0.117 per mile. The break-even electricity price is 0.117 ÷ 0.30 ≈ 0.39 per kWh: charging below that is cheaper per mile than the gas car on energy alone.
Reading the results
Home charging is usually the cheapest per mile, and DC rapid charging the most expensive EV option. Whether public charging beats gasoline depends on local fuel prices and on the efficiency of both cars. Diesel cars often travel further per gallon, but diesel can cost more per gallon, so compare per mile rather than per gallon. The hybrid row is optional — leave it empty to hide it.
To turn per-mile costs into yearly savings including maintenance and purchase price, use the EV vs gas savings calculator. To convert between efficiency units such as mi/kWh and MPGe, use the EV efficiency calculator.
Limitations
Consumption varies with speed, temperature, terrain and driving style, so real per-mile costs differ from rated figures. Public charging prices may include session, idle or membership fees not reflected in a per-kWh rate. Fuel prices shown as presets are dated averages, not live prices.