Empirical formulas from mass composition
A pure compound always has the same elements in the same proportions by mass, so converting each element's mass to moles and dividing by the smallest gives the lowest whole-number ratio of atoms, the empirical formula.
From AP Chemistry.