Article — Percent Composition Calculator
Percent composition calculator: mass fractions of elements
Percent composition is the mass of each element in a compound divided by the compound's total molar mass, multiplied by 100. Water is 11.19% hydrogen and 88.81% oxygen by mass. Calculate each element by formula: % = (n × Ar ÷ Mr) × 100, where n is the number of atoms, Ar the atomic mass, and Mr the molar mass of the compound.
Mass percentages are how chemists describe what is actually in a substance. A pharmaceutical label that lists 90% active ingredient is a mass percentage. A steel alloy that is 0.5% carbon is a mass percentage. The percent composition of a pure compound is fixed by its chemical formula: pure CO2 is always 27.29% carbon and 72.71% oxygen, whether the sample weighs a milligram or a metric ton.
What is percent composition?
Percent composition by mass is the fraction of a compound's total mass that comes from each element. For a compound with formula AxByCz, calculate the mass of each element (count × atomic mass), sum them to get the molar mass, then divide each contribution by the total.
The unit is percent (%) by mass. All percentages add up to 100% for the compound. If your numbers do not, either an element is missing from your formula or the atomic masses have been rounded too aggressively.
The human body is 65% oxygen, 18% carbon, 10% hydrogen, and 3% nitrogen by mass. Those four elements plus calcium and phosphorus account for over 99% of body mass. The rest is iron, sulfur, sodium, potassium, and a handful of trace minerals.
The percent composition formula
The full formula in working form:
%_X = (n_X × A_X) ÷ M_r × 100 per elementM_r = Σ n_i × A_i molar massΣ %_i = 100% conservation checkThe conservation check (sum of percentages = 100) is the easiest way to spot errors. If your sum is 95% or 105%, you have either miscounted atoms in the formula or used the wrong atomic mass for one element. A common slip is treating chlorine as 35 instead of 35.453.
How to calculate percent composition
The procedure is the same for every compound. Pick a formula, list each element with its atom count, look up atomic masses from the periodic table, multiply, and sum. Then divide each element's mass contribution by the total and multiply by 100.
For glucose C6H12O6: carbon contributes 6 × 12.011 = 72.066. Hydrogen contributes 12 × 1.008 = 12.096. Oxygen contributes 6 × 15.999 = 95.994. Total molar mass: 72.066 + 12.096 + 95.994 = 180.156 g/mol. Percentages: C = 40.00%, H = 6.71%, O = 53.29%. Sum: 100.00%.
Percent composition examples
Example 1: Carbon dioxide CO2. Molar mass = 12.011 + 2 × 15.999 = 44.009 g/mol. Carbon: 12.011 ÷ 44.009 × 100 = 27.29%. Oxygen: 31.998 ÷ 44.009 × 100 = 72.71%.
Example 2: Calcium carbonate CaCO3. Molar mass = 40.078 + 12.011 + 3 × 15.999 = 100.086 g/mol. Calcium: 40.04%, carbon: 12.00%, oxygen: 47.96%. CaCO3 is limestone, eggshells, and antacid tablets — all the same composition.
Example 3: Sulfuric acid H2SO4. Molar mass = 2 × 1.008 + 32.06 + 4 × 15.999 = 98.08 g/mol. Hydrogen: 2.06%, sulfur: 32.69%, oxygen: 65.25%.
- H2O H 11.19%, O 88.81%
- NH3 N 82.24%, H 17.76%
- CH4 C 74.87%, H 25.13%
- CO2 C 27.29%, O 72.71%
- NaCl Na 39.34%, Cl 60.66%
- C6H12O6 C 40.00%, H 6.71%, O 53.29%
- CaCO3 Ca 40.04%, C 12.00%, O 47.96%
- KMnO4 K 24.74%, Mn 34.76%, O 40.50%
From percent composition to empirical formula
The reverse calculation lets you find a compound's empirical formula from elemental analysis. Take the percent composition, assume a 100 g sample (so percentages become grams), convert each mass to moles by dividing by the atomic mass, then divide all mole values by the smallest. The result is the simplest whole-number ratio of atoms.
Example: a compound is 40.0% C, 6.7% H, and 53.3% O. Moles: C = 3.33, H = 6.65, O = 3.33. Divide by smallest (3.33): C = 1, H = 2, O = 1. Empirical formula is CH2O, the formula of formaldehyde — or one-sixth of glucose. The molecular formula could be CH2O, C2H4O2, C6H12O6, or any multiple, depending on the molar mass.
Two compounds with the same empirical formula have the same percent composition. Acetic acid (C2H4O2) and glucose (C6H12O6) both reduce to CH2O and are both 40.0% C, 6.7% H, 53.3% O. You cannot tell them apart from composition alone; you need a molar mass too.
Common percent composition mistakes
The most common error is missing atoms in compounds with parentheses. Ca(NO3)2 has 1 calcium, 2 nitrogens, and 6 oxygens — not 1 calcium, 1 nitrogen, and 3 oxygens. Read the subscript outside the parenthesis as a multiplier for everything inside.
The second mistake is using integer atomic masses (H = 1, C = 12, O = 16) instead of the actual IUPAC values (1.008, 12.011, 15.999). For high-precision work the difference matters: glucose comes out 40.00% C with precise masses or 40.0% with rounded ones.
Where percent composition matters
Quality control: drug manufacturers test active ingredient mass fraction against label values. A 500 mg acetaminophen tablet should contain 500 mg ± 5% of the molecule (not the powder mass). Combustion analysis: burning a hydrocarbon and weighing the CO2 and H2O products gives the percent C and H in the original sample, which leads to the empirical formula.
Metallurgy: stainless steel grades are defined by mass percent (304 stainless is 18% Cr and 8% Ni). Mineralogy: ore grades are reported as mass percent of metal (a 2% copper ore yields 20 kg copper per ton of rock). Each field has a different precision standard, but the math is the same.
If two percentages must sum to 100% and one is hard to measure, calculate the easier one and subtract. For an iron oxide that is x% iron and (100-x)% oxygen, weighing the iron after reduction is faster than collecting the released oxygen.
Where to find atomic masses
The most authoritative source is the IUPAC Commission on Isotopic Abundances and Atomic Weights, which publishes updated values every two years. NIST maintains a free reference periodic table with the same values. For routine work, the standard atomic weights in a high-school or college textbook are accurate to four significant figures, which is enough for percent compositions that go to two decimal places.