how do i calculate theoretical yield?

Theoretical yield is the amount calculated from the stoichiometry of the reaction. For example, suppose we wanted to calculate the theoretical yield of CO2 from the reaction

C + O2 ==> CO2 if we had 24 g carbon initially.

24 g C = 24/12 = 2 mols C.
2 mols C produces 2 mol CO2 (from the equation).
2 mol CO2 is 2 mols x 44 grams/mol = 88 grams. 88 grams is the theoretical yield (that is, 100%).
If the problem also stated that we performed the experiment and we collected 80 g CO2, we would calculate the percent yield as
(actual yield)/theoretical yield)*100 =
(80/88)*100 = xx percent yield.