Estimating Battery Life β How to Calculate Runtime for Any Device
What It Solves
You have a battery with a certain capacity and a device that draws a certain current. How long will it run? The simple answer is capacity divided by current, but real battery life depends on discharge rate, temperature, battery age, voltage cutoff, and conversion efficiency. The battery life calculator accounts for these factors so your runtime estimate matches what you'll actually see.
The Real Problem
The basic formula β hours = amp-hours / amps β assumes the battery delivers its full rated capacity at any current. That's not true. A 2000 mAh lithium-ion cell rated at a 0.2C discharge (400 mA) might deliver 2000 mAh. Drain it at 2C (4A) and you might only get 1600 mAh. This is Peukert's law in action: higher discharge rates reduce effective capacity. For lead-acid batteries the effect is dramatic; for lithium it's smaller but still present.
Then there's the voltage question. A device doesn't run on amp-hours β it runs on watt-hours. A 12V 100Ah battery holds 1200 Wh. But if your device uses a DC-DC converter to step 12V down to 5V, the conversion efficiency is typically 80-90%. That 1200 Wh becomes 960-1080 Wh usable. A device drawing 10W at 5V actually draws about 1.04A from the 12V battery after conversion losses, not the 2A you'd calculate if you ignored the voltage conversion.
Here's a concrete example. A security camera draws 500 mA at 5V. You want to run it for 24 hours on a backup battery. Raw calculation: 500 mA x 24h = 12,000 mAh. But the camera runs on 5V, so you need a USB power bank. Power banks are rated at their cell voltage (3.7V for lithium), so a 10,000 mAh power bank at 3.7V holds 37 Wh. At 5V output with 85% efficiency, the usable energy is 31.45 Wh. Your camera draws 2.5W (5V x 0.5A). Runtime: 31.45 / 2.5 = 12.6 hours, not the 20 hours you'd get from dividing 10,000 by 500. The calculator handles this automatically when you enter the battery voltage and the device voltage separately.
How to Use It
Open the battery life calculator. Start by entering the battery capacity β in mAh or Ah, and the battery's nominal voltage. If you're using a single lithium cell, that's 3.7V. For a lead-acid battery, 12V. For a series pack, enter the pack voltage. Next, enter your device's power consumption β either in watts or in amps at the device voltage. If your device runs at a different voltage than the battery (common with USB devices on a 12V system), enter both voltages and the converter efficiency (default 85%). The calculator shows runtime in hours and minutes, plus total energy consumed and remaining capacity at the device's cutoff voltage.
Input: 100Ah, 12V, 5A load at 12V, no conversion loss, 50% depth of discharge (lead-acid).
Output: Usable capacity: 50Ah. Runtime: 10 hours. Total energy: 600 Wh.
With inverter: Same battery powering a 120V 200W load through a 90% efficient inverter.
Input: 100Ah, 12V, 200W at 120V, 90% efficiency, 50% DoD.
Output: Usable: 50Ah (600 Wh). Inverter input: 222W. Runtime: 2.7 hours.
Sizing a Battery for an Off-Grid Security System
Leah is building a solar-powered security camera system. The camera draws 8W 24/7 with occasional 15W spikes for IR LEDs at night. She has a 12V 50Ah deep-cycle battery and a solar panel that averages 30W for 5 hours a day. She uses the calculator to check the overnight runtime: 50Ah at 12V = 600 Wh. With 50% DoD usable (300 Wh), the camera draws 8W x 12 hours = 96 Wh overnight. That's 32% of usable capacity β plenty. But the IR spike scenario: if the IR runs 4 hours at 15W, that's 60 Wh, making the overnight total 156 Wh, still under 300 Wh. The calculator confirms her battery is adequately sized. Without it, she might have upsized to a 100Ah battery unnecessarily, doubling the cost.
Comparing Battery Chemistries for a Portable Project
Raj is building a portable speaker and deciding between a lithium-ion pack (3.7V, 5000 mAh) and a NiMH pack (4.8V, 3000 mAh). His amplifier draws 1.5W average. Lithium: 3.7V x 5Ah = 18.5 Wh. At 1.5W, runtime = 12.3 hours. NiMH: 4.8V x 3Ah = 14.4 Wh. Runtime = 9.6 hours. Lithium wins on runtime, but NiMH is cheaper and safer. However, the lithium pack requires a protection circuit and proper charging. The calculator lets him compare using real numbers instead of guessing which chemistry is better for his use case.
Limitations
The calculator assumes a constant discharge current. Real devices have variable power consumption β idle vs active, transmission bursts, sleep modes. For accurate runtime estimates with varying loads, you'd need to model the duty cycle: average current = (current_on x time_on + current_off x time_off) / total_time. The calculator gives you a steady-state number. For intermittent loads, run the calculation at the average current and add a 20% safety margin.
Battery age isn't factored in. A new battery delivers its rated capacity. After 500 charge cycles, a lithium battery typically has 80% of its original capacity. Lead-acid batteries degrade faster if regularly discharged below 50%. The calculator assumes a fresh battery. For aging estimates, reduce the capacity input manually based on the battery's cycle life specification.
FAQ
What's the difference between mAh and Wh?
mAh measures charge capacity; Wh measures energy capacity. Wh = mAh x voltage / 1000. A 10,000 mAh power bank at 3.7V holds 37 Wh. At 5V output, that's less than 37 Wh because of voltage conversion losses. Always use Wh for cross-chemistry comparisons.
Why does runtime differ from simple division?
Battery capacity changes with discharge rate (Peukert effect), voltage conversion losses eat energy, and most batteries shouldn't be fully discharged β lead-acid should stay above 50%, lithium above 20-30%. All these reduce actual runtime below the theoretical maximum.
How does temperature affect battery life?
Cold temperatures reduce battery capacity significantly. A lead-acid battery at 0Β°F (-18Β°C) delivers about 50% of its rated capacity. Lithium batteries lose about 20% at freezing. Heat above 40Β°C accelerates degradation permanently. The calculator doesn't model temperature, so add margin for extreme conditions.
Should I discharge a battery fully?
No. Lead-acid batteries suffer damage below 50% depth of discharge. Lithium-ion batteries have protection circuits that cut off at about 2.5-3.0V per cell (roughly 90-95% discharge), but regularly draining to zero shortens lifespan. The calculator's DoD setting lets you see usable vs total capacity.
Does wiring multiple batteries in series or parallel change runtime?
In series, voltage adds but capacity (Ah) stays the same β runtime is unchanged for the same power load because total Wh increases. In parallel, capacity adds but voltage stays the same β runtime increases proportionally. The calculator handles both configurations.
Conclusion
Use this calculator when sizing batteries for any project β portable electronics, backup power, off-grid solar, or electric vehicles. It gives realistic runtime estimates accounting for voltage conversion, depth of discharge, and efficiency losses. Don't use it without considering real-world duty cycles, temperature effects, and battery aging. For intermittent loads, calculate the average current first and add margin. For critical systems, always oversize by at least 20% and test under actual load conditions. The number on the battery label is an ideal β the calculator helps you find the practical number.
If you're also working with different battery chemistries, the kW to amps converter is useful for sizing the wiring between your battery and load.
β Back to Blog