Batteries are valued as devices that store chemical energy and convert it into electrical energy. Unfortunately, the standard description of electrochemistry does not explain specifically where or how the energy is stored in a battery; explanations just in terms of electron transfer are easily shown to be at odds with experimental observations. Importantly, the Gibbs-energy reduction in an electrochemical reaction in a battery also involves atom transfer between different phases. It is shown that for simple galvanic cells or batteries with reactive metal electrodes, two intuitively meaningful contributions to the electrical energy are relevant: (i) the difference in the lattice cohesive energies of the bulk metals, reflecting metallic and covalent bonding and accounting for the atom transfer, and (ii) the difference in the ionization energies of the metals in water, associated with electron transfer. The ionization energy in water can be calculated as the sum of gas-phase ionization energies and the hydration energy of the metal ion. Entropy plays only a limited role, for instance driving the processes in concentration cells. The prediction of the energy of batteries in terms of cohesive and aqueous ionization energies is in excellent agreement with experiment. Since the electrical energy released is equal to the reduction in Gibbs energy, which is the hallmark of a spontaneous process, the analysis also explains why specific electrochemical processes occur. In several important cases, including the classical Zn/Cu battery, the difference in the bulk metal cohesive energies is the origin of the electrochemical energy. For instance, metallic Zn, Cd, or Mg lack stabilization by bonding via unoccupied d-orbitals and are therefore of higher energy than most transition metals. Indeed, metallic zinc is shown to be the high-energy material in the alkaline household battery. The lead–acid car battery is recognized as an ingenious device that splits water into 2 H+(aq) and O2- during charging and derives much of its electrical energy from the strong O-H bonds of H2O formed during discharge. The analysis provides an explanation of basic electrochemistry that will help students better understand this important topic.