The basis for the calculation and how to do it have been explained in detail in other post.
Anyway, since time is an issue in exams, some readers are interested in knowing a method of doing the calculation in a real fast way.
For obtaining a quick answer when calculating the energetic balance of the total oxidation of a fatty acid (and also for verifying your answers if you use some other method of calculation) you can apply these formulas:
a) If your course use for the reduced cofactors these energetic yields
NADH.H+ = 2.5 ATP
FADH2 = 1.5 ATP
Use this formula:
[(n/2) -1] x (14) +8 = Number of ATP formed
Where n= Number of carbons
Balance of the total oxidation of palmitic acid (16 carbons):
(16/2)-1] x (14) +8 = 106 ATP
b) If the equivalence used for the energetic yields in your course are:
NADH.H+ = 3 ATP
FADH2 = 2 ATP
Then apply this formula:
[(n/2) -1] x 17 +10 = Number of ATP formed
For the total oxidation of palmitic acid, following the former energetic yielding criteria:
[(16/2)-1] x 17 + 10 = 129 ATP
Thanks for the questions and comments!