Percent Composition Calculator
Find the mass percent of each element in a chemical formula.
What you can enter
Type a chemical formula or load a quick example. The calculator counts atoms, calculates molar mass, and shows each element's mass contribution as both a table and a visual strip.
| Formula type | Example | Why it is useful |
|---|---|---|
| Simple molecule | H2O | Shows why oxygen dominates water by mass |
| Ionic compound | NaCl | Compares metal and nonmetal mass share |
| Parentheses | CaCO3 | Good practice for carbonate compounds |
| Biomolecule | C6H12O6 | Connects percent composition to empirical formulas |
| Hydrate | CuSO4.5H2O | Shows how water of crystallization changes mass percent |
Formula used
Mass Percent Formula Chemistry
In chemistry, the mass percent formula is mass percent = mass of part / total mass x 100. For a compound, the "part" is the element's mass contribution in one mole, and the total is the compound molar mass. That is why the first job is always to calculate molar mass carefully.
Example: in H2O, hydrogen contributes about 2.016 g/mol and the full molecule is about 18.015 g/mol. Hydrogen's mass percent is 2.016 / 18.015 x 100, or about 11.19%. Oxygen makes up the rest, about 88.81% by mass.
Worked examples
Water, H2O: hydrogen contributes about 2.016 g/mol and oxygen about 15.999 g/mol, so hydrogen is about 11.19% and oxygen about 88.81% by mass.
Carbon dioxide, CO2: carbon contributes about 12.011 g/mol and oxygen contributes about 31.998 g/mol, so oxygen is about 72.71% by mass.
Glucose, C6H12O6: the percent values help explain why the empirical formula simplifies to CH2O.
How the visual strip helps
The strip shows mass share, not atom count. A compound may have many hydrogen atoms, but hydrogen often contributes a small mass percent because each hydrogen atom is light. This makes the diagram especially useful before empirical formula and percent-yield work.
Where percent composition is useful
- Converting percent data into empirical formulas.
- Checking purity or hydrate composition questions.
- Comparing nutrient, mineral, or compound mass fractions.
- Preparing stoichiometry problems where one element's mass share matters.
- Verifying that formula subscripts and parentheses were counted correctly.
Common mistakes
- Using atom percent instead of mass percent.
- Forgetting to multiply atoms inside parentheses.
- Leaving hydrate water out of the formula.
- Rounding each element too early before checking the total.
- Expecting displayed rounded values to add to exactly 100.000%.
Result checking
The displayed percentages should add to about 100%. If they do not, recheck the formula first. A useful estimate is to identify the heaviest element and its atom count; it will often be the largest mass contributor, even if another element has a larger subscript.
Related Chemistry Tools
FAQs
What is the mass percent formula in chemistry?
The mass percent formula is mass percent = mass of part / total mass x 100. For percent composition of a compound, the part is an element's mass contribution in one mole and the total is the compound molar mass. Calculate the molar mass first, divide the element contribution by that total, then multiply by 100.
How to find percent composition?
Percent composition is the mass fraction of each element in a compound, expressed as a percentage. Formula: % element = (mass of element in 1 mole ÷ molar mass of compound) × 100. Procedure: write the formula, sum atomic masses to get the molar mass, then divide each element's contribution by the molar mass and multiply by 100. Worked example for H2O (M = 18.02 g/mol): % H = (2.016 / 18.02) × 100 = 11.19%; % O = (16.00 / 18.02) × 100 = 88.81%. For NaCl (M = 58.44): % Na = 39.34%, % Cl = 60.66%. For H2SO4 (M = 98.08): % H ≈ 2.06%, % S ≈ 32.69%, % O ≈ 65.25%. Percent composition is the starting point for empirical-formula problems and the basis for fertilizer NPK ratings, alloy specifications, and pharmaceutical purity checks.
How to determine empirical formula from percent composition?
The empirical formula is the simplest whole-number ratio of atoms. Procedure: assume a 100 g sample so percentages become grams, convert each mass to moles by dividing by atomic mass, then divide every mole value by the smallest one. If the resulting ratios aren't whole numbers, multiply through by a small integer (2, 3, sometimes 4) to clear them. Worked example. A compound is 40.0% C, 6.7% H, 53.3% O. Moles per 100 g: C = 40.0 / 12.01 = 3.33; H = 6.7 / 1.008 = 6.65; O = 53.3 / 16.00 = 3.33. Divide by 3.33: C = 1.00, H = 2.00, O = 1.00. Empirical formula: CH2O. If the compound's molar mass were known to be 180 g/mol, the molecular formula would be (CH2O)n with n = 180 / 30 = 6, giving C6H12O6 — glucose.
What is the percent composition of H2?
100% hydrogen by mass. Hydrogen gas contains only one element, so the percent composition is trivially 100%. The same is true for any pure elemental substance: O2 is 100% O, Cl2 is 100% Cl, S8 is 100% S, Cu metal is 100% Cu. Percent-composition calculations only become useful when a compound contains two or more elements: HCl is 2.76% H and 97.24% Cl; H2O is 11.19% H and 88.81% O; H2O2 is 5.93% H and 94.07% O.
What is the percent composition of morphine C17H19NO3?
Approximately 71.6% C, 6.7% H, 4.9% N, and 16.8% O by mass. Molar mass of C17H19NO3: (17 × 12.01) + (19 × 1.008) + 14.01 + (3 × 16.00) = 204.17 + 19.15 + 14.01 + 48.00 = 285.34 g/mol. Element percentages: % C = 204.17 / 285.34 × 100 = 71.55%; % H = 19.15 / 285.34 × 100 = 6.71%; % N = 14.01 / 285.34 × 100 = 4.91%; % O = 48.00 / 285.34 × 100 = 16.82%. Total = 99.99% (rounding).
How do you calculate percent composition by mass?
% by mass = (mass of element per formula unit ÷ molar mass of compound) × 100. Procedure: write the formula, multiply each atom's atomic mass by its subscript, sum to get the molar mass, then divide each element's contribution by the molar mass × 100. Examples. NH3 (M = 17.03): % N = 14.01 / 17.03 × 100 = 82.27%; % H = 3.024 / 17.03 × 100 = 17.76%. CaCO3 (M = 100.09): % Ca = 40.0%; % C = 12.0%; % O = 48.0%. (NH4)2SO4 (M = 132.14): % N = 28.02 / 132.14 × 100 = 21.20% — which is exactly why this salt is marketed as a 21% N fertilizer.
How to find molecular formula from percent composition?
You need both the percent composition and the molar mass. Step 1 — find the empirical formula from the percentages (assume 100 g, convert to moles, divide by the smallest mole value, scale to whole numbers). Step 2 — compute the empirical formula mass. Step 3 — divide the actual molar mass by the empirical formula mass; the integer multiplier n is how many empirical units are in the molecule. Step 4 — multiply every subscript in the empirical formula by n. Example: 40.0% C, 6.7% H, 53.3% O, molar mass 180 g/mol. Empirical formula CH2O (mass 30.03 g/mol); n = 180 / 30 = 6; molecular formula C6H12O6 — glucose. Caution: different compounds can share an empirical formula. CH gives benzene (C6H6) and acetylene (C2H2); CH2O gives glucose (C6H12O6) and formaldehyde (CH2O). The molar mass disambiguates them.
What's the percent composition of sulfur in H2SO4?
Approximately 32.69% S by mass. Molar mass of H2SO4 = (2 × 1.008) + 32.06 + (4 × 16.00) = 98.08 g/mol. % S = 32.06 / 98.08 × 100 = 32.69%. Full breakdown: % H = 2.06%, % S = 32.69%, % O = 65.25%. Practical note: producing 1 tonne of pure H2SO4 requires roughly 327 kg of elemental sulfur (or its equivalent as SO2 from a Contact-process feed).