Percent Composition Calculator
Enter any chemical formula to get the mass percent of every element.
Percentages sum to 100.00%.
| Element | Atoms | Element mass (g/mol) | Mass % |
|---|---|---|---|
| H | 2 | 2.016 | 11.19% |
| O | 1 | 15.999 | 88.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%.
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 Find the molar mass. H₂O is 2 × 1.008 + 15.999 = 18.015 g/mol.
- 2 Find each element’s mass. Hydrogen contributes 2 × 1.008 = 2.016 g/mol; oxygen contributes 15.999 g/mol.
- 3 Divide and multiply by 100. H: 2.016 ÷ 18.015 × 100 = 11.19%. O: 15.999 ÷ 18.015 × 100 = 88.81%.
- 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.
| Compound | Formula | Composition by mass |
|---|---|---|
| Water | H₂O | 11.19% H, 88.81% O |
| Carbon dioxide | CO₂ | 27.29% C, 72.71% O |
| Table salt | NaCl | 39.34% Na, 60.66% Cl |
| Glucose | C₆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.