EV Charging Cost Calculator: Home, Public Charger and per Mile

An EV charge costs the kWh drawn from the wall times the price per kWh, and the kWh drawn from the wall are the kWh that end up in the battery divided by (1 - the share lost in charging). In the illustrative example below, charging a 60 kWh battery from 20% to 80% puts 36 kWh in the battery, draws 40 kWh from the wall at a 10% loss, and at $0.18 a kWh costs $7.20. Per mile that is $0.05 charged at home and $0.15 on a public charger at $0.49 a kWh plus a $1.50 session fee, 3.00 times as much.
Every price, efficiency and loss figure here belongs to one made-up household. None is a real tariff, a charging network’s price, or any car’s rated efficiency. Your price per kWh is on your own bill, your miles per kWh is on your own car’s trip display, and your loss share comes from comparing what your meter or charger reports with what the car says it received.
The EV charging cost formula
kWh into the battery = battery size x (end level - start level)
kWh from the wall = kWh into the battery / (1 - loss share)
cost of a charge = kWh from the wall x price per kWh
cost per mile = price per kWh / (miles per kWh x (1 - loss share))
public price per kWh = price on the screen + session fee / kWh per visit
Worked example: one charge at home
| Line | Figure |
|---|---|
| Battery, usable | 60 kWh |
| Charged from 20% to 80%: kWh into the battery | 36 kWh |
| kWh drawn from the wall at 10% lost | 40 kWh |
| kWh lost on the way | 4 kWh |
| Cost of this charge at $0.18 a kWh | $7.20 |
| Part of that paying for losses | $0.72 |
| Empty to full | $12.00 |
The 4 kWh lost on the way still went through the meter, so they are on the bill: $0.72 of the $7.20. Divide the cost by the kWh the battery actually kept and the price of energy that reaches the car is $0.20 a kWh, not the $0.18 printed on the bill.
Cost per mile charging at home
At 4.0 miles per kWh on the trip display, a full battery goes 240 miles. With 10% lost in charging, each mile takes 0.2778 kWh from the wall, so it costs $0.05 at $0.18 a kWh. That is $5.00 for a hundred miles, $0.50 of it paying for losses, or 20 miles for each dollar. Your trip display already includes heating, cooling and speed for the driving you did, so use a reading from the kind of driving you are costing.
How much to charge an EV at a charging station
A public charger shows a price per kWh, but that is not what a mile costs. Spread the session fee over the kWh you buy on each visit and add the loss on that charger, then divide by miles per kWh:
| Line | Home | Public charger |
|---|---|---|
| Price per kWh on the bill or screen | $0.18 | $0.49 |
| Session fee, spread over 30 kWh | none | $0.05 a kWh |
| Price per kWh paid | $0.18 | $0.54 |
| Share lost in charging | 10% | 10% |
| Price per kWh that reaches the battery | $0.20 | $0.60 |
| Cost per mile at 4.0 miles per kWh | $0.05 | $0.15 |
One visit of 30 kWh costs $16.20: $0.54 a kWh once the fee is in. Charging 300 miles a month in public instead of at home costs $30.00 more a month in this example.
The fee matters more the less you buy. Take half as much on each visit, 15 kWh, and the same $1.50 fee adds $0.10 to every kWh instead of $0.05, which lifts the public cost per mile to $0.1639. Idle fees, memberships and per-minute pricing are left out here; if your charger bills by the minute, turn a receipt into a price per kWh first.
A month of charging, home and public together
The example drives 1,080 miles a month and charges 10% of them in public. Each kind of mile is priced at its own cost:
| Miles | Charged | kWh paid for | Cost |
|---|---|---|---|
| 972 | At home, $0.05 a mile | 270 from the meter | $48.60 |
| 108 | In public, $0.15 a mile | 30 billed | $16.20 |
| 1,080 | A month | $64.80 |
That is $64.80 a month, $777.60 a year, or $0.06 a mile blended. Losses account for $4.86 of the home cost. The public miles are 10% of the driving but 25% of the charging bill. If your bill is tiered, price those extra kWh at the tier they fall in, not the cheapest one.
Off-peak charging on a time-of-use bill
On a time-of-use bill, the same 270 kWh cost different amounts depending on the hour. With a peak price of $0.30 and an off-peak price of $0.12, charging 50% at peak costs $56.70 a month. Set the car’s charge timer so only 5% lands at peak and it costs $34.83, saving $21.87 a month, $262.44 a year. The kWh did not change; only the price each one paid did.
Against a gas car, fuel only
Gas at $3.60 a gallon in a car doing 30 mpg is $0.12 a mile, against the example’s blended $0.06 charging. Over 12,960 miles a year that is a fuel difference of $777.60. The gas car would only match at 60 mpg, or with gas at $1.80. This compares what goes in the tank with what goes in the battery and nothing else: purchase price, insurance, maintenance and depreciation are left out. The car affordability calculator shows where a fuel line like this sits in a monthly car budget.
The insight: the price on the screen is not the price of a mile
Two things sit between a price per kWh and a cost per mile, and both are easy to leave out. The first is losses: energy that went through the meter and never reached the battery is still paid for, which is why $0.18 on the bill becomes $0.20 in the battery. The second is the session fee, which is a fixed amount per visit and so costs more per kWh the smaller the session. Compare charging options on cost per mile, with both included, and the gap between home and public is $0.10 a mile here.
The same gap is what a home charger is paid back from. Moving 400 miles a month from public to home saves $40.00 a month. Against a quote of $1,200.00 less a confirmed $200.00 rebate, $1,000.00, that pays back in 25 months and leaves the household $1,400.00 ahead after 5 years. The quote is the household’s own; nothing here is advice on electrical work, which is a question for an electrician.
Worked example two: a road trip
On a road trip the cheap home kWh run out. At 3.0 miles per kWh on the highway, a 600-mile trip uses 200 kWh. Leaving with 47 kWh charged at home leaves 153 kWh to buy on the road:
| Line | Figure |
|---|---|
| 600 miles at 3.0 miles per kWh | 200 kWh |
| Left home with | 47 kWh, $9.40 at home |
| Added on the road | 153 kWh |
| Stops at 40 kWh each | 4 |
| Public kWh billed at 10% lost | 170 kWh |
| Public charging, 4 session fees included | $89.30 |
| Trip charging cost | $98.70 |
| Per mile | $0.1645 |
| Gas for the same trip | $72.00 |
| Same kWh all charged at home | $40.00 |
The trip costs $98.70 in charging, $0.1645 a mile, which is $26.70 more than gas at $72.00 for the same trip. The same kWh all charged at home would have cost $40.00. Whether an EV is cheaper to run depends on where it is charged, and this example shows it can go either way within one household.
How these were calculated
kWh into the battery are the battery size times the change in charge level; kWh from the wall are that divided by (1 - loss share), and every cost is kWh from the wall times the price per kWh, so losses are paid for throughout. A public price per kWh is the screen price plus the session fee divided by the kWh bought per visit. Cost per mile is the price per kWh divided by miles per kWh x (1 - loss share). The monthly cost prices home and public miles separately and adds them; the public cost per mile is carried in as the sheet shows it, to four decimals. Road trip stops are the kWh needed on the road divided by the kWh added per stop, rounded up, with one session fee per stop.
Every figure was computed twice: once by the code behind the pack below and once by an independent program written for this page, which prices a public charger one visit at a time, counts payback month by month and adds road trip stops one at a time. The two agree to the cent, and to four decimals for prices per kWh and per mile. All inputs are illustrative, not real tariffs, charging network prices or car efficiency figures. None of this is financial advice or advice on electrical work.
To run this on your own bill, your own car’s readings and your own receipts, the pack below has eight linked calculators, from the cost of one charge to a road trip with its stops and fees.