Battery Calculator Widget for Your Website

For solar installers, inverter sellers, e-bike builders and off-grid blogs: work out how long a battery lasts, how to build a pack and what bank a system needs, with the working shown.

Live preview

What your readers can do with it

"How long will my battery last?" is the question every inverter shop and solar forum hears, and the honest answer depends on things most quick calculators skip: depth of discharge, inverter losses and, for lead-acid, the Peukert effect. The battery calculator takes all three into account and has four tabs:

Where it fits

A shop selling inverter batteries can put it on each product page, so buyers test their own load against the capacity before ordering. In places with regular power cuts, the appliance list is the useful part: fans, lights, a router and a TV, each with their hours. An e-bike or DIY power wall blog can open it on the Pack design tab beside a build guide.

Suggested size

The default frame is 1,000 px high and up to 960 px wide, which holds the inputs, the result cards, the battery gauge and the first steps of the working. That is enough for every tab on a laptop. On a phone the inputs and results stack to about 1,600 px, so the working scrolls inside the frame; raise the height if most of your readers come from mobile.

Open it on an e-bike pack

This link opens the Pack design tab for a 48 V, 12 Ah pack built from 18650 cells:

https://widemath.com/embed/battery-calculator/?tab=pack&cell=18650&tv=48&tc=12&tcu=Ah

Open it in a new tab

The widget lays it out as 13S4P: 52 cells, 46.8 V nominal, 54.6 V at full charge, 12 Ah and 561.6 Wh. It also lists 12S and 14S as alternatives, with a reminder to match the series count to the charger and controller. For a runtime page, a link such as ?tab=runtime&cap=150&v=12&load=300 works the same way.

Add it in three steps

  1. Load the pack or keep the runtime example, then press Copy embed code.
  2. Paste it into a Custom HTML block in WordPress, an Embed HTML element in Wix or a Code block in Squarespace.
  3. Tell readers which tab to use for their question, since runtime and bank sizing answer different ones.

Frequently asked questions

Does the runtime include inverter losses?

Yes. For an AC load the widget divides by the inverter efficiency (85% by default), so a 300 W load draws about 353 W from the battery. A DC load skips that step.

What is the Peukert option for?

Lead-acid batteries deliver less than their rated capacity at high current. Ticking Peukert correction applies the exponent and rated hours, which shortens the runtime for heavy loads. Lithium batteries barely show the effect.

Can readers rely on it to install a system?

It is for design and study. Installation must follow the local electrical code and be done by a qualified electrician, and real capacity falls with age, cold and high current. A note at the bottom of the widget says the same.

The WideMath team

Anuj Paudel, Ashish Pandey and Jhalak Prasad Pandey, Nepal

We build WideMath's free calculators and the widgets that put them on other sites. Every ready-made problem on this page was opened in the widget and checked before it was published. Something not working in your widget? Tell us at [email protected].