An empirical formula is the simplest formula for a compound. To attain empirical formula, first we need to imagine there is 100g of the compound. Usually question will give you weight percentage of each element in the compound, so you can convert those weight percentage of elements into number of moles. After figuring out the number of moles of each element, we devide each of the mole quantities by which ever mole quantity is the smallest number of moles. The ratio we get will be the subscripts in the empirical formula.