Key facts
- Mass % of an element = (atoms × atomic weight) ÷ molar mass × 100.
- Water is 11.19% hydrogen and 88.81% oxygen by mass.
- Sulfuric acid, H₂SO₄, is 2.06% H, 32.69% S and 65.25% O.
- The percentages always add up to 100%.
What is percent composition?
Percent composition tells you what share of a compound’s mass comes from each element. Although a water molecule has twice as many hydrogen atoms as oxygen atoms, oxygen is so much heavier that it makes up almost 89% of water’s mass. Chemists use percent composition to check the identity and purity of a compound, to work out empirical formulas from lab analysis, and to compare fertilisers, ores and supplements.
How to use the percent composition calculator
Type the chemical formula, for example H2SO4, NaHCO3 or C2H5OH. Brackets and hydrates work too. The calculator shows the element with the largest share, a bar for each element and a table with the number of atoms, atomic weight, total mass and mass percent.
Percent composition formula
Mass % of element = (n × A) ÷ M × 100%| Symbol | Meaning |
|---|---|
| n | Number of atoms of the element in the formula |
| A | Atomic weight of the element (g/mol) |
| M | Molar mass of the whole compound (g/mol) |
Step-by-step examples: percent composition
Example 1: water, H₂O
M = 18.015 g/mol. Hydrogen: 2 × 1.008 = 2.016, so 2.016 ÷ 18.015 = 11.19%. Oxygen: 15.999 ÷ 18.015 = 88.81%.
Example 2: glucose, C₆H₁₂O₆
M = 180.156 g/mol. Carbon: 6 × 12.011 = 72.066 → 40.00%. Hydrogen: 12 × 1.008 = 12.096 → 6.71%. Oxygen: 6 × 15.999 = 95.994 → 53.28%.
Example 3: how much iron is in iron ore?
Haematite is Fe₂O₃ (159.687 g/mol). Iron: 2 × 55.845 = 111.69 → 69.94%. So a tonne of pure haematite contains about 699 kg of iron.
Percent composition of common compounds
| Compound | Formula | Composition by mass |
|---|---|---|
| Water | H₂O | H 11.19%, O 88.81% |
| Carbon dioxide | CO₂ | C 27.29%, O 72.71% |
| Methane | CH₄ | C 74.87%, H 25.13% |
| Ammonia | NH₃ | N 82.24%, H 17.76% |
| Sodium chloride | NaCl | Na 39.34%, Cl 60.66% |
| Sodium bicarbonate | NaHCO₃ | Na 27.37%, H 1.20%, C 14.30%, O 57.14% |
| Calcium carbonate | CaCO₃ | Ca 40.04%, C 12.00%, O 47.96% |
| Ethanol | C₂H₅OH | C 52.14%, H 13.13%, O 34.73% |
| Caffeine | C₈H₁₀N₄O₂ | C 49.48%, H 5.19%, N 28.85%, O 16.48% |
From percent composition to empirical formula
You can run the calculation backwards. Suppose a compound is 40.0% C, 6.7% H and 53.3% O. Assume 100 g, so you have 40.0 g C, 6.7 g H and 53.3 g O. Divide by atomic weights: C 3.33 mol, H 6.65 mol, O 3.33 mol. Divide by the smallest (3.33): C 1, H 2, O 1. The empirical formula is CH₂O. Glucose, C₆H₁₂O₆, has this empirical formula.
Common mistakes with percent composition
- Counting atoms instead of mass. Two H atoms do not mean hydrogen is two thirds of the mass.
- Forgetting subscripts outside brackets. In Al₂(SO₄)₃ there are 3 S and 12 O.
- Rounding atomic weights too early. Small rounding errors add up over many atoms.
From Proust’s law to fertilizer labels
Percent composition rests on the law of definite proportions, established by the French chemist Joseph Proust around 1797 to 1799: a pure compound always contains the same elements in the same proportions by mass, wherever it comes from. Proust argued the point for years with Claude Louis Berthollet, who thought compositions could vary, and Proust’s view won, supporting John Dalton’s atomic theory.
Chemists measure composition experimentally with combustion analysis, refined by Justus von Liebig in 1831 with his five-bulb apparatus, and today with automated CHN analyzers; comparing measured percentages with calculated ones is a standard check on whether a new compound is pure. Composition also appears on everyday labels. Fertilizer N-P-K numbers are percentages by mass, but by a long-standing convention phosphorus is reported as P₂O₅ and potassium as K₂O, so a 10-10-10 bag contains only about 4.4% elemental phosphorus and 8.3% potassium, figures that state rules based on the Association of American Plant Food Control Officials recognize. To find the molar mass behind the percentages, use the molar mass calculator; to convert a mass to moles, the grams to moles calculator; and to compare actual and theoretical products, the percent yield calculator.
Related: molar mass calculator and grams to moles calculator.
How this calculator works
- Molar mass is calculated from the formula with IUPAC 2021 atomic weights.
- Mass percent of each element = (atoms × atomic weight) ÷ molar mass × 100.
- Elements are listed in Hill order, and the element with the largest share by mass is highlighted.
- Percentages add to 100% apart from rounding.
Frequently asked questions
How do I calculate percent composition?
For each element, multiply its atomic weight by the number of its atoms, divide by the compound’s molar mass, and multiply by 100.
What is the percent composition of water?
Water is 11.19% hydrogen and 88.81% oxygen by mass.
What is the percent composition of CO₂?
Carbon dioxide is 27.29% carbon and 72.71% oxygen by mass.
What is the percent of oxygen in H₂SO₄?
About 65.25%: 4 × 15.999 = 63.996 g/mol out of 98.072 g/mol.
Do the percentages always add up to 100%?
Yes, apart from tiny rounding differences, because together the elements make up the whole compound.
How is percent composition used to find an empirical formula?
Assume 100 g of compound so each percentage becomes grams, convert grams to moles, then divide by the smallest number of moles to get the simplest whole-number ratio.
What is the difference between percent composition by mass and by atoms?
By mass compares the weight of each element; by atoms compares how many atoms there are. In water, hydrogen is 67% of the atoms but only 11% of the mass.
How much nitrogen is in ammonia?
Ammonia, NH₃, is 82.24% nitrogen by mass.