Relating milliampere-hours to watt-hours for batteries

I've seen many batteries that are measured in milliampere hours (mAh), while others are measured in watt hours (wh). How can I convert them between each other so that I can actually compare them? It's often the case that computers or smartphones use one or the other and would be great to have a metric.

-

To the best of my knowledge, wattage is just the product of voltage x amperage. So if you know the output voltage of the battery, you should be able to convert mA to w, and vice versa simply by multiplying or dividing, and taking the "milli" prefix into account. You can drop the "hour" variable since it is in both units. In equation form:

$$\text{mA}\times\text{V}\times 1000 = \text{W}$$

and

$$\frac{\text{W}}{\text{V}}\times \frac{1}{1000} = \text{mA}$$

-

To get an approximate result for energy, you need to multiply the charge in mAh by the voltage in volts. If you have a battery with specs 10V and 100mAh, you have the energy estimate of 1000mWh, or 1Wh, or 0.001kWh. However, this estimate is approximate, as voltage decreases in the course of discharge.

-