There is gain of 2ATP molecules during glycolysis and 2ATP(GTP) molecules during double Krebs cycle. A total of 10NADH2 and 2FADH2 molecules are formed in aerobic respiration. Thus, the net gain from complete oxidation of a molecule of glucose in muscle and nerve cells is 36ATP molecules (10NADH2=30ATP, 2FADH2=4ATP, four formed by substrate level phosphorylation in glycolysis and Krebs' cycle and two consumed in transport of the NADH2 molecules into mitochondria). In aerobic prokaryotes, heart, liver and kidneys, 38ATP molecules are produced per glucose molecule oxidised. Passage of ATP molecules from inside of mitochondria to cytoplasm is through facilitated diffusion.
Thus, there is a net gain of 36 or 38ATP molecules depending upon type of aerobic respiration.
[Note : 1NADH2=3ATP and 1FADH2=2ATP].