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

Frequently Asked Questions

What is depth of discharge?

Depth of discharge (DoD) is how much of the battery capacity you use. An 80% DoD on a 10 kWh battery means you use 8 kWh. Lower DoD extends battery life.

How long do home batteries last?

Most lithium-ion home batteries are warranted for 10-15 years or 3,000-5,000 cycles. After that, they retain about 70-80% of original capacity.

Can batteries pay for themselves?

In areas with time-of-use rates, batteries can save $50-200/month by storing cheap off-peak electricity. Combined with solar, payback can be 7-12 years.

Ready to run the numbers?

Open Battery Storage Calculator