Percent Composition Calculator
Enter a chemical formula to instantly see the percent composition by mass of every element in the compound.
Use the Percent Composition Calculator
Chemical Formula
Common Compounds
Formula Tips
- Capitalize element symbols: NaCl, not nacl
- Use parentheses for groups: Ca(OH)2
- Hydrates with a period: CuSO4.5H2O
- Brackets work too: Al[OH]3
Percent Composition
Enter a chemical formula to see its composition.
Try H2O, Ca(OH)2, or C6H12O6.
Compound
Molar Mass
— g/mol
Mass Percent by Element
| Element | Atoms | At. Mass | Subtotal (g/mol) | Mass % |
|---|---|---|---|---|
| Total | 100.00% | |||
Summary
The Percent Composition Calculator determines what fraction of a compound's total molar mass comes from each element, expressed as a percentage. It parses any standard chemical formula—including parentheses, hydrates, and all 118 elements—using IUPAC 2021 standard atomic weights. Results include each element's atom count, atomic mass, subtotal mass, and percent-by-mass contribution shown with a visual bar.
How it works
- Type a chemical formula such as H2O, NaCl, or Ca(OH)2 in the input field.
- The parser identifies every element symbol and its subscript count, handling nested parentheses.
- Each element's subtotal mass is calculated as: atom count × atomic mass.
- Total molar mass is the sum of all element subtotals.
- Percent composition for each element = (element subtotal / total molar mass) × 100.
- Results are displayed in a ranked table with a visual bar showing relative mass contribution.
Use cases
- Solving stoichiometry and percent-composition problems in general chemistry courses.
- Verifying the theoretical composition of a synthesized compound.
- Determining the mass of a specific element present in a given sample.
- Comparing elemental ratios across similar compounds (e.g. different oxides).
- Teaching aid to illustrate how atomic mass drives composition percentages.
- Pharmaceutical chemistry: checking active-ingredient elemental makeup.
- Environmental science: understanding carbon or nitrogen content of molecules.
- Cross-checking published compound data against calculated values.
Frequently Asked Questions
Last updated: 2026-05-23 · Reviewed by Nham Vu