Skip to content
HomeEnergyTools

Dynamic Tariff Battery Optimizer

Find out how much smarter battery control is worth on an hourly (dynamic) electricity tariff.

Dynamic Tariff Battery Optimizer

Changing currency changes the symbol only. Enter prices in the currency you select — no exchange rates are applied.

Enter 24 hourly prices, separated by spaces or commas. Negative prices are allowed.

Example: a dull winter day (35 % of the sunny example). Enter your own forecast or history.

Advanced settings

Results update automatically as you type. Default values are examples — replace them with your own.

Daily cost with the best schedule found

$0.61 /day

Daily cost without a battery
$2.14 /day
Daily cost with a simple self-consumption battery
$0.88 /day
Daily cost with a price-threshold rule
$1.40 /day
Extra saving vs the simple self-consumption battery
$0.27 /day
Strategy that achieved it
Optimised schedule (dynamic programming)
Saving vs no battery over a year of similar days
$557 /yr
  • Note: The optimised schedule assumes the day’s prices, solar and consumption are known in advance (perfect foresight) and is optimal only within this model (201 charge levels with continuous actions). Real controllers work with forecasts and will usually save less.
  • Note: All strategies are compared as repeating days, so none benefits from a battery that starts full.
  • Note: The yearly figure simply multiplies this day by 365 — real prices and solar change every day.

Best schedule found against the price curve

Optimised battery charge by hour (kWh of 10): 0:00 3.38, 1:00 3.12, 2:00 2.86, 3:00 2.59, 4:00 2.33, 5:00 2.05, 6:00 1.67, 7:00 1.3, 8:00 1.33, 9:00 1.76, 10:00 2.44, 11:00 3.22, 12:00 3.94, 13:00 8.52, 14:00 9.1, 15:00 9.4, 16:00 9.29, 17:00 8.59, 18:00 7.4, 19:00 6.24, 20:00 5.29, 21:00 4.55, 22:00 4.03, 23:00 3.7.

Strategy comparison for the day
StrategyNet cost per dayBattery output (kWh)Grid charging (kWh)
No battery2.1400
Self-consumption rule0.884.060
Price-threshold rule (charge ≤ 0.188, discharge ≥ 0.293)1.44.144.21
Optimised (dynamic programming)0.617.694.04

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

minimise Σ_t (import_t·p_t − export_t·p_export + wear·discharge_t)
subject to energy balance, power limits and E_min ≤ E_t ≤ E_max
repeating day: E_end ≥ E_start
p_t
import price in hour t

Worked example

  1. 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.
  2. Without a battery the day costs 2.14; a self-consumption battery brings it to 0.88; the price-threshold rule to 1.40.
  3. 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

Limitations

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

References and data sources

Last reviewed: · Formula version 1.0.0 · Methodology