The percentage of elements in the compound is determined from the number of elements in the compound
Further explanation
Proust states the Comparative Law that compounds are formed from elements with the same Mass Comparison so that compounds have a fixed composition of elements
Example
% Lithium (Li) in Li₂CO₃(lithium carbonate)
Ar of Li = 6.941 g/mol
MW of Li₂CO₃ = 73.891 g/mol