What the Calculator Compares
The calculator answers a narrow economic question: for a chosen amount of charging energy, what is the difference between paying the grid import rate and assigning that same amount of energy to solar at its opportunity cost? It does not estimate how many panels you need, how long the battery will run, or whether PV production is sufficient. Those are separate engineering questions.
The core equation is cost difference = charging energy × (grid price per kWh − solar opportunity cost per kWh). The calculator also displays the grid scenario cost and the solar scenario cost individually. A positive difference means the grid input is more expensive under the entered assumptions. A negative difference means the value you assigned to solar is higher than the grid rate, so charging from solar would not be the lower-cost choice on that basis.
Because the rate fields are unitless currency amounts per kWh, you can work in dollars, pounds, euros, rupees or another currency. Use the same currency for both rates. The result will be in that same currency.
How to Choose the Grid Price
The best grid input is normally the marginal price of consuming one additional kWh during the charging period. That may differ from the simple total-bill-divided-by-kWh average. Fixed monthly charges usually do not change because you charge the battery once more, while energy charges, time-of-use rates and some variable surcharges may change directly with consumption.
Flat-rate tariffs
With a simple flat tariff, the energy rate on the bill is often a reasonable starting point. Include variable taxes or per-kWh charges if they rise with usage. Exclude fixed fees that remain the same whether the battery charges or not.
Time-of-use tariffs
If electricity prices vary by time, use the rate for the period in which charging actually occurs. An overnight off-peak charge may be much cheaper than an evening peak charge. For automated systems, it can be useful to run the calculator once for each tariff window instead of relying on a single blended number.
Tiered or dynamic pricing
On tiered tariffs, another charging session may push consumption into a higher block, so the relevant rate can be the price of the incremental block. On dynamic or wholesale-linked tariffs, use a representative or known price for the intended interval and remember that the result can change from day to day.
How to Value Solar Energy
Solar electricity is generated without buying a kWh from the utility at the moment of production, but that does not always make its economic value zero. The right input is the value of the best alternative use you give up when the PV energy is sent into the battery.
| What would happen without battery charging? | Reasonable solar opportunity-cost input |
|---|---|
| PV would be exported for a credited price | Use the export credit per kWh, before any adjustments specific to your tariff. |
| PV would be curtailed or clipped with no compensation | Zero can be a reasonable marginal opportunity cost. |
| PV could directly serve another on-site load | Use the value of that displaced grid consumption if charging the battery would force the other load back onto the grid. |
| PV is under a contract with a specific transfer value | Use the contract-relevant value rather than assuming zero. |
This distinction is especially important on systems with net metering or export compensation. If every exported solar kWh earns nearly the same value as an imported kWh costs, storing that energy merely to use it later may offer little energy-arbitrage benefit after losses. If export compensation is much lower than the retail import price, self-consumption through the battery can have a larger spread.
Worked Example: 8 kWh of Charging Energy
Suppose you want to compare 8 kWh of source-side charging energy. The grid rate during the intended charging window is 0.25 currency units per kWh, and exported solar would otherwise earn 0.07 per kWh.
| Grid scenario | 8 × 0.25 = 2.00 |
|---|---|
| Solar opportunity-cost scenario | 8 × 0.07 = 0.56 |
| Difference | 2.00 − 0.56 = 1.44 |
Under those assumptions, allocating 8 kWh of available solar to charging carries 1.44 less immediate energy cost than buying 8 kWh from the grid. That is not the same as saying the battery saves 1.44 overall. Battery wear, conversion losses, demand charges, export rules and the timing of later discharge can affect the complete economic outcome.
If the solar would otherwise be curtailed
Set the solar opportunity cost to 0. With the same 8 kWh and a grid price of 0.25, the cost spread becomes 2.00. That represents the avoided grid purchase relative to energy that had no alternative compensated use.
If export compensation is high
If the export value rises to 0.22 while the grid rate remains 0.25, the difference falls to only 0.24 for 8 kWh. The narrow spread may be outweighed by charging and discharging losses, depending on why the stored energy will be used later.
Charging Efficiency and the Energy Boundary
The calculator deliberately keeps efficiency out of the three input fields so the comparison remains transparent. You can still include losses by converting battery-side energy into source-side energy before entering it. If you want to add 8 kWh to the battery and the charging path is 92% efficient, the required source energy is approximately 8 ÷ 0.92 = 8.70 kWh. Use 8.70 kWh for both the grid and solar scenarios.
Do not apply efficiency to only one source unless the charging paths are genuinely different. For example, an AC-coupled system may route grid charging and PV charging through different conversion stages. If those paths have materially different efficiencies, compare the source energy required by each path separately rather than forcing both into one shared kWh input.
Round-trip efficiency is a different concept. It matters when you are evaluating whether charging now and discharging later saves money. This page compares the charging-side energy cost only; it does not calculate the value of the later discharge.
When Solar Charging Is Cheaper but Still Not Available
A favorable cost spread does not guarantee that the battery can actually receive the planned solar energy. PV production changes through the day and with weather, season, shading, array orientation and inverter limits. Household loads may consume part of the solar output before any surplus reaches the battery.
For a practical schedule, compare the desired charging energy with expected surplus PV during the same period. If the array produces 10 kWh but 7 kWh is needed directly by household loads, only about 3 kWh is available before considering conversion losses and equipment limits. A calculator result based on 8 kWh of solar would then overstate what can be achieved that day.
Likewise, the battery may not accept all available PV because of state of charge, charge-current limits, temperature restrictions or inverter/charger settings. The cost formula should be applied to energy that can realistically be routed into the charging path.
Time-of-Use Arbitrage: Grid Can Sometimes Be the Better Input
Solar is not automatically the least-cost charging source in every tariff design. Consider a household with very cheap overnight grid electricity and valuable daytime export credits. If the overnight grid price is 0.10 per kWh and daytime solar can be exported for 0.15 per kWh, the calculator will show a negative grid-minus-solar difference. Economically, it may be better to buy the cheaper grid energy and export the solar, subject to the tariff rules and system objectives.
This is why the solar field is labelled opportunity cost rather than “solar price.” It represents what you sacrifice by diverting that solar kWh into the battery. In some markets that value is zero; in others it can be substantial.
Daily, Monthly and Annual Comparisons
The calculator returns a per-scenario difference for the energy quantity you enter. To extend it over time, multiply the result by the number of comparable charging events. If a typical day produces a 1.44 difference and the same conditions occur on 20 days in a month, the simple monthly spread is 28.80 currency units.
Do not automatically multiply a sunny-day result by 365. Solar surplus, tariff windows and battery state of charge vary. A better annual estimate uses monthly or seasonal charging energy and rates, then sums the periods. This also makes it easier to model winter production, summer export surpluses and changing time-of-use prices.
What This Calculator Does Not Include
This tool is intentionally a charging-energy cost comparison. A complete battery-economic model can require additional inputs that are not represented here:
- battery purchase price and expected cycle life;
- round-trip losses between charging and later discharge;
- battery degradation or cycle-related wear;
- demand charges or capacity charges;
- tax treatment, export caps or tariff-specific credits;
- solar system capital cost and maintenance;
- backup-power value, outage resilience or non-financial objectives.
Keeping these items separate is useful. It prevents a simple marginal-energy calculation from being presented as a full payback model.
Common Input Mistakes
Calling all solar energy “free”
Use zero only when the energy truly has no better compensated or productive use. If export receives a credit, that forgone credit belongs in the comparison.
Using a whole-bill average for grid charging
Fixed charges can distort the rate. Use the incremental per-kWh amount that changes when charging occurs.
Mixing battery-side and source-side kWh
Choose one measurement boundary. If the battery must receive a fixed amount of energy, adjust for charging efficiency before comparing source costs.
Ignoring tariff timing
Peak, shoulder and off-peak prices can produce very different answers. Run separate scenarios for the windows you can actually schedule.
Assuming the entire PV forecast is available to the battery
Subtract direct loads and consider export limits, curtailment and charge-power constraints before assigning solar energy to storage.
A Better Way to Use the Result
Start with the most likely charging window, then run at least three scenarios: low grid price, expected grid price and high grid price. Repeat with different solar opportunity costs if export compensation or on-site demand varies. This produces a range rather than a single number that looks more precise than the inputs justify.
For recurring decisions, record the date, charging kWh, tariff period, grid rate, solar export value and any efficiency adjustment used. Comparing those assumptions with actual meter data later can reveal whether the calculator inputs reflect how the system really operates.
If your next question is system payback rather than charging cost, move to the Solar Battery Payback Calculator. If you need to estimate how long PV will take to replace energy in the battery, use the Solar Battery Recharge Time Calculator.