Percent Composition Calculator

Molecular Weight18.015 g/mol
ElementCountMass (g/mol)Percent (%)
H22.01611.19
O115.99988.81

Percent composition expresses how much each element contributes to the total mass of a compound. This calculator parses a chemical formula, looks up each element atomic weight, sums them into a molar mass, and reports the mass percentage of every element. It is the standard way chemists describe what a substance is made of by weight.

Formula

mass % of element = (atomic weight × count) / molecular weight × 100

atomic weight
Standard atomic mass of the element (g/mol)
count
Number of atoms of that element in the formula
molecular weight
Sum of atomic weight × count over all elements

How it works

  1. Type a chemical formula using standard element symbols and subscripts written as plain numbers, for example H2O, CO2, or C6H12O6. Each capital letter starts a new element and an optional following digit gives its count.
  2. The tool multiplies each element atomic weight by its count, adds these to get the molecular weight, then divides each element total mass by the molecular weight and multiplies by 100. Percentages are rounded to two decimal places.

Worked example

Find the percent composition of water, H2O.

  1. Hydrogen: 2 × 1.008 = 2.016; Oxygen: 1 × 15.999 = 15.999.
  2. Molecular weight = 2.016 + 15.999 = 18.015 g/mol.
  3. Hydrogen % = 2.016 / 18.015 × 100 = 11.19%; Oxygen % = 15.999 / 18.015 × 100 = 88.81%.

H2O is about 11.19% hydrogen and 88.81% oxygen by mass, with a molecular weight of 18.015 g/mol.

Frequently asked questions

How should I write the chemical formula?
Use standard symbols with the first letter capitalized and any second letter lowercase, followed by the atom count as a plain number, such as CO2 or C6H12O6. The calculator does not handle parentheses, charges, or hydration dots.
What is the difference between molecular weight and percent composition?
Molecular weight is the total mass of one mole of the compound in grams. Percent composition breaks that total down, showing the fraction of the mass contributed by each individual element.
Why do my percentages add up to exactly 100?
Because every element mass is divided by the same molecular weight, the individual percentages must sum to 100% apart from tiny rounding differences at the second decimal place.