Percentage by mass in, simplest whole-number atom ratio out. Atomic masses used: C 12.011 · H 1.008 · O 15.999 · N 14.007 · P 30.974 · Fe 55.845 g mol-1. Pick a compound, then work down the ladder.
n = m ÷ M for each element. Then divide every mole value by the smallest.
The percentages are shares of the mass. The formula counts atoms. Are they the same picture?
Enter a subscript for each element. If the ÷ smallest column shows a value like 1.50 or 2.67, multiply every value through rather than rounding it.
Solve the empirical formula first. The multiplier is n = M(molecular) ÷ M(empirical), and it has to come out as a whole number.
M(empirical unit) = – g mol-1. Choose the molar mass the question gives you, then enter the multiplier n.