Subscripts matter most
Changing H2O to H2O2 keeps the same elements but produces a very different oxygen percentage.
Percent composition is the percentage by mass of each element in a chemical compound. It answers a practical question: if you had exactly one mole of a substance, how much of that molar mass comes from carbon, hydrogen, oxygen, sodium, chlorine, or any other element in the formula? This calculator parses the formula, counts the atoms, multiplies each element count by its atomic mass, adds those contributions to find molar mass, and then divides each element contribution by the total.
The calculation is useful in general chemistry, analytical chemistry, stoichiometry, and formula identification problems. Students often use percent composition to check empirical formulas, compare theoretical and experimental mass percentages, or identify an unknown compound from elemental analysis data. Lab workers may also use it when converting between a compound mass and the mass of a target element, such as finding how much nitrogen is present in a nitrate salt or how much copper is present in a hydrate.
This tool is intentionally direct. It does not try to infer chemistry from common names, and it does not replace a full chemical database. Instead, it focuses on the formula arithmetic that people repeatedly need: parse the formula, expand grouped atoms, calculate molar mass, and show the mass fraction for each element. Because the page runs entirely in your browser, your formulas are not uploaded. For best results, use standard element symbols, keep capitalization exact, and represent hydrates with a plus sign if needed.
percent by mass = (element mass contribution / molar mass of compound) x 100
Changing H2O to H2O2 keeps the same elements but produces a very different oxygen percentage.
Elemental percentages can be converted into mole ratios, which is the usual route to an empirical formula.
A single iodine atom can outweigh many hydrogen atoms, so atom count and mass percent can feel very different.
Percent composition is a quick way to find how much of a hydrate crystal is actually water.
All element percentages should add to about 100 percent, with tiny differences caused by rounding.
No. Percent composition gives mass percentages. An empirical formula gives the simplest whole-number atom ratio.
C and Co are different elements: carbon and cobalt. Correct capitalization lets the parser identify the intended element.