How to estimate the life of a battery-powered circuit design.
The main factor to consider with batteries is the size/capacity of the battery. Simply, the bigger the capacity and generally the size, the longer it will last. This is the mAh rating (milliamp hours or how many milliamps it can provide for one hour before its dead)
This next part is a bit complicated and is only an estimate calculation for how long a certain size of battery will last. To do this you would have to look up or measure the current draw for all your components and compare the power (W, Watts) supplied vs power drawn from the circuit. The approximate formula would be (Battery capacity X Battery voltage ) / (Sum of the current draw of all components X Working voltage). This doesn’t account for efficiency or low power standby time.
This is an example for a 2200mAh 3.7V battery powering a 5V system that draws 1300mA at full power:
(Battery capacity X Battery voltage ) / (Sum of current draw of all components X Voltage)
(2200mAh x 3.7V) / (1300mA x 5V)
= (8140mWh) / (6500mW)
= ~ 1.25 hours ( or about 1h 15min)
To sum up, basically use the biggest battery you can fit in the design for it to last the longest and if you use any voltage different to your circuit requirements like a 12V battery for a 5V circuit, the design will also need a converter to bring it to the required voltage.