Solar Battery Sizing & Backup Planner

Choose between battery configurations by following energy through time. This solar battery sizing planner compares up to three alternatives with a no-battery baseline, using the same hourly solar production, normal demand, essential outage demand and electricity prices. Author up to 31 day scenarios, vary cloudiness and demand with explicit factors, and inspect how state of charge carries from one day to the next. Separate power limits from energy capacity, compare battery-only and compatible solar-plus-battery backup, and see grid imports, exports, curtailment, losses and unserved demand. Charts, tables and the exact CSV share one energy ledger. This is an illustrative hourly self-consumption model, not a product recommendation, site solar forecast, tariff optimizer, installation approval or annual payback estimate. Preserve a comparison of ending stored energy and service quality alongside the energy charge.

Solar • Storage • Backup

Follow your energy through the day.

Compare battery sizes against the same solar and load profile. See where power goes, what an outage leaves unserved, and how much energy remains in storage.

72 hourly intervals; 3 battery alternatives plus no-battery baseline.

Compare the complete horizon

72 hours. Energy charges exclude fixed fees and equipment costs. Unserved load has no assigned price; compare service and ending storage alongside cost.

No battery

Grid-following PV; no storage

USD 13.68

Horizon energy charge

Grid import
54 kWh
Unserved load
0 kWh
Initial → ending
0 → 0 kWh
Bill reduction
USD 0.00

5 kWh battery

5 kWh · Compatible solar + battery backup

USD 8.98

Horizon energy charge

Grid import
39.75 kWh
Unserved load
0 kWh
Initial → ending
0 → 0 kWh
Bill reduction
USD 4.70

10 kWh battery

10 kWh · Compatible solar + battery backup

USD 6.31

Horizon energy charge

Grid import
27 kWh
Unserved load
0 kWh
Initial → ending
0 → 1.579 kWh
Bill reduction
USD 7.37

15 kWh battery

15 kWh · Compatible solar + battery backup

USD 4.72

Horizon energy charge

Grid import
17.5 kWh
Unserved load
0 kWh
Initial → ending
0 → 6.579 kWh
Bill reduction
USD 8.96

Bill reduction is relative to no battery and may be negative. No battery is automatically recommended. Initial energy provenance is unknown; a short horizon can spend initial storage or finish with extra energy.

Selected grid import
39.75 kWh
5 kWh battery
Outage shortfall
0 kWh
0 modeled outage hours
Ending storage
0 kWh
Change: 0 kWh
Outage load served
Not applicable
0 entire outage hours fully served

Daily energy and storage timeline

Solar, requested load and unmet demand
kWTop: 4 kW
Solar, requested load and unmet demand — Sunny day 1 — 5 kWh batteryEach horizontal step is an hourly average, from hour 0 through 24. Hatched bands mark grid outages. Use the hour selector and ledgers for values.
0:0012:0024:00
  • Requested load
  • Potential solar
  • Unserved load
Stored energy across the day
kWhTop: 5 kWh
Stored energy across the day — Sunny day 1 — 5 kWh batteryStored-energy boundaries from hour 0 through 24. Hatched bands mark grid outages. Use the hour selector and ledgers for values.
0:0012:0024:00
  • Stored energy

Hatched bands mark outages. Power is constant within each one-hour step; the dotted marker selects an hour. Storage carries between days. Potential solar can be unavailable during outages. Lines use different patterns as well as colors.

Hour 0: 0:00–1:00 · Grid connected

Solar enabled; battery idle. Stored energy 0 → 0 kWh.

Requested load
1 kWh
Available solar
0 kWh
Direct solar to load
0 kWh
AC battery charge
0 kWh
AC battery discharge
0 kWh
Grid import
1 kWh
Grid export
0 kWh
Unserved load
0 kWh

Charge constraints: No charging attempt. Discharge constraints: stored-energy. Export cap not exceeded.

Exact hourly balance and all energy flows

Potential solar + grid import + opening storage = served load + export + curtailment + unavailable solar + charge loss + discharge loss + closing storage. Values below are exact fractions in kWh.

Normal load
1
Requested load
1
Potential solar
0
Available solar
0
Unavailable solar
0
Direct solar to load
0
AC battery charge
0
Energy stored by charging
0
Charge loss
0
AC battery discharge
0
Energy withdrawn from storage
0
Discharge loss
0
Grid import
1
Grid export
0
Curtailed solar
0
Served load
1
Unserved load
0

Opening 0; closing 0 kWh. Import 3/10; export 2/25 USD/kWh. Raw net charge 30 hundredths of USD; not rounded into the horizon bill.

Daily and hourly energy ledgers

Selected alternative: 5 kWh battery. Daily and hourly monetary values are unrounded; the horizon bill rounds import and export totals separately once. All alternatives and all fields are available in CSV.

Import energy charge
USD 12.04
Export energy credit
USD 3.06
Charge conversion loss
0.789 kWh
Discharge conversion loss
0.75 kWh
Solar curtailed
0 kWh
Solar unavailable
0 kWh
Peak hourly grid import
1 kW
Peak hourly grid export
3 kW

Solar self-use before storage losses: 46.93%. Local supply share: 44.792% (initial stored energy is not necessarily renewable). Equivalent discharge cycles of the entered usable window: 3. Peak values are hourly averages, not sub-hour utility demand measurements.

Daily totals (kWh)
DaySolar availableImportExportUnservedOpeningEnding
Sunny day 12413.2512.737000
Sunny day 22413.2512.737000
Sunny day 32413.2512.737000
Sunny day 1: hourly kWh
HourGridLoadSolar availableCharge ACDischarge ACImportExportUnservedEnding
0On10001000
1On10001000
2On10001000
3On10001000
4On10001000
5On10001000
6On10001000
7On10001000
8On10001000
9On10001000
10On14300002.85
11On142.263000.73705
12On14000305
13On14000305
14On14000305
15On14000305
16On10010003.947
17On10010002.895
18On10010001.842
19On10010000.789
20On1000.750.25000
21On10001000
22On10001000
23On10001000

Longest fully served outage run: 0 whole hours. First shortfall: none. Zero-load outage hours count as fully served. These are hourly coverage statistics, not guaranteed ride-through duration.

Your operating assumptions

Illustrative profiles, prices and battery settings are editable assumptions. Enter average AC powers after the solar inverter. No grid charging, battery export, tariff optimization, surge or installation compatibility is modeled. Numeric fields accept up to six decimals; blanks remain invalid.

24-hour solar, load and price profile

This profile repeats for each authored day. Day factors scale solar and both load columns. During outages, every alternative uses essential load. Signed import/export prices are allowed; negative export credit means a charge to export.

Fill a selected hour range
Hour 00:00–01:00
Hour 01:00–02:00
Hour 02:00–03:00
Hour 03:00–04:00
Hour 04:00–05:00
Hour 05:00–06:00
Hour 06:00–07:00
Hour 07:00–08:00
Hour 08:00–09:00
Hour 09:00–10:00
Hour 10:00–11:00
Hour 11:00–12:00
Hour 12:00–13:00
Hour 13:00–14:00
Hour 14:00–15:00
Hour 15:00–16:00
Hour 16:00–17:00
Hour 17:00–18:00
Hour 18:00–19:00
Hour 19:00–20:00
Hour 20:00–21:00
Hour 21:00–22:00
Hour 22:00–23:00
Hour 23:00–24:00
Ordered day scenarios (3)

1–31 relative 24-hour blocks. Factors 0–500%. Storage carries between blocks. Reordering days changes the solar/load sequence; outage offsets stay fixed.

Sunny day 1
Sunny day 2
Sunny day 3
Grid outage windows (0)

0–16 windows in whole horizon-hour offsets. Start is included, end excluded. Overlaps merge without double-counting. Shortening the day list does not silently shorten outages.

Battery alternatives (3)

Compare 1–3 configurations. Enter nominal internal capacity and your permitted SOC window; initial SOC must be inside it. Charge/discharge limits are AC kW. Backup operation requires compatible installed hardware and is not inferred from capacity.

5 kWh battery
10 kWh battery
15 kWh battery

How to use this calculator

  1. Start with Sunny-day comparison or Cloudy day & outage. Replace the currency label and grid export cap with your assumptions; changing the currency label performs no exchange-rate conversion.
  2. Expand the 24-hour profile. Enter normal and essential outage load, potential solar after the inverter, and import/export rates for each hour. The range-fill control changes only one selected column over a start-inclusive, end-exclusive hour range.
  3. Add or reorder day scenarios and set solar and load percentages. A 20% solar factor is an authored cloudy-day scenario, not a weather forecast. Stored energy carries across day boundaries.
  4. Add outage windows in horizon hours. For example, 32–56 means the grid is unavailable from hour 8 of day 2 until hour 8 of day 3. Overlapping windows merge.
  5. Edit up to three battery alternatives: capacity, SOC bounds and initial SOC, AC charge/discharge limits, efficiencies and declared backup capability. Use actual equipment limits and check installed-system capability independently.
  6. Compare charges, grid imports, outage shortfall and ending storage together. Inspect a day and hour, open the energy ledgers, then download the exact CSV or use its selectable fallback. Do not project short-horizon differences into annual savings or payback.

The Formula

The mathematical logic powering this calculation is:

Each profile row represents one hour of average AC power. Daily solar and load factors scale the repeated 24-hour profile; the load factor applies to both normal and essential outage demand. Stored energy carries between days. Outage intervals include their start and exclude their end, and overlapping intervals form a union.
For capacity C, Emin = C × minimum SOC / 100; Emax = C × maximum SOC / 100. Initial energy = C × initial SOC / 100. Direct solar = min(available solar, requested load). Surplus = solar − direct; deficit = load − direct. With charge efficiency ec and discharge efficiency ed expressed as fractions: AC charge = min(surplus, charge power × 1 h, (Emax − opening energy) / ec). AC discharge = min(deficit, discharge power × 1 h, (opening energy − Emin) × ed). Charge and discharge never occur together.
Closing energy = opening energy + AC charge × ec − AC discharge / ed. Charge loss = AC charge × (1 − ec); discharge loss = AC discharge / ed − AC discharge. When grid-connected, remaining deficit imports from the grid and remaining surplus exports up to the entered cap; further surplus is curtailed. During outages there is no grid import or export, and any remaining deficit is unserved.
The conventional grid-following no-battery baseline shuts PV down during an outage. No-backup battery configurations disable both PV and storage; battery-only configurations enable discharge but not PV; compatible solar-and-battery configurations enable both. Capability is authored, not inferred from capacity. Requested load during outage uses the essential-load column for every candidate.
Energy identity for each hour: potential solar + grid import + opening storage = served load + grid export + curtailed solar + unavailable solar + charge loss + discharge loss + closing storage. All physical and tariff calculations retain exact rational values.
Raw import charge = sum(import kWh × hourly import rate). Raw export credit = sum(export kWh × hourly export rate). Round each horizon total independently to hundredths of the selected currency, half away from zero; net charge = rounded import charge − rounded export credit. Negative import prices credit consumption; negative export prices charge exports. Dispatch ignores prices and may increase cost under some tariffs. Bill reduction = no-battery charge − candidate charge. Unserved demand and remaining stored energy are not assigned money values.
Load served = served / requested. Local supply = (direct solar + battery discharge) / requested; it is not necessarily renewable because initial energy provenance is unknown. Solar self-use = (direct solar + AC charge) / available solar, before storage losses. Equivalent discharge cycles = internal energy withdrawn / (Emax − Emin). Zero denominators are not applicable. Fully served outage hours count complete modeled steps with no shortfall, including zero-load steps; they are not precise ride-through duration.
Bounds: 24 ordered hourly profile rows; 1–31 relative day blocks; 0–16 outage windows; 1–3 batteries plus baseline. Profile powers and AC battery/export limits are 0–100000 kW; nominal capacity is greater than zero through 1000000 kWh. Daily factors are 0–500%; SOC is 0–100% with minimum ≤ initial ≤ maximum. Equal SOC bounds mean no usable window. Efficiencies are greater than zero through 100%. Signed prices are −1000 through 1000 currency/kWh. Enter up to six decimals and twelve significant digits; no fractions or exponent notation as input. Output fractions preserve exact values.
All time blocks are relative and fixed at 24 hours, without calendar, DST or forecasts. No grid charging, battery export, lookahead reserve, tariff optimization, annual extrapolation, capital costs, degradation, standby/self-discharge, surge/startup loads, phase/voltage model, transfer time, demand charges, net-metering banks, fixed fees or taxes. Hourly energy adequacy does not prove electrical compatibility or safe installation.

Worked Example

If you input:

  • Profile: Three identical sunny days; normal demand 1 kW, essential demand 0.5 kW. Potential solar 4 kW from 10:00 through 16:00, zero otherwise.
  • Prices: USD 0.30/kWh import, rising to 0.45 from 17:00 through 21:00; 0.08/kWh export. Grid export cap 10 kW.
  • Batteries: 5, 10 and 15 kWh; initially empty, 0–100% illustrative SOC window, 3 kW charge / 2 kW discharge, 95% efficiency each way.
  • Outages: None. Compatible solar-and-battery backup is declared for the alternatives; it does not affect this grid-connected example.

Result:

Across 72 hours, no battery imports 54 kWh and exports 54 kWh, for USD 13.68. The 5 kWh battery imports 39.75 kWh, ends empty and costs USD 8.98: a USD 4.70 bill reduction. The 10 kWh battery imports 27 kWh, ends with 30/19 kWh stored and costs USD 6.31. The 15 kWh battery imports 17.5 kWh, ends with 125/19 kWh stored and costs USD 4.72. No demand is unserved. Different ending storage matters; these three authored days are not an annual savings or payback forecast.

Frequently Asked Questions

Does this tell me the best battery size to buy?

It compares the configurations and assumptions you enter. A larger battery can leave extra energy stored, encounter the same power limit or have little solar surplus to charge it. Compare energy charges, unserved load and ending storage; equipment price, installation constraints, aging and long-term economics are outside this model.

What is the difference between kW and kWh here?

kW is average power during an hour, while kWh measures energy. A large energy capacity does not guarantee enough discharge power for a peak load. The planner enforces both AC power limits and the usable internal-energy window, including separate conversion efficiencies.

Will solar and a battery work during a grid outage?

Only when the installed system is configured for the declared backup operation. The baseline is conventional grid-following PV that shuts down during outages. Battery-only backup allows stored energy but no PV; compatible solar-and-battery backup allows both. This is a model input, not verification of your hardware.

Why can battery self-consumption increase the energy charge?

Dispatch follows energy demand without considering prices. If exporting is especially valuable or imports have a negative price, storing and later using solar can be financially worse under those entered tariffs. Conversion losses also matter. Negative export rates are charges for exporting, and negative import rates are credits.

Why show initial and ending stored energy?

A short comparison can spend initially stored energy or finish with an extra reserve. Those are different starting/ending inventories, not free recurring savings. Initial energy provenance is unknown. The planner does not annualize a few days or infer a financial payback.

How accurate are the outage coverage hours?

They describe the entered one-hour average profiles. A fully served hour has zero modeled shortfall; zero-load outage hours also count. Surge loads, transfer time and within-hour variations are not modeled, and a partially served hour is not interpolated into a guaranteed backup duration.

Can I paste a daily energy total instead of an hourly profile?

The timing of production and demand determines charge, discharge and shortfall, so a daily total alone is insufficient. Use measured or independently estimated hourly AC values. Range fill makes repeated assumptions easier but does not turn them into measured data.

What does the CSV contain?

Every input and result for all alternatives, including hourly and daily energy flows, storage losses, binding limits, raw charges and separately rounded horizon bills. Fractions retain exact precision; import the exact-value column as text. Invalid inputs disable export. A selectable fallback is available if browser download fails.

Similar Calculators