Battery Life Calculator
The life of a battery can be calculated by simply dividing the current of the load by the capacity of the battery. As the battery capacity is usually defined in amp-hours or milliamp-hours, you can use the following simple formula:
Thours = (CAh / IA)
T is the number of hours the battery will last, C is the capacity of the battery, and I is current of the load on the battery.
This number of hours shown is what happens in an ideal world with a constant current. There are many factors which may affect the actual number of hours.
The ambient temperature may affect the capcity of the battery, as can be illustrated by electric vehicles having less range in colder weather.
Another factor would be the battery type. Lead acid batteries for example can only dischage around 50% of their stated capacity before the voltage drops below the nominal 12V and battery damage starts to occur.