One watt-hour is exactly 3,600 joules, because an hour is 3,600 seconds and a watt is one joule per second. This is the scale at which batteries are specified, and it is where the ampere-hour figure printed on a cell finally becomes an energy.
About the units
The watt-hour is a unit of energy formed from a power and a time. It is not SI, but it is the natural unit for anything that delivers energy at a steady rate over a known period. Its importance in batteries comes from a subtlety: a battery's capacity is usually printed in ampere-hours or milliampere-hours, which is a charge and not an energy. To get watt-hours you must multiply by the voltage. A 5,000 mAh power bank at 3.7 V stores 18.5 Wh, or 66,600 joules — and the same 5,000 mAh at 12 V would store more than three times as much.
The exact factor
The factor is exactly 3,600. The battery calculation is the one worth writing out: watt-hours equal ampere-hours times volts. This is why airline restrictions on lithium batteries are stated in watt-hours rather than milliampere-hours — 100 Wh is the usual carry-on limit — and why a power bank labelled only in mAh needs its voltage before anyone can tell whether it is allowed on board.
Where you meet this conversion
Batteries of every kind: phones, laptops, power tools, e-bikes and grid storage. Airline and shipping regulations for lithium cells use watt-hours as the threshold quantity. Small-scale solar and off-grid systems are sized in watt-hours per day. In physics and engineering the joule is used instead, so a battery datasheet and a system energy model often express the same quantity in different units on facing pages.