Battery life follows one division: runtime in hours equals capacity in milliamp-hours divided by current draw in milliamps. A 5,000 mAh phone battery powering a 500 mA load lasts 5,000 / 500 = 10 hours. Capacity is also quoted in watt-hours (Wh = volts x amp-hours) — the unit airlines regulate, capping spare batteries at 100 Wh — which has the advantage of being voltage-independent: a 20,000 mAh power bank at 5 V holds 100 Wh regardless of the chemistry inside. Convert freely: mAh x V / 1,000 = Wh.
Real runtime falls short of the division for three reasons. First, current draw is not constant — screens, radios, and processors spike with use, so the '500 mA' in the example is an average that heavy gaming can triple. Second, voltage conversion wastes energy: a power bank's 5 V USB output comes from a 3.7 V cell through a boost circuit at roughly 85 to 90 percent efficiency, so a 20,000 mAh bank delivers about 17,000 usable mAh. Third, batteries degrade — after 500 full charge cycles, a lithium battery typically holds 80 percent of its original capacity.
For planning: estimate your device's average draw (phone manufacturers publish talk-time and standby figures that imply it), divide into usable capacity, and derate older batteries by their health percentage. This calculator runs the capacity-over-draw arithmetic for devices and power banks.