The electrical potential difference across a membrane. The membrane potential is a result of the concentration differences between potassium ions (K+) and sodium ions (Na+) across cell membranes which are maintained by ion pumps in the cell membrane, pumping sodium out of the cell in exchange for potassium. A large proportion of the body's resting energy expenditure (20%–40% in a typical adult) is devoted to maintaining the membrane potential, which is critical for nerve impulse transmission, muscle contraction, heart function, and the transport of nutrients and metabolites in and out of cells.