How the hourly battery charging simulator calculation works
Daily totals hide the timing that decides whether a battery is useful. This simulator steps through the day one hour at a time: solar first covers the home, any surplus charges the battery, the rest is exported. When consumption exceeds solar, the battery discharges until it reaches its reserve, and the grid supplies the remainder.
Charge and discharge losses are applied separately (the round-trip efficiency is split equally), and the battery power rating and an optional inverter limit cap how fast energy can move. In “repeating day” mode the same day is run until the battery’s start-of-day charge stops changing, so the result does not depend on a lucky full battery at midnight.
Formula
- E
- stored energy (kWh)
- η_c, η_d
- charge and discharge efficiency (√ round-trip)
Worked example
- Example sunny day: 27 kWh of solar, 12.6 kWh of consumption, a 5 kWh / 2.5 kW battery with 90 % round-trip efficiency.
- As a repeating day the battery cycles once, delivering 4.27 kWh in the evening; the home still imports 2.08 kWh overnight.
- Self-sufficiency is 83.5 % and 40.9 % of the solar is used on site; 15.96 kWh is exported.
Assumptions and limitations
Assumptions
- The default hourly profiles and prices are illustrative example inputs, not data for a real home, market or location.
- Self-consumption strategy (the battery is never charged from the grid).
Limitations
- One day only — seasonal results need the digital twin or optimal size calculators.
- Hourly steps smooth out short peaks such as a kettle.
Frequently asked questions
Where can I get hourly solar data?
From your inverter app, a PVGIS hourly export, or a smart-meter export for consumption.
Why does the battery not reach 100 % self-sufficiency?
Either it is too small to cover the whole evening and night, or its power rating limits discharge during peaks.
Related calculators
Solar Battery Size Calculator
Battery capacity needed to cover evening and night use from stored solar energy.
Dynamic Tariff Battery Optimizer
Cost-minimising battery schedule for hourly prices vs simple rules.
Solar Self-Consumption Calculator
Self-consumption, self-sufficiency, grid export/import and annual bill benefit.
References and data sources
- Stand-Alone Photovoltaic Systems: A Handbook of Recommended Design Practices (SAND87-7023) — Sandia National Laboratories
- Annual Technology Baseline (ATB) — National Renewable Energy Laboratory
- Photovoltaic Geographical Information System (PVGIS) — European Commission, Joint Research Centre
Last reviewed: · Formula version 1.0.0 · Methodology