measuring lithium battery life?

What is the way to find out how much life a rechargeable battery still has in it for powering a specific circuit? I've seen people use a voltmeter and by trial and error finding out that 12.X Volt means the battery is full and 11.X is almost dead. What's the real way to do it?

The terminal cell voltage is a guide, you have to take temperature into account though.

http://rc.runryder.com/helicopter/t438903p1/

You should get the discharge curve for your own cell though

Lead acid has a different characteristic.

Remember terminal voltage is also affected by the current drain at the time of measuring, if you can disconnect the load before measuring, or factor in the current, you'll get better information.

https://www.sparkfun.com/products/10617

and

http://cdn.sparkfun.com/datasheets/Prototyping/MAX17043-MAX17044.pdf

you could use the voltage discharge curve, but it is highly inaccurate as you have a steep discharge near the end. like Lemming suggested, use a battery fuel gauge. IT measures the charges coming in and out of the battery and gives an accurate reading. But of cuz, You could use a potential divider for the battery to drop its voltage to the tolerance of the arduino, and read it off the ADC. It can give a rough estimate, but if that is enough for you, then its a simple solution =)

Is the "battery fuel gauge" suitable for only certain size/amount of batteries? I was thinking of using a 20,000 mAh battery (pack), like these http://www.ebay.com/sch/i.html?_odkw=20000+mah+battery&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.X20000+mah+battery+12v.TRS0&_nkw=20000+mah+battery+12v&_sacat=0

you would need one chip per cell but I would mention that those cells really need balanced charging as well for long life, like most cordless drills they will not get their full lifetime without it.