📊 Percent Composition Calculator
Enter a chemical formula to get the mass percent of each element, each element’s mass ÷ the molar mass, shown as a clear breakdown.
| Element | Atoms | Atomic wt | Mass | Mass % |
|---|---|---|---|---|
| O Oxygen | 6 | 15.999 | 95.994 | 53.28% |
| C Carbon | 6 | 12.011 | 72.066 | 40.00% |
| H Hydrogen | 12 | 1.008 | 12.096 | 6.71% |
| Total | 180.156 | 100% | ||
IUPAC/CIAAW standard atomic weights. Parser handles nested groups, hydrates (· / . / *) and two-letter symbols. 🔒 Computed in your browser.
How the percent composition calculator works
The molar mass is computed by parsing the formula and summing atomic weights; each element’s total mass (atomic weight × count) is then divided by the molar mass and expressed as a percentage. The percentages sum to 100%. As a worked case, in CO₂ the carbon fraction is 12.011 ÷ 44.009 = 27.29% and oxygen is 72.71%; because it is a ratio of masses, the result is the same whatever amount of sample you have.
Percent composition is just a view of the molar-mass calculation, the same exact parse, presented as the mass fraction each element contributes.
Frequently asked questions
How do I calculate percent composition?
For each element: (mass of that element in the formula ÷ molar mass) × 100. In water, H is (2×1.008 ÷ 18.015) × 100 = 11.19% and O is 88.81%.
Do the percentages add to 100?
Yes, every atom’s mass contribution is counted, so the element percentages sum to 100% (aside from tiny rounding in the display).
What is percent composition used for?
To find how much of an element a compound contains by mass, useful for empirical formula work, purity checks, and comparing fertilisers or minerals by nutrient content.
Does it handle hydrates?
Yes, the water of hydration is included, so the percentages reflect the full hydrated formula.
Is my data uploaded?
No, the calculation is entirely in-browser.
Can I get the mass of one element from a sample?
Yes, multiply the sample mass by that element’s percent composition. 50 g of CaCO₃ (40.04% Ca) contains 50 × 0.4004 = 20.0 g of calcium.
Why might my percentages differ slightly from a textbook?
Rounding of atomic weights. Using more decimals (O = 15.999 rather than 16) shifts a percentage by a few hundredths. This tool uses full standard atomic weights, so values are as exact as the constants allow.
How is percent composition used to check a fertiliser’s nutrient content?
The mass percent of an element equals the nutrient it supplies. Ammonium nitrate (NH₄NO₃) is 35.0% nitrogen by mass, so 100 kg supplies 35 kg of nitrogen, the basis for comparing fertilisers.
Is percent composition the same as percent yield?
No. Percent composition is the mass fraction of each element within a compound’s formula. Percent yield compares the product you actually made to the theoretical maximum of a reaction. They answer different questions.