SolarBatteryBankCalc
DIY builder calculator

DIY battery pack & BMS calculator — LiFePO4 and 18650/21700

For builders assembling raw cells into a custom 12V, 24V or 48V bank — prismatic LiFePO4 (EVE, CATL) or cylindrical Li-ion 18650/21700 (DIY powerwalls, e-bike packs, salvaged laptop cells). Work out the cell configuration, pack voltage range and BMS size, the part manufacturer calculators skip because they only sell finished packs.

Building lithium packs carries real fire and safety risk — higher still with salvaged or mismatched cylindrical cells. This is a planning calculator, not a build guide. Always test and match cell capacity, top-balance, use a correctly-rated BMS with proper fusing, follow good spot-welding and insulation practice, and rely on established DIY-powerwall community safety guidance. If unsure, do not build.
prismatic ~100–320Ah; 18650 ~2.5–3.5Ah; 21700 ~4–5Ah (mAh ÷ 1000)

Prismatic LiFePO4 vs cylindrical Li-ion

The two DIY routes differ in cell voltage, which changes the series count. LiFePO4 cells are 3.2V nominal, so 12V = 4S, 24V = 8S, 48V = 16S, charging to 3.65V and cut off at 2.5V per cell. Cylindrical Li-ion (18650/21700) is 3.6V nominal, so a "12V" pack is 3S (11.1V), "24V" is 7S (25.9V) and "48V" is 13S (48.1V), charging to 4.2V and cut off near 2.8V per cell. Because each cylindrical cell holds only a few amp-hours, powerwall builders parallel many cells per group — a 13S20P pack is 260 cells.

Sizing the pack and BMS

Adding cells in parallel multiplies capacity at the same voltage; adding cells in series multiplies voltage at the same capacity. A single shared BMS protects the whole pack and must be rated for your maximum continuous load current at the pack voltage, with headroom. The calculator works the cell count, total cells, pack voltage range and a suggested BMS current from your inputs.

Building from salvaged 18650 cells

Recovered laptop and power-tool cells are a popular, cheap source for DIY powerwalls, but they vary in age and capacity. Every cell should be capacity-tested and grouped so parallel groups match, and weak or self-discharging cells discarded — a mismatched parallel group drags the whole pack down and can be dangerous. This tool plans the topology; it does not replace testing and matching each cell.

Why this isn't on manufacturer tools

Brand calculators assume a finished pack with a built-in BMS, so they hide cell count, voltage range and BMS sizing — the exact things a DIY builder needs. This tool is brand-agnostic and sells nothing; enter any cell you have.

Related

Frequently asked questions

How many 18650 cells for a 48V powerwall?

A 48V Li-ion pack uses 13 cells in series (13S, 48.1V nominal), charging to 54.6V. Capacity comes from how many cells you parallel per group: a 13S20P pack is 260 cells. The exact count depends on each cell's capacity and your target kWh.

How many LiFePO4 cells for a 24V battery?

A 24V LiFePO4 pack uses 8 cells in series (8S), giving 25.6V nominal. Add cells in parallel to increase capacity.

What's the difference between 18650 and 21700 cells?

Both are cylindrical Li-ion at 3.6V nominal, charging to 4.2V. The 21700 is physically larger and typically holds more capacity (around 4–5Ah vs 2.5–3.5Ah for an 18650), so a 21700 pack needs fewer cells for the same energy.

What size BMS do I need for a DIY battery?

Size the BMS for your maximum continuous load current at the pack voltage, plus about 25% headroom. For example, a 2000W load on a 25.6V pack draws about 78A, so a 100A BMS is appropriate.

Looking for a definition or a quick answer? See the solar & battery glossary for terms used on this page, or the FAQ for common sizing questions. For the full explanation, read the DIY LiFePO4 build guide.

Sources & standards

Educational planning only — not a build guide and not an electrical design. Lithium assembly is hazardous; test and match cells, balance, fuse and use a proper BMS, and consult qualified guidance. See the methodology.