Percent Composition Calculator
The mass percentage of each element in a compound — from its formula, with the mass of each element in a given sample.
Each element's contribution is its atomic mass times how many atoms appear, divided by the compound's molar mass.
How the percent composition calculator works
Each element's contribution is its atomic mass times how many atoms appear, divided by the compound's molar mass.
The percentages tell you what a sample is actually made of, which is how a fertiliser's nitrogen content or an ore's metal content is quoted. They also let you check an analysis: measured percentages that do not match any sensible formula mean the sample is not what you thought.
Formula: % = (atoms × atomic mass) / molar mass × 100
Worked examples
| Inputs | Molar mass | Note |
|---|---|---|
| Calcium carbonate | 100.086 g/mol | 40% Ca, 12% C, 48% O |
| Water | 18.015 g/mol | 11.2% hydrogen, 88.8% oxygen |
| Ammonium nitrate fertiliser | 80.043 g/mol | 35% nitrogen |
FAQFrequently asked questions
How do I find percent composition?
Divide each element's total atomic mass in the formula by the compound's molar mass.
What is the nitrogen content of ammonium nitrate?
About 35% by mass, which is why it is such a concentrated fertiliser.
Do the percentages always sum to 100?
Yes, to rounding. If yours do not, an element has been missed.
How do I write hydrates?
Use a dot or a full stop: CuSO4·5H2O. The water of crystallization counts toward the molar mass and often dominates it.
Why does capitalization matter?
Because Co is cobalt and CO is carbon monoxide. Element symbols are always a capital, optionally followed by a lower-case letter.
Where these figures come from
- IUPAC — Standard atomic weights (2021 conventional values) — the molar-mass table
- NIST — CODATA 2018 fundamental physical constants — Avogadro constant, gas constant, speed of light
- NIST Chemistry WebBook — thermochemical data
- National Institute of Standards and Technology — the US measurement and reference-data authority
Last checked: September 2026. Atomic masses are the IUPAC conventional values; constants are CODATA 2018; equations are the standard textbook forms.