Battery Life Calculator

Calculate battery runtime, required capacity, or maximum current draw for your electronic projects.

Battery Parameters

Runtime (h) = Capacity (mAh) / Current (mA)

Average current consumption of your device

Typical: 80-90% for Li-ion, 70-80% for alkaline

Estimated Runtime

17.0 hours
17.00 hours total

Runtime Breakdown

Days0.71
Hours17.00
Minutes1020

Energy & Power

Energy Capacity7.40 Wh
Power Consumption0.370 W
Discharge Rate (C)0.05C

Input Summary

Voltage3.7V
Efficiency85%

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.

UnitSymbolEquivalentCommon Usage
Milliamp-hourmAh0.001 AhSmall batteries, phones, IoT devices
Amp-hourAh1000 mAhLarger batteries, cars, UPS systems
Watt-hourWhV × AhEnergy capacity (accounts for voltage)
Kilowatt-hourkWh1000 WhEVs, 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

Runtime (hours) = Battery Capacity (mAh) / Load Current (mA)

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 TypeNominal VoltageEnergy DensityCycle LifeSelf-Discharge
Alkaline (AA)1.5V~130 Wh/kgN/A (primary)~2%/year
NiMH (AA)1.2V~90 Wh/kg500-1000 cycles~20%/month
Li-Ion (18650)3.7V~250 Wh/kg500-1500 cycles~2%/month
LiPo3.7V~200 Wh/kg300-500 cycles~5%/month
LiFePO43.2V~120 Wh/kg2000-5000 cycles~3%/month
Lead-Acid (12V)12V (6 cells)~35 Wh/kg200-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.

FactorEffect on RuntimeTypical AdjustmentNotes
Efficiency LossesDC-DC conversion, regulators×0.80 to ×0.95Switching regulators are more efficient
Battery AgeCapacity degradation×0.70 to ×1.0Li-Ion loses ~20% after 500 cycles
Temperature (Cold)Reduced capacity×0.50 to ×0.90Severe below 0°C
Temperature (Hot)Faster degradation×0.90 to ×1.0Shortens overall lifespan
High Discharge RatePeukert effect (lead-acid)×0.60 to ×0.90Less impact on Li-Ion
Cutoff VoltageUnusable capacity×0.85 to ×0.95Don't discharge Li-Ion below 3.0V

Practical Runtime Formula

Runtime = (Capacity × Efficiency × Age Factor) / Current Typical: Runtime = Capacity × 0.7 / Current

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/ModeTypical CurrentDuty CycleAverage Current Example
Microcontroller (active)5-50mAVariableDepends on code execution
Microcontroller (sleep)1-100µAOften 90%+Critical for battery life
WiFi Module (transmit)150-400mA5-20%30-80mA average with sleep
BLE Module (advertising)5-15mA peak<1%<0.1mA average
GPS Module (acquiring)30-50mAVariableUse AGPS to reduce
LED (typical)10-20mAVariablePWM dimming saves power
Motor (small DC)100-500mAVariableVaries with load

Average current formula: I_avg = (I_active × t_active + I_sleep × t_sleep) / t_total

Average Current with Duty Cycle

I_avg = I_active × D + I_sleep × (1 - D) where D = duty cycle (0 to 1)

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.

StepCalculationExample
1. Determine average currentMeasure or estimate I_avg50mA average
2. Define required runtimeHours of operation needed24 hours minimum
3. Calculate base capacityI_avg × Runtime50mA × 24h = 1200mAh
4. Apply safety factorBase × 1.2 to 1.51200 × 1.3 = 1560mAh
5. Apply efficiency deratingAdjusted ÷ efficiency1560 ÷ 0.85 = 1835mAh
6. Select batteryNext standard size upUse 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 TypePeukert Exponent (k)Effect at 2C DischargePractical Impact
Li-Ion/LiPo1.0 - 1.1~90-95% of rated capacityMinimal effect
NiMH1.1 - 1.2~85-90% of rated capacitySmall effect
Lead-Acid (AGM)1.1 - 1.3~70-80% of rated capacityModerate effect
Lead-Acid (Flooded)1.2 - 1.4~60-70% of rated capacitySignificant effect
Lead-Acid (Golf Cart)1.3 - 1.5~50-60% of rated capacityMajor effect

Peukert Equation

t = C / I^k where t = runtime, C = rated capacity at standard rate, I = actual discharge current, k = Peukert exponent

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.

TechniquePotential SavingsImplementationTrade-off
Sleep modes90-99%MCU deep sleep between tasksWake-up latency
Lower clock speed20-50%Run at minimum required frequencyProcessing speed
Lower voltage10-30%Use lowest operating voltageNoise immunity
Disable unused peripherals5-20%Turn off ADC, timers, radiosWake-up time
Efficient regulators5-15%Use switching vs. linearNoise, cost
Reduce transmit power30-70%Lower RF output powerRange reduction
Batch operations20-50%Collect data, transmit in burstsLatency

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:

  1. 1Identify values: Capacity = 2000mAh, Current = 25mA
  2. 2Calculate ideal runtime: 2000mAh / 25mA = 80 hours
  3. 3Apply practical derating factors:
  4. 4 - Regulator efficiency: ×0.90 (buck converter)
  5. 5 - Battery age/cutoff: ×0.85 (conservative)
  6. 6Combined factor: 0.90 × 0.85 = 0.765
  7. 7Practical runtime: 80h × 0.765 = 61.2 hours
  8. 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:

  1. 1Calculate duty cycle: 100ms / 10,000ms = 0.01 (1%)
  2. 2Calculate average current:
  3. 3 I_avg = (30mA × 0.01) + (0.010mA × 0.99)
  4. 4 I_avg = 0.30mA + 0.0099mA = 0.31mA
  5. 5Calculate ideal runtime: 1000mAh / 0.31mA = 3226 hours = 134 days
  6. 6Apply 70% derating: 3226 × 0.7 = 2258 hours = 94 days
  7. 7Note: Self-discharge (~2%/month) will also reduce this over such long periods
  8. 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:

  1. 1Calculate current from battery: P_battery = P_load / efficiency
  2. 2P_battery = 50W / 0.85 = 58.8W from battery
  3. 3Current draw: I = P / V = 58.8W / 12V = 4.9A
  4. 4Base capacity needed: 4.9A × 2h = 9.8Ah
  5. 5Apply Peukert correction (high discharge): ×1.3
  6. 6Adjusted capacity: 9.8Ah × 1.3 = 12.74Ah
  7. 7Apply 50% DoD limit (for longevity): 12.74Ah / 0.5 = 25.5Ah
  8. 8Select standard battery: 26Ah or 33Ah 12V SLA
  9. 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

Several factors reduce actual runtime below theoretical: (1) Regulator/converter efficiency losses (5-20%), (2) Battery capacity is rated at ideal conditions (C/20 rate, 25°C), (3) You may not discharge to the cutoff voltage safely, (4) Battery age reduces capacity (20-30% after a few hundred cycles), (5) Cold temperatures significantly reduce capacity, (6) The device may draw more current than expected (startup surges, peak loads). Apply a combined 70% factor for conservative estimates, or measure actual current consumption with a multimeter.
mAh (milliamp-hours) measures charge capacity—how long a battery can deliver a given current. Wh (Watt-hours) measures energy capacity—total energy stored. Wh = mAh × V / 1000. Wh is more useful for comparing batteries at different voltages. Example: A 3000mAh phone battery at 3.7V stores 11.1Wh. A 3000mAh power bank at 3.7V also stores 11.1Wh, but at 5V output, effective capacity is 11.1Wh / 5V = 2220mAh due to conversion losses plus the voltage difference. Airlines limit lithium batteries to 100Wh for carry-on because energy (Wh), not charge (mAh), determines potential hazard.
Temperature: Cold temperatures slow the chemical reactions, reducing available capacity. At 0°C, expect 70-80% of rated capacity; at -20°C, possibly only 40-50%. Hot temperatures increase internal resistance and accelerate degradation, reducing lifespan. Discharge Rate: Higher currents cause more internal losses. For lead-acid batteries, the Peukert effect is significant—at 2C discharge, you might only get 60% of rated capacity. Li-Ion batteries are less affected but still lose 5-10% at high discharge rates. Always check the battery datasheet for capacity curves at different temperatures and rates.
Several methods: (1) Multimeter in series: Connect meter in current mode between battery and device. Good for DC, steady loads. (2) Current sense resistor: Insert a low-value resistor (0.1-1Ω) and measure voltage across it; I = V/R. (3) USB power meter: For USB-powered devices, shows voltage, current, and cumulative energy. (4) Current probe (clamp meter): Non-invasive but less accurate for low currents. (5) Specialized tools: USB Current Probe, INA219 current sensor module, or oscilloscope with current probe for seeing transients. For accurate averages with varying loads, measure over a full duty cycle or use a tool that integrates over time.
Consider: Cost—Rechargeables have higher upfront cost but lower per-cycle cost after 20-50 uses. Convenience—Disposables don't need charging; rechargeables need a charger and time. Self-discharge—Disposables last years in storage; standard NiMH lose 20%/month (LSD NiMH ~1%/month). Capacity—AA disposables: 2500-3000mAh; NiMH: 1900-2800mAh. Environment—Rechargeables are greener if used >20 times. Voltage—Alkaline: 1.5V dropping to 0.9V; NiMH: steady 1.2V. For high-drain devices used frequently, rechargeables win. For emergency/backup applications, low self-discharge NiMH or lithium primary batteries are better.
For longest life: (1) Avoid full discharges—stop at 20% for Li-Ion, (2) Don't store fully charged—keep Li-Ion at 40-60% for long storage, (3) Avoid heat—don't leave in hot cars or charging in direct sun, (4) Use appropriate chargers—don't fast-charge unless needed, (5) For lead-acid: never leave discharged (sulfation), avoid deep discharge below 50%, keep terminals clean, (6) For Li-Ion: avoid below 3.0V, limit charging to 4.1V instead of 4.2V for 2× cycle life at cost of 10% capacity, (7) Use smart chargers that terminate properly and offer storage/maintenance modes.

Sources & References

Last updated: 2026-01-22