Battery Storage Calculator Formula

Understand the math behind the battery storage calculator. Each variable explained with a worked example.

Formulas Used

Required Battery Capacity

battery_kwh = total_capacity

Usable Capacity

usable = usable_kwh

Estimated System Cost

system_cost = total_capacity * cost_per_kwh

Tesla Powerwalls Equivalent

num_powerwalls = ceil(total_capacity / 13.5)

Variables

VariableDescriptionDefault
daily_kwhDaily Energy Requirement(kWh)30
backup_daysBackup Duration(days)1
dodDepth of Discharge(%)80
cost_per_kwhBattery Cost(USD/kWh)500
usable_kwhDerived value= daily_kwh * backup_dayscalculated
total_capacityDerived value= usable_kwh / (dod / 100)calculated

How It Works

How to Size Battery Storage

Battery systems are sized based on energy needs and desired backup duration.

Formula

Usable Capacity = Daily kWh * Backup Days

Total Capacity = Usable / Depth of Discharge

Depth of discharge (DoD) limits how much battery capacity you actually use. Most lithium batteries recommend 80-90% DoD to maximize lifespan.

Worked Example

A home needing 30 kWh/day with 1 day backup at 80% DoD and $500/kWh battery cost.

daily_kwh = 30backup_days = 1dod = 80cost_per_kwh = 500
  1. 01Usable capacity: 30 * 1 = 30 kWh
  2. 02Total capacity: 30 / 0.80 = 37.5 kWh
  3. 03System cost: 37.5 * $500 = $18,750
  4. 04Powerwalls needed: ceil(37.5 / 13.5) = 3 units

Ready to run the numbers?

Open Battery Storage Calculator