Stage three of cellular respiration is the use of NADH and FADH2 to generate ATP. This occurs in two parts. First, the NADH and FADH2 enter an electron transport chain, where their energy is used to pump, by active transport, protons out of the thylakoid. This establishes a proton gradient across the thylakoid membrane. These protons then flow down their concentration gradient, moving back into the thylakoid by facilitated diffusion. During this process, ATP is made by adding inorganic phosphate to ADP. Most of the ATP produced during cellular respiration is made during this stage.
For each glucose that starts cellular respiration, in the presence of oxygen, 36-38 ATP is generated, under anaerobic conditions, only two ATP is produced.