How this percent yield calculator works
The first mode is the straightforward one: divide what you got by what the equation allowed and multiply by a hundred. The second mode does the harder half of the job, which is working out what the equation allowed in the first place. Give it a balanced equation and how much of each reactant you actually have, and it identifies the limiting reactant, prices the theoretical yield from it, tells you how much of everything else is left sitting in the flask, and then turns your actual yield into a percentage.
Molar masses come from the formulas you type, summed from the IUPAC standard atomic weights, so there is nothing to look up. The formulas parse the way real ones are written, brackets and hydrates included.
The formula
moles = grams ÷ molar mass
limiting reactant = the smallest value of (moles ÷ coefficient)
theoretical yield = (moles ÷ coefficient)limiting × coefficientproduct × molar massproduct
atom economy = mass of product ÷ mass of all reactants × 100
The second line is the bridge every stoichiometry problem crosses: a balanced equation counts molecules, a balance measures grams, and moles are the only place those two meet. The third line is the one people get wrong. Moles divided by coefficient is the comparison that matters, not moles and certainly not grams, because a reactant that needs three of itself per reaction runs out three times faster than its mole count suggests.
Worked example
The aspirin synthesis, which is most people's first real lab. Salicylic acid plus acetic anhydride gives aspirin plus acetic acid, all coefficients 1. You weigh out 2.00 g of salicylic acid (C7H6O3, 138.12 g/mol) and add 5.41 g of acetic anhydride (C4H6O3, 102.09 g/mol).
In moles: 0.01448 and 0.05299. Divide each by its coefficient of 1 and the salicylic acid is smaller, so salicylic acid is limiting and the anhydride is in nearly fourfold excess, which is exactly what the protocol intends: it is cheap, it doubles as the solvent, and pushing an equilibrium is what excess reagent is for. Theoretical yield is 0.01448 mol of aspirin (C9H8O4, 180.16 g/mol) = 2.609 g.
Get 1.85 g out of the recrystallisation and that is a 70.9% yield, which is a good day for that reaction. The missing 0.76 g is not destroyed: most of it is still dissolved in the mother liquor you poured away, which is the price of recrystallising to get something pure enough to melt sharply.
Moles divided by coefficient, not moles
Here is the mistake that survives longest, because it usually works. Given two reactants, the instinct is to convert both to moles and pick the smaller one. That is right whenever the coefficients happen to be equal, which covers a great many textbook problems, and it is wrong the moment they are not.
Take 2 H2 + O2 to 2 H2O with 3 moles of hydrogen and 2 moles of oxygen. Oxygen has fewer moles, so the instinct says oxygen is limiting. Divide by the coefficients and you get 3 ÷ 2 = 1.5 for hydrogen and 2 ÷ 1 = 2 for oxygen, so hydrogen runs out first and half a mole of oxygen is left over. The instinct was wrong, and it was wrong in the direction that overestimates the yield, which is the direction that turns into a puzzled afternoon.
The reason is worth holding onto rather than memorising the rule: the coefficient tells you the rate at which a reactant is consumed relative to the others. Something used two at a time depletes twice as fast per mole present. Dividing by the coefficient converts every reactant onto the same scale, which is "how many times can this reaction run before this particular ingredient is gone", and the smallest answer wins.
A yield above 100% is a diagnosis, not a triumph
Atoms are conserved, so a reaction cannot make more product than its limiting reactant contains. If your percent yield comes out above 100, the extra mass is something that is not your product. In an undergraduate lab it is almost always one of three things: solvent that has not evaporated, water the compound has pulled out of the air, or unreacted starting material carried through the workup. A fourth, less common, is salt left behind from an aqueous wash.
The standard fix is drying to constant mass: dry, weigh, dry again, weigh again, and keep going until two consecutive weighings agree. If the mass stops falling and the yield is still above 100%, the impurity is not volatile and the problem is purification rather than drying. That is a genuinely useful diagnostic sequence, and it is why the number being impossible is more informative than a number that merely looks disappointing.
There is one honourable exception worth knowing. If the reported yield is above 100% because the product was weighed as a salt, a hydrate, or with a counterion the theoretical yield did not account for, then the arithmetic is fine and the theoretical yield was calculated for the wrong compound. Recalculate against what you actually isolated. Getting that right is the difference between a puzzling result and a corrected one.
Percent yield and atom economy answer different questions
Percent yield asks how well you ran the reaction. Atom economy asks whether the reaction was worth running. It is the mass of the product you want as a share of the mass of everything you put in, calculated on the balanced equation with a perfect yield assumed, and it counts the atoms that are destined to leave as byproducts no matter how careful you are.
The two can disagree sharply. A Wittig reaction can run at 95% yield and still have an atom economy near 20%, because a large triphenylphosphine oxide molecule departs carrying most of the mass with it. An addition reaction, where everything you put in ends up in the product, can hit 100% atom economy by construction. Neither number is the whole picture: a high-yield, low-economy route may still be the right choice if it is selective and the byproduct is recyclable. But if you have ever wondered why industrial chemistry cares so much about catalysis and addition chemistry, the answer is the second number, and it is the one that shows up on the disposal invoice.