The example used:

Determine the empirical (simplest) formula for a compound that is 32.4 % Na, 22.5 % S and 45.1 % O.

To start the calculation, assume 100g of the compound.  Set up a table and make the calculations as follows:

element
mass
/g
molar mass
/g mol-1
moles*
ratio

Na 32.4
23.0
1.41
2.01
S
22.5
32.0
0.703
1
O
45.1
16.0
2.82
4.01

This gives the simplest formula of Na2SO4

*From the definition of molar mass:
n = m/M