Skip to content
K Knidox Search…
Chemistry · Stoichiometry

Percent Composition Calculator

Enter any chemical formula to get the mass percent of every element.

Molar mass
18.015g/mol

Percentages sum to 100.00%.

ElementAtomsElement mass (g/mol)Mass %
H22.01611.19%
O115.99988.81%

Percent composition is the mass percent each element contributes to a compound: mass % = (atom count × atomic mass) ÷ molar mass × 100. For water, H₂O, the molar mass is 18.015 g/mol, so hydrogen is 11.19% and oxygen is 88.81%.

What percent composition is

Percent composition tells you how much of a compound’s mass comes from each element. The calculator parses your formula — including nested parentheses like Ca(OH)₂ — finds the molar mass, then divides each element’s total mass contribution by that molar mass and multiplies by 100. Because every atom’s mass is accounted for, the percentages always add up to 100%.

mass % = element mass ÷ molar mass × 100

each element’s total mass, divided by the compound’s molar mass

Worked example

Find the percent composition of water, H₂O — two hydrogen atoms and one oxygen.

  1. 1
    Find the molar mass. H₂O is 2 × 1.008 + 15.999 = 18.015 g/mol.
  2. 2
    Find each element’s mass. Hydrogen contributes 2 × 1.008 = 2.016 g/mol; oxygen contributes 15.999 g/mol.
  3. 3
    Divide and multiply by 100. H: 2.016 ÷ 18.015 × 100 = 11.19%. O: 15.999 ÷ 18.015 × 100 = 88.81%.
  4. 4
    Check the total. 11.19% + 88.81% = 100.00%, so every gram of mass is accounted for.

Percent composition of common compounds

Computed from standard atomic weights; percentages rounded to two decimals.

CompoundFormulaComposition by mass
WaterH₂O11.19% H, 88.81% O
Carbon dioxideCO₂27.29% C, 72.71% O
Table saltNaCl39.34% Na, 60.66% Cl
GlucoseC₆H₁₂O₆40.00% C, 6.71% H, 53.28% O

Why it matters

It is the first step to an empirical formula. Reverse the process — take measured mass percentages, convert each to moles, and reduce to the smallest whole-number ratio — and you recover the empirical formula. Percent composition and empirical formula are two views of the same data.

The percentages always sum to 100%. If yours don’t (allowing for rounding), an atom count is wrong or an element is missing from the formula. A small drift like 99.99% or 100.01% is just rounding.

Use full-precision atomic masses. Rounding atomic weights too early throws off the percentages. The calculator keeps full precision and rounds only at the end.

How is percent composition calculated?
For each element, multiply its atom count by its atomic mass to get its mass contribution, divide by the compound’s molar mass, and multiply by 100. The result is that element’s mass percent.
Why do the percentages add up to 100%?
Every atom’s mass is part of the molar mass, so summing each element’s contribution returns the whole molar mass — which is 100% of the compound by definition. Totals like 99.99% or 100.01% are just rounding.
How do I get the empirical formula from percent composition?
Divide each element’s mass percent by its atomic mass to get moles, then divide all of those by the smallest value to find the whole-number ratio. The Empirical Formula tool does this for you.
Can it handle hydrates like CuSO₄·5H₂O?
Dot-notation hydrates aren’t parsed. To include the water of crystallisation, expand it manually — e.g. write CuSO4(H2O)5 — so every atom is counted.
Does it use isotopes or average atomic mass?
It uses standard average atomic weights (the periodic-table values), which already average each element’s natural isotope mix. Single-isotope masses would give different percentages.
What’s the difference from molar mass?
Molar mass is the total mass of one mole in g/mol; percent composition splits that total into the fraction each element provides. The Molar Mass tool gives the total this calculator divides by.