To calculate an empirical formula you'll need to convert the mass of each element present in a compound to moles. Once you have the mole amounts you can determine the ratio of those elements. The whole number ratio of the elements is the empirical formula.
This video will walk you through that process.
video from: Noel Pauller
Hope this helps!