Battery Life Calculator
Calculate battery runtime, required capacity, or maximum current draw for your electronic projects.
Battery Parameters
Average current consumption of your device
Typical: 80-90% for Li-ion, 70-80% for alkaline
Estimated Runtime
Runtime Breakdown
Energy & Power
Input Summary
Understanding Battery Capacity
Battery capacity measures how much electrical charge a battery can store and deliver. It's typically rated in milliamp-hours (mAh) or amp-hours (Ah), indicating how long a battery can supply a given current.
| Unit | Symbol | Equivalent | Common Usage |
|---|---|---|---|
| Milliamp-hour | mAh | 0.001 Ah | Small batteries, phones, IoT devices |
| Amp-hour | Ah | 1000 mAh | Larger batteries, cars, UPS systems |
| Watt-hour | Wh | V × Ah | Energy capacity (accounts for voltage) |
| Kilowatt-hour | kWh | 1000 Wh | EVs, home batteries, grid storage |
Important: mAh only tells part of the story. A 1000mAh battery at 3.7V stores 3.7Wh, while a 1000mAh battery at 12V stores 12Wh—over 3× more energy!
Basic Battery Life Formula
Where:
- mAh= Battery capacity in milliamp-hours
- mA= Device current consumption in milliamps
Common Battery Types and Characteristics
Different battery chemistries have unique characteristics affecting capacity, voltage, and performance.
| Battery Type | Nominal Voltage | Energy Density | Cycle Life | Self-Discharge |
|---|---|---|---|---|
| Alkaline (AA) | 1.5V | ~130 Wh/kg | N/A (primary) | ~2%/year |
| NiMH (AA) | 1.2V | ~90 Wh/kg | 500-1000 cycles | ~20%/month |
| Li-Ion (18650) | 3.7V | ~250 Wh/kg | 500-1500 cycles | ~2%/month |
| LiPo | 3.7V | ~200 Wh/kg | 300-500 cycles | ~5%/month |
| LiFePO4 | 3.2V | ~120 Wh/kg | 2000-5000 cycles | ~3%/month |
| Lead-Acid (12V) | 12V (6 cells) | ~35 Wh/kg | 200-500 cycles | ~4%/month |
Note: Actual capacity varies with discharge rate, temperature, and age. Manufacturers typically rate capacity at low discharge rates (C/20).
Practical Runtime Calculations
Real-world runtime is affected by several factors. Apply correction factors for accurate estimates.
| Factor | Effect on Runtime | Typical Adjustment | Notes |
|---|---|---|---|
| Efficiency Losses | DC-DC conversion, regulators | ×0.80 to ×0.95 | Switching regulators are more efficient |
| Battery Age | Capacity degradation | ×0.70 to ×1.0 | Li-Ion loses ~20% after 500 cycles |
| Temperature (Cold) | Reduced capacity | ×0.50 to ×0.90 | Severe below 0°C |
| Temperature (Hot) | Faster degradation | ×0.90 to ×1.0 | Shortens overall lifespan |
| High Discharge Rate | Peukert effect (lead-acid) | ×0.60 to ×0.90 | Less impact on Li-Ion |
| Cutoff Voltage | Unusable capacity | ×0.85 to ×0.95 | Don't discharge Li-Ion below 3.0V |
Practical Runtime Formula
Where:
- 0.7= Combined typical derating factor (70%)
- Efficiency= Power conversion efficiency (0.8-0.95)
Estimating Device Current Consumption
Many devices have variable current draw depending on operating mode. Estimate average consumption for runtime calculations.
| Device/Mode | Typical Current | Duty Cycle | Average Current Example |
|---|---|---|---|
| Microcontroller (active) | 5-50mA | Variable | Depends on code execution |
| Microcontroller (sleep) | 1-100µA | Often 90%+ | Critical for battery life |
| WiFi Module (transmit) | 150-400mA | 5-20% | 30-80mA average with sleep |
| BLE Module (advertising) | 5-15mA peak | <1% | <0.1mA average |
| GPS Module (acquiring) | 30-50mA | Variable | Use AGPS to reduce |
| LED (typical) | 10-20mA | Variable | PWM dimming saves power |
| Motor (small DC) | 100-500mA | Variable | Varies with load |
Average current formula: I_avg = (I_active × t_active + I_sleep × t_sleep) / t_total
Average Current with Duty Cycle
Where:
- D= Duty cycle as decimal (e.g., 10% = 0.1)
- I_active= Current during active operation
- I_sleep= Current during sleep mode
Battery Sizing for Projects
Selecting the right battery requires balancing capacity, size, weight, and cost against runtime requirements.
| Step | Calculation | Example |
|---|---|---|
| 1. Determine average current | Measure or estimate I_avg | 50mA average |
| 2. Define required runtime | Hours of operation needed | 24 hours minimum |
| 3. Calculate base capacity | I_avg × Runtime | 50mA × 24h = 1200mAh |
| 4. Apply safety factor | Base × 1.2 to 1.5 | 1200 × 1.3 = 1560mAh |
| 5. Apply efficiency derating | Adjusted ÷ efficiency | 1560 ÷ 0.85 = 1835mAh |
| 6. Select battery | Next standard size up | Use 2000mAh battery |
Tip: For critical applications, size for end-of-life capacity (typically 80% of new) rather than new battery capacity.
Peukert Effect and Discharge Rates
The Peukert effect describes how battery capacity decreases at higher discharge rates, particularly significant for lead-acid batteries.
| Battery Type | Peukert Exponent (k) | Effect at 2C Discharge | Practical Impact |
|---|---|---|---|
| Li-Ion/LiPo | 1.0 - 1.1 | ~90-95% of rated capacity | Minimal effect |
| NiMH | 1.1 - 1.2 | ~85-90% of rated capacity | Small effect |
| Lead-Acid (AGM) | 1.1 - 1.3 | ~70-80% of rated capacity | Moderate effect |
| Lead-Acid (Flooded) | 1.2 - 1.4 | ~60-70% of rated capacity | Significant effect |
| Lead-Acid (Golf Cart) | 1.3 - 1.5 | ~50-60% of rated capacity | Major effect |
Peukert Equation
Where:
- k= Peukert exponent (1.0 = ideal, higher = more capacity loss)
- C= Rated capacity at C/20 rate
Extending Battery Runtime
Maximize runtime through efficient power management techniques.
| Technique | Potential Savings | Implementation | Trade-off |
|---|---|---|---|
| Sleep modes | 90-99% | MCU deep sleep between tasks | Wake-up latency |
| Lower clock speed | 20-50% | Run at minimum required frequency | Processing speed |
| Lower voltage | 10-30% | Use lowest operating voltage | Noise immunity |
| Disable unused peripherals | 5-20% | Turn off ADC, timers, radios | Wake-up time |
| Efficient regulators | 5-15% | Use switching vs. linear | Noise, cost |
| Reduce transmit power | 30-70% | Lower RF output power | Range reduction |
| Batch operations | 20-50% | Collect data, transmit in bursts | Latency |
Key insight: For IoT devices, the radio typically dominates power consumption. Minimizing transmit time has the biggest impact.
Worked Examples
Basic Battery Life Calculation
Problem:
A device draws 25mA continuously from a 2000mAh Li-Ion battery. Estimate practical runtime.
Solution Steps:
- 1Identify values: Capacity = 2000mAh, Current = 25mA
- 2Calculate ideal runtime: 2000mAh / 25mA = 80 hours
- 3Apply practical derating factors:
- 4 - Regulator efficiency: ×0.90 (buck converter)
- 5 - Battery age/cutoff: ×0.85 (conservative)
- 6Combined factor: 0.90 × 0.85 = 0.765
- 7Practical runtime: 80h × 0.765 = 61.2 hours
- 8Alternative: Use simple 70% rule: 80h × 0.7 = 56 hours
Result:
Expect approximately 56-61 hours of practical runtime
IoT Sensor with Sleep Mode
Problem:
An IoT sensor wakes for 100ms every 10 seconds, drawing 30mA active and 10µA asleep. Calculate runtime from a 1000mAh battery.
Solution Steps:
- 1Calculate duty cycle: 100ms / 10,000ms = 0.01 (1%)
- 2Calculate average current:
- 3 I_avg = (30mA × 0.01) + (0.010mA × 0.99)
- 4 I_avg = 0.30mA + 0.0099mA = 0.31mA
- 5Calculate ideal runtime: 1000mAh / 0.31mA = 3226 hours = 134 days
- 6Apply 70% derating: 3226 × 0.7 = 2258 hours = 94 days
- 7Note: Self-discharge (~2%/month) will also reduce this over such long periods
- 8Account for self-discharge: ~90 days practical
Result:
Approximately 90 days (3 months) battery life with sleep optimization
Battery Sizing for UPS
Problem:
Size a lead-acid battery for a 50W load requiring 2 hours backup. The inverter is 85% efficient, battery is 12V.
Solution Steps:
- 1Calculate current from battery: P_battery = P_load / efficiency
- 2P_battery = 50W / 0.85 = 58.8W from battery
- 3Current draw: I = P / V = 58.8W / 12V = 4.9A
- 4Base capacity needed: 4.9A × 2h = 9.8Ah
- 5Apply Peukert correction (high discharge): ×1.3
- 6Adjusted capacity: 9.8Ah × 1.3 = 12.74Ah
- 7Apply 50% DoD limit (for longevity): 12.74Ah / 0.5 = 25.5Ah
- 8Select standard battery: 26Ah or 33Ah 12V SLA
- 9With 33Ah battery, actual DoD = 12.74/33 = 39% (good for cycle life)
Result:
Use a 33Ah 12V lead-acid battery for 2+ hours backup with good cycle life
Tips & Best Practices
- ✓Use the 70% rule for quick estimates: multiply ideal runtime by 0.7 to account for real-world losses.
- ✓Measure actual current consumption rather than relying on datasheets—real circuits often draw more than expected.
- ✓For battery-powered projects, put the MCU in deep sleep whenever possible—it's often 100-1000× lower current than active mode.
- ✓When comparing batteries, use Wh (Watt-hours) instead of mAh to account for different voltages.
- ✓For critical applications, size batteries based on end-of-life capacity (typically 80% of rated) rather than new capacity.
- ✓Keep batteries at moderate temperatures (15-25°C) during use and storage for maximum lifespan.
- ✓For lead-acid batteries, limit depth of discharge to 50% for good cycle life; 80% DoD dramatically shortens lifespan.
Frequently Asked Questions
Sources & References
Last updated: 2026-01-22