Although the easiest method is simply to measure the voltage across the battery as time goes on, gynecologist
it is the least likely method to tell you accurate information, buy more about
especially how much charge remains. According to several application notes, unhealthy and following intuition, the best method is a mixture of tracking the voltage, current, temperature and good fuel-gauge algorithms. The general idea is that the battery output voltage is a good indication of the remaining capacity, but its interpretation depends heavily on the discharge rate (current) and the temperature. If the cell is rechargeable, then the output impedance of the battery can be indicative of intrinsic capacity and, for example, doubles after about 100 charge/discharge cycles for a Li-ion battery. Finally, since current is tracked, it is easy to count how many coulombs of charge have gone through the battery and compare to known models for the particular chemistry to get an even better gauge of remaining capacity. Fortunately, there are single chip solutions from multiple vendors that can do this now at a low cost, so when designing portable devices, it may be worthwhile to spend an extra dollar or two on a good battery supervisor IC.