Percent Composition Calculator
Calculate percent composition by mass of a compound. Enter the total contribution (atomic mass × count) for H, C, N, O and other elements. For education only.
How to use this tool
- Enter h contribution, c contribution, n contribution, o contribution and other elements contribution in the fields above.
- Results update instantly as you type — or click Calculate.
- Read your total molar mass and the full breakdown beneath it.
Percent composition = (mass of element in 1 mol ÷ molar mass) × 100. Enter the elemental mass contributions (atomic mass × atom count) for each element. For CO₂: C = 12.011, O = 2 × 15.999 = 31.998, total = 44.009 g/mol, so %C = 27.29% and %O = 72.71%.
For education only.
Formula
% element = (mass contribution of element ÷ total molar mass) × 100
Total molar mass = mH + mC + mN + mO + mother
How it works
This calculator sums the mass contributions of all entered elements (atomic mass × atom count for each element) to get the compound's total molar mass, then divides each element's contribution by that total and multiplies by 100 to yield its percentage by mass.
Enter the product of (atomic mass × number of atoms) for each element present; leave unused fields at zero. Results are rounded to three decimal places. The tool covers H, C, N, O, and a catch-all 'other' category; compounds with more than five distinct element types require grouping the remainder into 'other'.
Worked example
Worked example: percent composition of CO₂
- Identify inputs: C contribution = 12.011 g/mol (1 atom × 12.011), O contribution = 31.998 g/mol (2 atoms × 15.999); H, N, other = 0.
- Sum molar mass: total = 12.011 + 31.998 = 44.009 g/mol.
- Calculate % C: (12.011 ÷ 44.009) × 100 = 27.291 %.
- Calculate % O: (31.998 ÷ 44.009) × 100 = 72.709 %.
Total molar mass = 44.009 g/mol; % Carbon = 27.291 %; % Oxygen = 72.709 %
Key terms
- Percent composition
- The mass fraction of each element in a compound, expressed as a percentage of the total molar mass.
- Mass contribution
- The product of an element's atomic mass and the number of its atoms in one formula unit of the compound.
- Molar mass
- The mass of one mole of a compound, equal to the sum of all constituent atomic masses in g/mol.
- Empirical formula
- The simplest whole-number ratio of atoms in a compound; percent composition data are used to derive it.
- Atomic mass
- The weighted average mass of an element's naturally occurring isotopes, expressed in atomic mass units (amu) or g/mol.
Frequently asked questions
- What does percent composition mean?
- It tells you what fraction (by mass) of a compound is made of each element. For example, water is about 11.2% hydrogen and 88.8% oxygen by mass.
- How do I find the element contribution?
- Multiply the element's atomic mass (from the periodic table) by the number of atoms of that element in the chemical formula.