I use given percent composition to find the empirical formula of a compound. Then I compare the molar mass of the empirical formula to the given molar mass of the actual molecule to determine molecular formula.