databit.me

October 9, 2026 · 6 min read

How to Calculate Battery Life for Your IoT Project

BatteryIoTLow powerMeasurement

Will your sensor node last a month, a year, or a weekend? You can answer that in ten minutes with a pencil, as long as you know which numbers to use. Or skip the arithmetic and use the battery life calculator. This guide shows the method it uses, so you can trust the answer and spot where a design goes wrong.

Ad space · top

Step 1: find your two currents

Almost every battery device has two states. Active is when the processor and radio are running; sleep is when everything possible is off. Write down the current in each state, and how long each lasts.

  • Active current (Iactive): measure it, or take a rough figure. A Wi-Fi ESP32 transmitting pulls roughly 100 to 300 mA in bursts, and averages perhaps 80 mA over a short wake-up.
  • Sleep current (Isleep): the whole board with the sensor, not the chip alone. See Best Microcontroller for Battery-Powered Projects for why the two differ.
  • Active time (tactive): how long you stay awake per cycle, including boot, sensor warm-up and Wi-Fi connect.
  • Sleep time (tsleep): the rest of the interval.

Step 2: the duty-cycle formula

Keep the units consistent: milliamps with seconds, and convert microamps to milliamps (15 µA = 0.015 mA). Tiny sleep currents still matter, because they last for nearly all of the time.

Step 3: a worked example

A 2000 mAh LiPo powers a sensor that wakes every 10 minutes, stays active for 2 seconds at 80 mA, then sleeps at 15 µA.

  1. Cycle: 10 min = 600 s. Sleep time = 600 - 2 = 598 s.
  2. Active charge: 80 mA x 2 s = 160 mA-s.
  3. Sleep charge: 0.015 mA x 598 s = 8.97 mA-s.
  4. Average current: (160 + 8.97) / 600 = 0.2816 mA.
  5. Ideal life: 2000 mAh / 0.2816 mA = 7,102 hours, which is about 296 days.
  6. Derated to 80 percent usable capacity (1600 mAh): 1600 / 0.2816 = 5,681 hours, about 237 days.

Notice that active time contributes about 95 percent of the energy even though the board sleeps 99.7 percent of the time. That is why shortening wake time pays off more than shaving microamps from sleep.

Step 4: derate like a realist

The label capacity is a best case. Real life takes some of it away:

  • Usable capacity: assume 70 to 85 percent. The battery cannot be drained to zero without damage, and the regulator stops working at its cutoff voltage (a LiPo is considered empty at roughly 3.0 to 3.3 V).
  • Temperature: cold cuts capacity a lot. Below freezing, expect substantially less, and some cells cannot be used at all.
  • Self-discharge: a LiPo loses a few percent per month. Over a year, that is real capacity.
  • Regulator efficiency: a linear regulator wastes the voltage difference as heat. A buck converter wastes some energy too, especially at light loads.
  • Battery age: capacity fades after a few hundred cycles.
Ad space · inline

Step 5: see how interval changes everything

Using the same board (80 mA for 2 s, 15 µA sleep, 2000 mAh) and an 80 percent usable capacity, here is what the reporting interval does.

IntervalAverage currentIdeal lifeDerated life (80%)
1 minute2.68 mA31 days25 days
5 minutes0.548 mA152 days122 days
10 minutes0.282 mA296 days237 days
15 minutes0.193 mA432 days346 days
30 minutes0.104 mA802 days642 days
60 minutes0.059 mA1,402 days1,122 days

Returns diminish. Going from one minute to ten extends life by almost ten times, but from thirty minutes to an hour gains a year while the cell is ageing anyway. Pick the interval your project needs, not the longest one.

How to measure real current

Estimates get you started; measurement tells the truth. A multimeter in series is fine for steady sleep current, but it is too slow to catch a 50 ms radio burst, and its internal shunt can cause the board to brown out. Better options:

  • Shunt resistor and oscilloscope. Put a small resistor (for example 1 to 10 ohms) in the supply line and measure the voltage across it. Use the Ohm's law calculator to turn volts into milliamps.
  • Nordic Power Profiler Kit II (PPK2). Inexpensive and very good for microamps to amps, with a long capture.
  • INA219 or INA226 breakout. Cheap and good for logging, but sample rates are limited, so it can miss short peaks.
  • Joulescope. The premium choice, with a wide dynamic range and fast sampling.

Common traps

  • Radio retries. A weak signal makes Wi-Fi or BLE retransmit, so one failed upload can cost ten times the usual energy. Always cap retries and sleep anyway.
  • Wi-Fi reconnect time. Connecting with DHCP can take several seconds. A static IP and saved channel can cut this to a fraction.
  • LEDs. A power LED at 1 mA is more than 60 times a 15 µA sleep budget. Remove it.
  • Pull-ups and dividers. A 10 kilohm pull-up held low wastes about 0.33 mA at 3.3 V. Use higher values or switch them off.
  • Sensor leakage. Some sensors and modules draw hundreds of microamps when idle. Check their sleep modes or switch them with a MOSFET.
  • Wire and connector losses. For high-current loads like motors, thin wire adds waste. See the wire gauge calculator.

A single bad choice shows up fast. Adding a 1 mA LED to the example above raises the average to 1.28 mA and cuts the ideal life from 296 days to 65. A single 5-second wake-up instead of 2 seconds drops it to around 122 days.

Putting it together

Estimate, measure, derate, and then decide. Try different intervals in the battery life calculator, and pick a low-power board such as the XIAO ESP32-C3, ESP32-C6 or Feather nRF52840. If you are still choosing your board, the Microcontroller Cheat Sheet is a free handy reference, and the board finder can narrow the list by features.

Boards mentioned

Free download

The Microcontroller Cheat Sheet

Logic levels, pins to avoid, I2C / SPI / UART basics and a quick-pick table of the best boards — on one printable PDF. Enter your email and it's yours.

Only used to send the sheet and the odd databit.me update. See the privacy policy.

Keep reading

Ad space · bottom