The empirical formula of a compound is the simplest ratio of the atoms present in that compound and it can be calculated relatively easily by following a few simple steps:Let's use an example of a hydrocarbon that contains 10% Hydrogen by mass and 90% Carbon by mass. Firstly create two columns, one for hydrogen and one for carbon. Next write the percentages by mass at the top of each column. You could also just use the mass if it is given but make sure you're consistent between columns. Next write down the Ar of each element. In this case it is 1.0 and 12.0 respectively. Then divide the percentage by mass by the Ar for each element. We get 10 and 7.5. Then divide each of these numbers by the smallest number, so we would get 1.33:1. This isn't a whole number ratio so we need to multiply both numbers by 3 to get 4:3. Therefore our empirical formula in this case is H4C3.