Percentage Composition
The percentage composition is the percent of a compoundıs mass that results from each of its constituent elements.
For ethanol, C2H5OH,
2 ´ 12.011 g/mol C = 24.022 g/mol of C2H5OH
6 ´  1.008 g/mol H  =  6.048 g/mol of C2H5OH
1 ´ 15.999 g/mol O  = 15.999 g/mol of C2H5OH

Molecular Weight = the sum = 46.069 g/mol of C2H5OH

% C = (24.022 g/mol ÷ 46.069 g/mol) ´ 102 = 52.14 %
% H = (  6.048 g/mol ÷ 46.069 g/mol) ´ 102 = 13.13 %
% O = (15.999 g/mol ÷ 46.069 g/mol) ´ 102  = 34.73 %
Sum = 100 %