Capacity and energy are different quantities
Milliamp-hours describe how much electric charge a battery can deliver under a stated test condition; watt-hours describe an amount of energy. The missing link is voltage. Enter the capacity printed on the battery and its nominal voltage, not an unrelated charging-adapter output. The calculation is Wh = mAh × V ÷ 1000. Dividing by 1000 changes milliamp-hours into amp-hours. The result is an energy estimate based on the voltage supplied, rather than an exact prediction of how long a phone, lamp or laptop will run. Two batteries can both say 5000 mAh but store different energy if their voltages differ.
Worked example at 3.7 volts
Consider a single lithium-ion cell rated 5000 mAh at a nominal 3.7 V. Multiplying 5000 by 3.7 and dividing by 1000 gives 18.5 Wh. A 5000 mAh rating at 7.4 V would instead give 37 Wh, twice the energy, because voltage doubled. This is why comparing mAh values alone across different battery packs is misleading. Check whether a published capacity refers to a single internal cell or to the whole pack; the label may describe a different electrical arrangement from the output port. Use the voltage associated with the stated mAh value. Typing a USB output of 5 V for a 3.7 V cell rating would inflate the estimate.
Cells in series and parallel
Series connections add cell voltages while keeping the amp-hour capacity of one identical cell string. Two 3.7 V, 5000 mAh cells in series form a nominal 7.4 V, 5000 mAh pack, or 37 Wh. Parallel connections keep the voltage of one cell while adding capacities. Two identical cells in parallel form a nominal 3.7 V, 10,000 mAh pack, also 37 Wh. Both arrangements contain the same ideal combined energy, but their voltage and current behavior differs. For a finished battery pack, use the manufacturer's pack-level voltage and capacity rather than combining a pack voltage with a single-cell capacity by mistake. Mixed cells require more careful analysis.
Limits when estimating usable energy
A nominal voltage is an average reference. Battery voltage varies with state of charge, load and temperature, so the formula gives a nominal energy figure, not a guaranteed delivered amount. A converter, inverter or charging circuit also wastes some energy; a device may stop before all stored energy can be used. To estimate runtime, take the resulting Wh and divide by a realistic average load in watts, then allow for losses. Do not treat rated capacity as a direct measure of charging speed or output power. If a label already lists Wh, use that figure rather than recomputing it from a different voltage. The calculator processes entered values in your browser.