How the dynamic tariff battery optimizer calculation works
On a dynamic tariff the price changes every hour. A battery can then save money not only by storing surplus solar, but also by charging from the grid in cheap hours and covering expensive ones.
The calculator compares four cases for the same day: no battery, a simple self-consumption battery, a price-threshold rule (charge below the 25th percentile price, discharge above the 75th), and a schedule optimised by dynamic programming with knowledge of the whole day. If a simple rule turns out as good as the optimiser on your inputs, the result says so.
Formula
- p_t
- import price in hour t
Worked example
- Example: a dull winter day (about 9.5 kWh of solar), 12.6 kWh of use, the example price curve, 10 kWh / 5 kW battery, export paid 0.05.
- Without a battery the day costs 2.14; a self-consumption battery brings it to 0.88; the price-threshold rule to 1.40.
- The optimised schedule tops the battery up from the grid in the cheapest midday hour (0.15) and then covers the evening peak and the night from storage, costing 0.61 — 0.27 less than the simple battery.
Assumptions and limitations
Assumptions
- The default hourly profiles and prices are illustrative example inputs, not data for a real home, market or location.
- Perfect foresight of prices, solar and consumption for the day.
Limitations
- Real controllers use forecasts and save less.
- Taxes and fees that differ for grid-charged energy are not modelled.
Frequently asked questions
Should I charge my battery from the grid?
Only when the price difference between cheap and expensive hours exceeds the round-trip losses and wear cost.
Is the optimiser globally optimal?
It is optimal for this simplified one-day model on its charge-level grid with perfect foresight — not for a real system with uncertain forecasts.
Related calculators
Battery Energy Arbitrage Calculator
Profit from buying cheap and selling dear, with an optimised schedule.
Hourly Battery Charging Simulator
Hour-by-hour solar, battery and grid flows for a day you enter.
Dynamic Electricity Tariff Calculator
Your daily cost on hourly prices vs a fixed price, and the value of shifting.
References and data sources
- Dynamic programming — Wikipedia
- Time-based pricing — Wikipedia
- Grid energy storage (load following, peak shaving and arbitrage) — Wikipedia
Last reviewed: · Formula version 1.0.0 · Methodology