In short, the difference stems from different values regarding the number of ATP attributed to the electron carriers in the electron transport chain (ETC).
My guess is that your class didn't go too far in depth on the subject, and also that your class or text is using mixed sources of information.
I have overviewed (general) glucose metabolism here, but feel free to skip this section if you don't need it.
Glucose metabolism is generally composed of 4* processes:
- Glycolysis: a 6-C glucose molecule is broken down to 2 pyruvate molecules producing a net gain of 2 ATP and 2 NADH (electron carrier) molecules. Note that this is a net gain.
- Pyruvate Dehydrogenase Complex (PDC): Here Pyruvate is made into Acetyl CoA, which enters the Krebs Cycle (step 3). This is the Link reaction step that you mentioned. This step produces a 1 NADH molecule per pyruvate.
- Krebs Cycle (TCA): The Krebs cycle is central to cell metabolism and produces a lot of electron carriers, netting 1 GTP (ATP energy "equivalent"), 3 NADH, and 1 "FADH2" (electron carrier) PER Acetyl CoA entering the TCA.
- Oxidative Phosphorylation (ETC): This step converts your electron carriers into ATP. It does this by using the energy released by electron transfers (e- are transferred from your electron carriers NADH, FADH2 to intermediate compounds to oxygen. This provides the energy to actively transport protons) to pump protons (H+ atoms) across a semi-permeable membrane to create a electro-chemical gradient. These H+ atoms will flow down this gradient through the channel of the ATP synthase, creating ATP. Currently, it is pretty widely accepted that an NADH molcule provides enough energy to net 2.5 ATP, and a FADH2 molecule provides enough energy to net 1.5 ATP.
As a result, we get the following:
- +2ATP, +2NADH
- +1NADH x2
- (+1GTP, +1FADH2, +3NADH) x2
- -10 NADH, +2.5ATP x10; -2FADH2, + 1.5ATP x2
This yields 2+2+25+3=32 ATP, which is what you obtained in your calculation.
However, a previously accepted value states that the 4th step nets 3 ATP/NADH molecule and 2 ATP/FADH2 molecule. Running the same calculation, we obtain 2+2+30+4, netting 38 ATP, causing the discrepancy you notice. I wouldn't say either set of values is universally accepted, but I would say that 32 ATP is generally recognized as the "right" answer.
In other words, 32 ATP is the result of the more recently accepted equivalences of 2.5ATP/NADH and 1.5ATP/FADH2 in oxidative phosphorylation, whereas 38 ATP is the result of the older pair accepted equivalences of 3ATP/NADH and 2ATP/FADH2.
Some notes and caveats:
Please note that in (most) Eukaryotes, the NADH produced in the cytosol (Glycolysis) is "reduced to FADH2" via the mitochondrial shuttle as the high energy electrions enter the ETC. This means that each NADH produced by glycolysis only nets 1.5 ATP, resulting in 30 ATP/glucose in majority of eukaryotes.
It is also important to note that the numbers that I have provided are mostly used in classroom calculations for general systems. Real organisms will often deviate for a multitude of reasons. Further, some organisms may not follow this rule at all.
*A few sources might classify the PDC as part of glycolysis or as part of the TCA.