Empirical formula is the ratio of the number of atoms of each element that makes up the compound. This is derived by dividing the number of the atoms of each element by any common factors of their number. Different compounds can have the same empirical formula.
A large number of examples are found in compounds of carbon which are usually created as a long chain of blocks of CH2 with two blocks of CH3 at either end. This makes the empirical formula of chemicals with a large number of atoms quite simple, for example the empirical formula of C6H14 is C3H7, which is got by dividing the total number of each element in the compound by 2. For differently shaped compounds the empirical formula varies, like benzene C6H6 has an empirical formula of CH.
The empirical formula of C6H12O6 is determined by dividing the number of each element present in the compound by the common factor 2, this gives C3H6O3.