Why are battery capacities expressed in Ah and what does it mean?

What is an ampere-hour or Ah or mAh mentioned in your batteries? How do you calculate how long your appliance works based on this parameter?

Well in simple terms, an ampere-hour (Ah) is a battery's ability to provide 1 ampere for 1 hour. Let's, for example, say a battery is rated at 2500 mAh, 3.7V, which is a very common rechargeable battery. 2500 mAh would be 2.5Ah.

We can use this information to get the watt hour content of our battery:
3.7V x 2.5Ah = 9.25 Wh

This means, in simple terms, that the battery can theoretically provide constant power of 9.25W for 1 hour. Now let's say your application (may be an led) is rated 1W. Our battery will thus be able to power this led for:
9.25 Wh / 1W = 9.25 hours

If the led was rated 3W, our battery would power it for:
9.25 Wh / 3W = around 3 hours (3.08 hours to be exact)

Pretty simple right?