Please enter valid battery capacity and device power consumption.
Formulas & Mathematical Logic
Battery capacity is converted to mAh.
Device current is converted to mA.
Battery life in hours = Battery Capacity in mAh / Device Power Consumption in mA
Days = Hours / 24
Weeks = Hours / 168
Months = Hours / 730
Years = Hours / 8760
Battery indicator percent = Runtime hours, capped at 100%. So 100 hours = 100% full.
Step-by-Step Example
Example: Battery capacity = 5000 mAh and device current = 250 mA.
Step 1: Capacity is already in mAh, so capacity = 5000 mAh.
Step 2: Current is already in mA, so current = 250 mA.
Step 3: Battery life = 5000 / 250 = 20 hours.
Step 4: In days, runtime = 20 / 24 = 0.833 days.
Step 5: Battery indicator displays 20% because the visual scale treats 100 hours as 100%.
About This Calculator
Estimate battery backup time for electronics, sensors, lights, motors and DC devices.
The CalcBoy Battery Life Calculator estimates runtime from battery capacity and device current draw using the standard capacity divided by current method.
Battery runtime is one of the most common checks in electronics design and repair. Whether you are testing an IoT sensor, LED strip, power bank load, small fan, relay module, Arduino project, ESP32 board or DC backup system, the basic question is the same: how many hours will the battery last? This calculator answers that quickly using capacity in mAh or Ah and load current in mA or A.
The calculation is simple, but real-world battery life can be lower. Battery chemistry, cutoff voltage, age, temperature, discharge rate, converter efficiency, cable loss and device current spikes all affect actual runtime. For example, a 5000 mAh battery powering a 250 mA load gives 20 hours ideally, but a boost converter or cold battery can reduce useful time.
Use this tool for early planning, rough backup estimates, project sizing and troubleshooting. For final product design, add safety margin and test the real load because many devices do not consume constant current.
Best UseBattery backup and DC runtime estimation.
Supported InputsBattery capacity in mAh/Ah and current in mA/A.
Helpful ForIoT, Arduino, ESP32, LED, fan, power bank and sensor projects.
Design ReminderReal runtime is usually lower than ideal calculation.
Tip: For better accuracy, measure actual device current with a multimeter because sleep mode, startup current and peak load can change runtime a lot.
Frequently Asked Questions
How do I calculate battery life?
Battery life in hours is calculated by dividing battery capacity in mAh by device current in mA.
What is the formula for battery runtime?
Runtime hours = battery capacity in mAh / load current in mA.
Is Ah the same as mAh?
1 Ah equals 1000 mAh. For example, 5 Ah is the same as 5000 mAh.
Why is real battery life lower than calculated?
Real runtime can be lower because of battery age, temperature, voltage cutoff, converter loss, internal resistance and changing load current.
Can I use this for power banks?
Yes, but power banks have conversion losses, so actual usable runtime may be lower than the ideal result.
What does the battery indicator mean?
The indicator uses a simple 100-hour visual scale. 100 hours shows 100%, 50 hours shows 50%, and 20 hours shows 20%.