Determining Empirical Formula
Make assumption that total mass = 100g. Based on the assumption, figuring out the ratios, obtain the formula. Mostly algebra work.
Determining Molecular Formula
Molecular formula is always a multiple of empirical formula. If we know molar mass, we can find molecular formula.