Percent Composition Calculator
What the calculation is
Percent composition gives the mass fraction of each element in a compound, expressed as a percentage. The formula is straightforward:
% X = (atoms of X × atomic mass of X) / molar mass of compound × 100
Apply it to every element in the formula and the percentages sum to 100. The denominator is fixed once the molar mass is computed, so each element’s percentage just measures how much of that total mass comes from its atoms.
The non-obvious part is what the numbers reveal. Glucose (C₆H₁₂O₆) has twelve hydrogens — twice as many atoms as anything else — but hydrogens are so light that they account for only 6.71% of the mass. The carbons and oxygens, fewer in count but heavier per atom, dominate. Mass percent and atom count are not the same picture.
How this calculator works
Type a formula (C6H12O6, Al2(SO4)3, CuSO4·5H2O). The parser handles parentheses, hydrate dot notation, and coefficients, then walks the element table:
- Compute the molar mass of the whole compound.
- For each element: atoms × atomic mass = mass contribution.
- Divide each contribution by the molar mass and multiply by 100.
The output is a table with element, atom count, mass contribution, and percent. Steps are shown for each row so you can check the arithmetic against a textbook problem.
Worked examples
H₂O — molar mass 18.015 g/mol. H: (2 × 1.008)/18.015 × 100 = 11.19%. O: (1 × 15.999)/18.015 × 100 = 88.81%.
CO₂ — molar mass 44.009 g/mol. C: (1 × 12.011)/44.009 × 100 = 27.29%. O: (2 × 15.999)/44.009 × 100 = 72.71%.
Glucose, C₆H₁₂O₆ — molar mass 180.156 g/mol. C: 40.00%, H: 6.71%, O: 53.29%. The hydrogen number is small despite there being twelve H atoms.
Al₂(SO₄)₃ — molar mass 342.151 g/mol. Al: 15.77%, S: 28.11%, O: 56.12%. The twelve oxygens (three sulfates × four O each) outweigh everything else.
Forward and reverse
The same numbers run two directions. Going forward, a known formula gives you the expected percentages — useful for verifying purity or sanity-checking a synthesis. Going backward, experimental percentages from elemental analysis give you the empirical formula: convert each percent to moles (assume a 100 g sample, divide by atomic mass), then divide by the smallest mole count to get the simplest whole-number ratio. The Empirical Formula Calculator handles that direction.