What formula do you use define percent composition of mass

Percent composition by mass can be calculated using the following formula:

% composition = (mass of element / total mass of compound) x 100

This formula is used to determine the percentage of a specific element's mass in a compound.