Enter the battery size, the charge levels, the charging loss and the electricity rate of your plan. Efficiency and distance per month are optional; enter them to also get the cost per km and per month.
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formula
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Enter the battery size (kWh), the charge levels (for example, 20% → 80%), the charging loss and your electricity rate, and you get the energy that goes into the battery, the energy you buy from the grid and the cost of that charge on the spot
- Enter your efficiency (mi/kWh) to get the cost per mile and an estimate of the driving range on a full charge. Add your miles per month to also get the monthly and yearly charging cost and a graph of monthly cost by miles driven
- Level 2 charging at home and DC fast charging billed per kWh use the same formulas; just change the rate ($ per kWh) and the loss
- A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
If you commute 1,000 miles a month in an EV that gets 3.5 mi/kWh and charge on Level 2 at home (10% loss) at $0.17 per kWh, the cost per mile is about $0.054, and the monthly charging cost is about $54 (both are estimates for these conditions).
With just two numbers, "how many miles a month" and "your home electricity rate", you can estimate your monthly charging cost, which helps when you are thinking about buying a car or how to commute. To compare with a gas car, put the gas cost for the same miles next to it (gas price ÷ mpg × miles; at $3.20 a gallon and 25 mpg, that is $128 for 1,000 miles).
If a per-minute fast charger costs you $15 and puts 30 kWh into the battery, the effective rate is \(15 \div 30 = 0.50\) dollars per kWh. If your home rate is $0.17 per kWh with 10% loss, the effective price per kWh in the battery is \(0.17 \div 0.9 \approx 0.189\) dollars (the numbers are examples).
Fast charging is paying for speed. You can check with numbers that doing everyday charging at home and using fast chargers only on long trips saves money. The calculation also shows that with per-minute billing, the effective rate tends to rise as the battery gets fuller and charging slows down.
Many utilities offer time-of-use or EV plans with cheaper rates at night. For example, with $0.10 per kWh off-peak and $0.30 per kWh on-peak, 1,000 miles a month at 3.5 mi/kWh with 10% loss costs about $31.75 a month charged off-peak and about $95.24 charged on-peak (the rates are examples; check your own plan).
An EV lets you choose when to charge, so simply charging when the rate is low greatly changes the cost of driving the same distance. It is useful when you set up scheduled charging in the car or its app.
Charging a plug-in hybrid with a 13.6 kWh battery from 30% to full puts about 9.5 kWh into the battery. With a 15% loss and $0.17 per kWh, one charge costs about $1.90, and at 3 mi/kWh it is enough for about 29 miles on electricity alone (estimates for these conditions).
A plug-in hybrid switches to gas when the battery runs out, so whether your daily miles fit within the electric-only range decides whether you get the benefit of cheap electricity.
Putting 45 kWh into the battery costs $7.65 at $0.17 per kWh with 0% loss, but about $8.50 with 10% loss and about $9.00 with 15% loss. You pay more by the amount lost.
When you set a monthly electricity budget, or plan how much extra solar power to send to your EV, estimate with "the energy bought (or used) including the loss", not "the energy into the battery", for a more realistic number. In cold weather the car uses energy to warm the battery, so the loss tends to grow; allowing a little extra is a safe choice.
Formula
Symbols and terms
Symbols
| \(B\) | Battery size (kWh). How much electricity the battery can store. It is the first letter of "battery". |
| \(s_1,\ s_2\) | The charge level when you start charging, \(s_1\), and when you stop, \(s_2\) (%). The \(s\) comes from "state of charge". The small 1 and 2 are subscripts that tell "before" and "after" apart. |
| \(E\) | Energy into the battery (kWh). It is the first letter of "energy". |
| \(E_b\) | Energy bought from the grid (kWh). It is larger than \(E\) by the amount lost. The small \(b\) stands for "bought". |
| \(L\) | Charging loss (%). The share of the electricity you buy that does not reach the battery. It is the first letter of "loss". |
| \(u\) | Electricity rate. The price of 1 kWh ($ per kWh). It is the first letter of "unit price". |
| \(C\) | Cost of the charge ($). It is the first letter of "cost". |
| \(\eta\) | Efficiency (mi/kWh), how far the car goes on 1 kWh. The Greek letter eta is often used for efficiency; here it shows how well the car turns electricity into distance. |
| \(c\) | Cost per mile ($ per mile). It is lowercase to tell it apart from \(C\), the cost of one charge. |
| \(d\) | Miles per month. It is the first letter of "distance". |
| \(C_m\) | Monthly charging cost ($). The small \(m\) stands for "month". |
| \(R\) | Estimated driving range on a full charge (miles). It is the first letter of "range". |
Terms
| kWh (kilowatt-hour) | A unit of electrical energy. Using 1 kW of power for 1 hour uses 1 kWh. Both EV battery sizes and electric bills are counted in this unit. |
| battery capacity | How much electricity the battery can store (kWh). Many EVs sold in the US have about 60 to 100 kWh, and plug-in hybrids about 10 to 25 kWh. To protect the battery, not all of it is used, so the usable capacity is a little smaller than the gross capacity, and many cars show the charge level with the usable capacity as 100%. |
| state of charge (SOC) | How much electricity is left in the battery, shown as a percentage of its capacity. It is the same idea as the battery percentage on a phone. Most cars show it with the usable capacity, not the gross capacity, as 100%. |
| charging loss | The part of the electricity you buy that is lost, mostly as heat, before it reaches the battery. The main causes are the onboard charger, which turns AC into DC, and the cooling and control systems that run while charging. About 10% is typical for Level 2 charging at home. |
| efficiency | How far an EV goes on 1 kWh (mi/kWh), the EV version of mpg. The larger the number, the better the car uses electricity. The EPA label shows it as kWh per 100 miles instead (a smaller number is better there). It changes with the car, speed, heating and temperature. |
| Level 2 charging | Charging with AC from a 240 V home charger or a public charger over several hours. Level 1 charging uses a regular 120 V outlet and is much slower. In both cases the onboard charger turns AC into DC, and that step causes the loss. At home, the cost depends on your electricity rate ($ per kWh). |
| DC fast charging | Charging with DC in a short time at a fast charger along highways or at shopping centers. Depending on the network and the state, you pay per kWh delivered or per minute connected. With per-minute billing, divide what you paid by the energy that went into the battery to find the effective rate. |
| driving range | How far the car can go on one full charge. This calculator estimates it as "battery size × efficiency". The EPA range on the window sticker comes from standard tests, and real range can be shorter with heating, high speed or a heavy load. |
| electricity rate | The price of 1 kWh of electricity ($ per kWh). It depends on your utility, your plan, how much you use and, on time-of-use plans, the time of day. Divide your bill by the kWh used to find your home's rough average rate. |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to these topics is the quickest way forward.
| Percents (Grades 6–7) |
|
| Multiplying and dividing decimals (Grades 5–6) |
|
| Unit rates (Grade 6) |
|
| Proportional relationships (Grades 6–7) |
|
| Power and energy (middle school science) |
|
How to calculate it in Excel
| Battery size (kWh) | 75 |
| Current charge (%) | 20 |
| Target charge (%) | 80 |
| Energy into the battery (kWh) | =B1*(B3-B2)/100 |
| Energy into the battery (kWh) | 45 |
| Charging loss (%) | 10 |
| Energy bought from the grid (kWh) | =B1/(1-B2/100) |
| Energy bought from the grid (kWh) | 50 |
| Electricity rate ($/kWh) | 0.16 |
| Cost of this charge ($) | =B1*B2 |
| Electricity rate ($/kWh) | 0.17 |
| Charging loss (%) | 10 |
| Efficiency (mi/kWh) | 3.5 |
| Cost per mile ($/mi) | =B1/(1-B2/100)/B3 |
| Cost per mile ($/mi) | 0.054 |
| Miles per month (mi) | 1000 |
| Monthly charging cost ($) | =B1*B2 |
| Yearly charging cost ($) | =B3*12 |
| Battery size (kWh) | 75 |
| Efficiency (mi/kWh) | 3.5 |
| Estimated range on a full charge (mi) | =B1*B2 |
The first table is the example of a 75 kWh battery charged from 20% to 80%, and B4 shows 45 (kWh). The second table corrects those 45 kWh for a 10% loss, and B3 shows 50 (kWh). The third table multiplies by the $0.16 rate, and B3 shows 8 ($8.00).
The fourth table is the cost per mile, and B4 shows about 0.054 ($ per mile). The fifth table multiplies that by 1,000 miles a month, for $54 a month and $648 a year (because the cost per mile is rounded to 0.054, this differs slightly from the calculator's $53.97). The sixth table is the estimated range, and B3 shows 262.5 (miles). Just replace the numbers in column B with the values for your car.
How to calculate it in Google Sheets
| Battery size (kWh) | 75 |
| Current charge (%) | 20 |
| Target charge (%) | 80 |
| Energy into the battery (kWh) | =B1*(B3-B2)/100 |
| Energy into the battery (kWh) | 45 |
| Charging loss (%) | 10 |
| Energy bought from the grid (kWh) | =B1/(1-B2/100) |
| Energy bought from the grid (kWh) | 50 |
| Electricity rate ($/kWh) | 0.16 |
| Cost of this charge ($) | =B1*B2 |
| Electricity rate ($/kWh) | 0.17 |
| Charging loss (%) | 10 |
| Efficiency (mi/kWh) | 3.5 |
| Cost per mile ($/mi) | =B1/(1-B2/100)/B3 |
| Cost per mile ($/mi) | 0.054 |
| Miles per month (mi) | 1000 |
| Monthly charging cost ($) | =B1*B2 |
| Yearly charging cost ($) | =B3*12 |
| Battery size (kWh) | 75 |
| Efficiency (mi/kWh) | 3.5 |
| Estimated range on a full charge (mi) | =B1*B2 |
How to calculate it in Python
battery_kwh = 75 # battery size (kWh)
soc_from_percent = 20 # current charge (%)
soc_to_percent = 80 # target charge (%)
loss_percent = 10 # charging loss (%)
price_per_kwh = 0.17 # electricity rate ($ per kWh)
efficiency_mi_per_kwh = 3.5 # efficiency (mi/kWh)
monthly_mi = 1000 # miles per month
# energy into the battery (kWh) = battery size × increase in charge ÷ 100
charged_kwh = battery_kwh * (soc_to_percent - soc_from_percent) / 100
# energy bought from the grid (kWh) = energy into the battery ÷ (1 − loss ÷ 100)
bought_kwh = charged_kwh / (1 - loss_percent / 100)
# cost of this charge ($) = energy bought × rate
charge_cost = bought_kwh * price_per_kwh
# cost per mile ($/mi) = rate ÷ (1 − loss ÷ 100) ÷ efficiency
cost_per_mile = price_per_kwh / (1 - loss_percent / 100) / efficiency_mi_per_kwh
# monthly and yearly charging cost ($) and estimated range on a full charge (mi)
monthly_cost = cost_per_mile * monthly_mi
range_mi = battery_kwh * efficiency_mi_per_kwh
print(f"Energy into the battery: {charged_kwh:.2f} kWh")
print(f"Energy bought from the grid: {bought_kwh:.2f} kWh")
print(f"Cost of this charge: ${charge_cost:.2f}")
print(f"Cost per mile: ${cost_per_mile:.3f}/mi")
print(f"Monthly charging cost: ${monthly_cost:.2f} / yearly: ${monthly_cost * 12:.2f}")
print(f"Estimated range on a full charge: {range_mi:.1f} mi")
How to write it in LaTeX and other math languages (copy and paste)
E = B × (s₂ − s₁) ÷ 100
E = B \times \frac{s_2 - s_1}{100}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>E</mi>
<mo>=</mo>
<mi>B</mi>
<mo>×</mo>
<mfrac>
<mrow><msub><mi>s</mi><mn>2</mn></msub><mo>−</mo><msub><mi>s</mi><mn>1</mn></msub></mrow>
<mn>100</mn>
</mfrac>
</mrow>
</math>
E = B * (s_2 - s_1) / 100
energy = capacity*(socTo - socFrom)/100
E := B*(s2 - s1)/100;
E = B*(s2 - s1)/100;
E = B×(s_2−s_1)/100
E_b = E ÷ (1 − L ÷ 100)
E_b = \frac{E}{1 - \frac{L}{100}}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>E</mi><mi>b</mi></msub>
<mo>=</mo>
<mfrac>
<mi>E</mi>
<mrow><mn>1</mn><mo>−</mo><mfrac><mi>L</mi><mn>100</mn></mfrac></mrow>
</mfrac>
</mrow>
</math>
E_b = E / (1 - L/100)
energyBought = energy/(1 - loss/100)
E_b := E/(1 - L/100);
E_b = E/(1 - L/100);
E_b = E/(1−L/100)
C = E_b × u
C = E_b \times u
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>C</mi>
<mo>=</mo>
<msub><mi>E</mi><mi>b</mi></msub>
<mo>×</mo>
<mi>u</mi>
</mrow>
</math>
C = E_b * u
cost = energyBought*price
C := E_b*u;
C = E_b*u;
C = E_b×u
c = u ÷ (1 − L ÷ 100) ÷ η
c = \frac{u}{\left(1 - \frac{L}{100}\right)\eta}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>c</mi>
<mo>=</mo>
<mfrac>
<mi>u</mi>
<mrow>
<mo>(</mo><mn>1</mn><mo>−</mo><mfrac><mi>L</mi><mn>100</mn></mfrac><mo>)</mo>
<mi>η</mi>
</mrow>
</mfrac>
</mrow>
</math>
c = u / ((1 - L/100) * eta)
costPerKm = price/((1 - loss/100)*efficiency)
c := u/((1 - L/100)*eta);
c = u/((1 - L/100)*eta);
c = u/((1−L/100)η)
Cₘ = c × d
C_m = c \times d
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<msub><mi>C</mi><mi>m</mi></msub>
<mo>=</mo>
<mi>c</mi>
<mo>×</mo>
<mi>d</mi>
</mrow>
</math>
C_m = c * d
monthlyCost = costPerKm*monthlyDistance
C_m := c*d;
C_m = c*d;
C_m = c×d
R = B × η
R = B \times \eta
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>R</mi>
<mo>=</mo>
<mi>B</mi>
<mo>×</mo>
<mi>η</mi>
</mrow>
</math>
R = B * eta
range = capacity*efficiency
R := B*eta;
R = B*eta;
R = B×η
How to have ChatGPT do the calculation
You are an EV charging cost calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). An EV with a 75 kWh battery is charged at home from 20% to 80%. The charging loss is 10%, the electricity rate is $0.17 per kWh, the efficiency is 3.5 mi/kWh, and the car is driven 1,000 miles a month. Find the energy into the battery with "battery size × (target % − current %) ÷ 100", the energy bought from the grid with "energy into the battery ÷ (1 − loss ÷ 100)", and the cost with "energy bought × rate". Find each of the following: 1. The energy into the battery (kWh) and the energy bought from the grid (kWh) 2. The cost of this charge ($) 3. The cost per mile ($ per mile) = rate ÷ (1 − loss ÷ 100) ÷ efficiency 4. The monthly and yearly charging cost ($) 5. The estimated range on a full charge (miles) = battery size × efficiency Show the formulas you used and the numbers from the execution result.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
