EV Charging Cost Calculator Formula

Understand the math behind the ev charging cost calculator. Each variable explained with a worked example.

Formulas Used

Charging Cost

charge_cost = kwh_to_add * electricity_rate

Energy Added

kwh_added = kwh_to_add

Est. Cost per Mile (at 3.5 mi/kWh)

cost_per_mile = electricity_rate / 3.5

Variables

VariableDescriptionDefault
battery_kwhBattery Capacity(kWh)75
current_charge_pctCurrent Charge Level(%)20
target_charge_pctTarget Charge Level(%)80
electricity_rateElectricity Rate(USD/kWh)0.13
kwh_to_addDerived value= battery_kwh * (target_charge_pct - current_charge_pct) / 100calculated

How It Works

EV Charging Costs

Electric vehicles are typically much cheaper to fuel than gasoline cars, especially when charging at home with off-peak rates.

Formula

Energy to Add (kWh) = Battery Size x (Target % - Current %) / 100

Cost = Energy to Add x Electricity Rate

Home charging at $0.13/kWh costs roughly $0.037 per mile (at 3.5 miles/kWh), compared to $0.125/mile for a 28 MPG gas car at $3.50/gallon.

Worked Example

Charging a 75 kWh battery from 20% to 80% at $0.13/kWh.

battery_kwh = 75current_charge_pct = 20target_charge_pct = 80electricity_rate = 0.13
  1. 01Energy to add = 75 x (80 - 20) / 100 = 45 kWh
  2. 02Cost = 45 x $0.13 = $5.85
  3. 03Cost per mile = $0.13 / 3.5 = $0.037/mile

Frequently Asked Questions

How much does it cost to fully charge an EV?

A 75 kWh battery at $0.13/kWh costs about $9.75 for a full charge, providing 250-300 miles of range. This is 3-4x cheaper than gasoline for the same distance.

Home vs public charging cost?

Home charging: $0.10-0.15/kWh. Public Level 2: $0.20-0.35/kWh. DC fast charging: $0.30-0.60/kWh. Home charging is by far the cheapest option.

Why charge to 80% instead of 100%?

Charging above 80% is much slower and generates more heat, which degrades battery life. Daily charging to 80% maximizes battery longevity and is recommended by most manufacturers.

Ready to run the numbers?

Open EV Charging Cost Calculator