Percent Composition Calculator

Enter the mass an element contributes and the total mass of the compound. You can use grams from a lab sample or molar masses from the periodic table.

Percent composition by mass

11.19%

Rest of the compound
88.81%
Mass of the rest
15.999
2.016 ÷ 18.015 = 0.1119
0.1119 × 100 = 11.19%

Percent composition formula

Percent composition = (mass of element ÷ mass of compound) × 100

For water, H₂O, the two hydrogen atoms contribute 2 × 1.008 = 2.016 g/mol and the whole molecule weighs 18.015 g/mol. 2.016 ÷ 18.015 × 100 = 11.19% hydrogen. The oxygen makes up the other 88.81%.

How to find percent composition step by step

  1. Write the chemical formula and count the atoms of each element.
  2. Multiply each element's atomic mass by its number of atoms.
  3. Add those values to get the molar mass of the compound.
  4. Divide the element's total mass by the molar mass, then multiply by 100.
  5. Check your work: the percentages of all elements should add up to 100%, give or take rounding.

Lab data works the same way

If a 5.00 g sample of a compound contains 1.20 g of carbon, the carbon content is 1.20 ÷ 5.00 × 100 = 24.0%. Lab results like this are how chemists confirm an unknown compound's formula.

From percent composition to an empirical formula

Chemists often run the process in reverse. Suppose a compound is 40.0% carbon, 6.7% hydrogen, and 53.3% oxygen by mass. Assume a 100 g sample, so you have 40.0 g C, 6.7 g H, and 53.3 g O. Divide each by its atomic mass to get moles: about 3.33 mol C, 6.65 mol H, and 3.33 mol O.

Divide every value by the smallest one (3.33) and the ratio is 1 : 2 : 1, so the empirical formula is CH₂O. Glucose, C₆H₁₂O₆, has exactly this ratio, which is why its mass percentages match.

Percent composition of common compounds

CompoundElementElement mass (g/mol)Compound mass (g/mol)Percent
Water, H₂OHydrogen2.01618.01511.19%
Water, H₂OOxygen15.99918.01588.81%
Table salt, NaClSodium22.99058.44339.34%
Carbon dioxide, CO₂Carbon12.01144.00927.29%
Glucose, C₆H₁₂O₆Carbon72.066180.15640.00%
Ammonia, NH₃Nitrogen14.00717.03182.24%

Questions people ask

Do the percentages always add up to 100%?

Yes. Each element's share adds up to the whole compound. Small differences come from rounding atomic masses.

What is the percent composition of oxygen in water?

Oxygen is 15.999 g/mol out of 18.015 g/mol, which is about 88.81%.

Is percent composition the same as mass percent?

Yes. In chemistry classes the two names mean the same thing: the mass of one part divided by the total mass, times 100.

Can I use moles instead of grams?

Not directly. It is measured by mass, so convert moles to grams with the molar mass first.

More percentage calculators