Percent Composition Calculator

Find the mass percent of every element in any chemical formula instantly.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Percent composition tells you exactly what fraction of a compound’s mass comes from each element — an essential first step in stoichiometry, empirical-formula determination, lab report writing, and quality-control calculations. This calculator supports every element from hydrogen (H) to lawrencium (Lr), handles nested brackets, and shows the full arithmetic so you can follow — and check — every step.

How it works

The core formula is straightforward:

% element = (n × Ar) ÷ Mr × 100

where n is the number of atoms of that element in one formula unit, Ar is its standard atomic weight (IUPAC 2021, in g/mol), and Mr is the molar mass of the whole compound — itself the sum of n × Ar for every element.

The calculator tokenises your formula string left-to-right, pushing each element onto a stack and multiplying group contents by any trailing subscript when a bracket closes. This means arbitrarily nested structures like K4[Fe(CN)6] or Ca(H2PO4)2 are handled correctly without any manual expansion on your part.

Atomic masses used are the IUPAC 2021 standard atomic weights (dimensionless but numerically equal to g/mol). For radioactive elements with no stable isotope the calculator uses the mass number of the longest-lived common isotope.

Worked example — glucose (C6H12O6)

Glucose has molar mass Mr = 6(12.011) + 12(1.008) + 6(15.999) = 180.156 g/mol.

ElementAtomsAr (g/mol)n × Ar (g/mol)% by mass
C612.01172.06640.00%
H121.00812.0966.71%
O615.99995.99453.29%
Total180.156100.00%

Carbon and oxygen together make up nearly 93% of glucose’s mass; hydrogen, despite having 12 atoms, contributes under 7% because its atomic mass is so low.

Why percent composition matters

Empirical formulas from combustion analysis. A classic lab technique burns an organic compound and captures the CO2 and H2O produced. The mass of each product lets you calculate mass percentages of C and H; the remainder is usually O. Dividing each percentage by the element’s atomic mass and finding the smallest whole-number ratio gives the empirical formula. Percent composition is the bridge between experimental data and formula.

Quality control and purity checks. Pharmaceutical and industrial chemists verify a compound’s identity by checking that the measured elemental percentages match the theoretical ones for the expected formula. A discrepancy signals impurity or the wrong compound.

Nutrient and ingredient labelling. The same arithmetic underpins how the nitrogen content of a fertiliser is expressed, why “protein %” on a food label is derived from nitrogen percentage (Kjeldahl method), and how mineral supplements state elemental content (e.g. calcium in calcium carbonate is 40.04%).

Reaction stoichiometry. Knowing the mass fraction of the active element in a reagent lets you convert between “grams of compound used” and “grams (or moles) of element available” — critical when working with impure reagents or hydrates.

Formula reference

The full molar-mass calculation is:

Mr = Σ (ni × Ar,i) for all elements i in the formula

and each element’s percent contribution is:

wi = (ni × Ar,i) ÷ Mr × 100 %

All percentages sum to 100 % (within floating-point rounding). The tool displays the residual rounding error at the bottom of the working panel; it is typically <0.01%.

Ad placeholder (rectangle)