This document summarizes ATP synthesis via oxidative phosphorylation and photophosphorylation. It describes how electron transport chains in the mitochondria and chloroplasts establish proton gradients across membranes, which are then used by ATP synthase complexes to phosphorylate ADP and produce ATP. Specifically, it outlines how electrons from NADH/FADH2 or water power proton pumping via complex I-IV in mitochondria or photosystems I and II in chloroplasts. The resulting proton gradient drives ATP synthesis when protons flow back through the ATP synthase.