how do I calculate theoretical yield?

Go through the regular steps of a stoichiometry problem; the value get at the end is the theoretical yield.

For example, calculate the grams oxygen obtained from the decomposition of 10 grams KClO3.
2KClO3 ==> 2KCl + 3O2
The number of grams O2 obtained will be the theoretical yield.

To calculate theoretical yield, you need to follow these steps:

Step 1: Write the balanced chemical equation for the reaction of interest. For example, let's consider a simple reaction where hydrogen gas (H2) reacts with oxygen gas (O2) to produce water (H2O):

2 H2 + O2 -> 2 H2O

Step 2: Determine the number of moles of the limiting reactant. The limiting reactant is the one that is completely consumed in the reaction, limiting the amount of product that can be formed.

Step 3: Use stoichiometry to convert the moles of the limiting reactant to moles of the product. Stoichiometry involves using the coefficients from the balanced chemical equation to establish a mole-to-mole ratio.

In our example, the stoichiometry of the reaction equation tells us that 2 moles of H2 react with 1 mole of O2 to produce 2 moles of H2O.

Step 4: Convert the moles of the product obtained from step 3 to grams, if necessary. To do this, multiply the number of moles by the molar mass of the product.

For example, if we want to calculate the theoretical yield of water and we obtained 1 mole of H2O, you would multiply this by the molar mass of water (18.015 grams/mol) to obtain the theoretical yield in grams.

Keep in mind that the actual yield of a reaction may be different from the theoretical yield due to factors like incomplete reactions, side reactions, and other experimental limitations.