Determining empirical formula from mass percentage

The empirical (experimental) formula is the simplest whole number ratio of atoms in a compound.  

Empirical formulae are deduced from experimentally-determined masses of elements present in a particular sample of the compound.  The data are usually expressed as a mass percentage. They used to deduce the empirical formula as shown below in a process that involves
 
  1. assuming a 100 g sample of the substance (row 1 to 2)

  2. calculating the amount in moles of each element in that mass (row 2 to 3)

  3. determining the ratio of the amount in moles of the elements by dividing by the smallest (row 3 to 4).

     
    Any mass of H2O has 11.1 mass % H 88.9 mass % O mass %   n =
    m/M
    1 100 g H2O contains 11.1 g H 88.9 g O to mass in grams  



    divide mass in grams (m)
    by molar mass of element (M) gives the amount in moles of the element
    THEN
    2 100 g H2O contains 11.1 mol H 5.55 mol O to amount in moles
    3 The ratio of
    amount of H
    to amount of O
    in water is
    2 mol H 1 mol O to mole ratio divide amounts in
    moles by the smallest amount
    to get the subscripts
      H2O to formula

  4. using the numbers in the ratio as the subscripts in the formula

    Note that subscripts in empirical formulae are integers.
    If the calculated ratio is not an integer, multiply both parts of the ratio by the same factor in order to get the smallest whole number ratio.
     
    Example:  Using the mass % of N and O in N2O5 gives
    the ratio of the amount in moles n(N) to n(O) of 1 mol N to 2.5 mol O.
    Both should be multiplied by 2 to give n(N) to n(O) of 2 mol N to 5 mol O