Percent Composition Calculator

Percent composition by mass tells you what fraction of a compound's total mass comes from each element. To find it, divide the total mass of a given element in the formula by the formula mass of the compound, then multiply by 100. This is a foundational calculation in analytical chemistry and is used to determine empirical formulas, verify compound identity, and assess purity. Enter the mass of the element in one formula unit (e.g., hydrogen contributes 2 x 1.008 = 2.016 g/mol to water) and the total formula mass.

0.00

Percent composition formula

% composition = (element mass in formula / formula mass) * 100

Element mass in formula = atomic mass * number of atoms of that element. Formula mass = sum of all atomic masses in the formula. Both in g/mol.

Examples

  • Carbon in CO(2): 12.011 / 44.009 * 100 = 27.29%.
  • Oxygen in CO(2): 2(15.999) / 44.009 * 100 = 72.71%.
  • Sodium in NaCl: 22.990 / 58.440 * 100 = 39.34%.
  • Nitrogen in NH(3): 14.007 / 17.031 * 100 = 82.25%.
  • All element percentages in a compound must sum to 100%.

Frequently asked questions

What is percent composition?

Percent composition is the mass percent of each element in a chemical compound. It equals the mass of the element's atoms in one mole of the compound divided by the formula mass, times 100.

How do I calculate the formula mass?

Add up the atomic masses of all atoms in the formula, using atomic masses from the IUPAC periodic table. For CO2: 12.011 + 2(15.999) = 44.009 g/mol.

Should the percentages of all elements add up to 100%?

Yes. The percent compositions of all elements in a compound must sum to 100% (allowing for small rounding errors). This is a useful check on your calculation.

How is percent composition used?

Percent composition is used to identify unknown compounds, verify purity, calculate empirical formulas from experimental data, and confirm the identity of synthesized products.

What is the percent composition of water?

Water (H2O) has a molar mass of 18.015 g/mol. Hydrogen: 2(1.008)/18.015 * 100 = 11.19%. Oxygen: 15.999/18.015 * 100 = 88.81%. Together these sum to 100%.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.