Battery Size Calculator — mAh Capacity & Runtime
Find the battery capacity (mAh) your project or device needs to run for a target number of hours — or flip it around and calculate how many hours a given battery will last at a known current draw.
Calculate
mA
hours
%
Minimum capacity to power your device for the desired runtime
- 1
Depth of discharge fraction
80% ÷ 100 = 0.8 - 2
Required capacity
500 mA × 8 h ÷ 0.8 = 5,000Divide by DoD so the usable portion equals the full load requirement.
How does this calculator work?
Required battery (mAh) = Current draw (mA) × Runtime (hours) ÷ Depth-of-discharge. With 80 % DoD, a 100 mA device running 24 hours needs 3,000 mAh. Reverse the formula to get runtime from a known battery. Always add a 20–30 % real-world margin.
Formula
How this is calculated
A battery's capacity in milliampere-hours (mAh) tells you how many milliamps it can deliver for one hour. To find the capacity you need, multiply the device's average current draw (mA) by the required runtime in hours, then divide by the depth-of-discharge fraction — because running a lithium battery all the way to zero shortens its lifespan. The recommended depth of discharge is about 80 % (0.8), meaning you only use 80 % of the rated capacity and leave the remaining 20 % as a buffer.
For example, a GPS tracker drawing 100 mA that must run for 24 hours needs: 100 × 24 / 0.8 = 3,000 mAh. Flip the formula to find runtime: a 5,000 mAh power bank powering the same tracker delivers 5,000 × 0.8 / 100 = 40 hours.
Real-world current draw varies with load, temperature, radio transmissions and sleep/wake cycles. The figure entered here should be an average across the full duty cycle, not the peak draw. Add 20–30 % on top of the calculated capacity to account for measurement uncertainty, ageing, and cold temperatures, which reduce effective capacity.
Frequently asked questions
Depth of discharge (DoD) is the percentage of a battery's capacity that is used before recharging. Lithium-ion cells last many more charge cycles when not drained past 80 %, so 80 % DoD is the standard design target. Lead-acid batteries should stay above 50 % DoD for longest life.
Check the spec sheet or product label — it may list average current consumption in mA. For DIY electronics, measure with a USB power meter (for USB-powered devices) or a multimeter in series with the supply. If only wattage is listed, divide by the supply voltage: mA = (W × 1000) / V.
Batteries lose capacity with age, in cold temperatures and at high current peaks. The calculator assumes a new battery at room temperature with steady current. Add a 20–30 % design margin, or measure the actual average current with a meter to get a more accurate figure.
Also known as
TG we-Calculate Editorial Team. (2026). Battery Size Calculator — mAh Capacity & Runtime [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/battery-size-calculator
TG we-Calculate Editorial Team. "Battery Size Calculator — mAh Capacity & Runtime." TG we-Calculate. 2026. https://we-calculate.com/calculator/battery-size-calculator.
TG we-Calculate Editorial Team, "Battery Size Calculator — mAh Capacity & Runtime," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/battery-size-calculator
@misc{wecalculate_battery_size_calculator, title = {Battery Size Calculator — mAh Capacity & Runtime}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/battery-size-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
