Skip to content
Chemistry

Percent Composition Calculator

Calculate the percent composition by mass for every element in a compound. Type a chemical formula (e.g. CO2, Al2(SO4)3, CuSO4.5H2O) for an automatic full breakdown, or switch to manual mode and enter the element mass and total compound mass directly.

Your details

Formula mode parses the chemical formula and splits each element automatically. Manual mode lets you enter any two masses directly.
Enter a standard chemical formula. Parentheses and hydrate dots are supported. Element symbols are case-sensitive (e.g. Co for cobalt, CO for carbon + oxygen).
Enter a symbol to show that element's mass percent as the primary result. Leave blank to use the first element in the formula.
Controls how many decimal places are shown in the percent results.
Mass percent (highlighted element)Minor component
27.29%
Molar mass of compound44.009g/mol
Distinct elements2
27.29% %
Trace component<10Minor component10-33Substantial33-67Major/dominant67+

C makes up 27.29% of CO2 by mass.

  • The molar mass of CO2 is 44.009 g/mol.
  • C accounts for 27.29% of that molar mass.
  • The compound has 2 distinct elements; all their percentages add to 100%.
  • Percent composition is independent of sample size: one gram or one kilogram of the compound has the same elemental percentages.

Next stepUse the full element-by-element breakdown below to check that all percentages sum to 100%, or work backward from the percentages to find an empirical formula.

Element-by-element breakdown of CO2

ElementSymbolAtomsAtomic mass (g/mol)Element mass (g/mol)Mass %
CC112.01112.01127.29%
OO215.99931.99872.71%

Molar mass of CO2: 44.009 g/mol. All mass percentages sum to 100% (rounding may cause minor differences). Atomic masses from IUPAC 2021.

Formula

%mE=nE×AEMcompound×100\%\,m_{E} = \dfrac{n_{E} \times A_{E}}{M_{\text{compound}}} \times 100

Worked example

Carbon in CO2: C contributes 1 x 12.011 = 12.011 g/mol; both O atoms contribute 2 x 15.999 = 31.998 g/mol; molar mass = 44.009 g/mol. Mass% of C = (12.011 / 44.009) x 100 = 27.29%. Mass% of O = (31.998 / 44.009) x 100 = 72.71%. Both sum to 100%.

What percent composition by mass tells you

Percent composition by mass expresses what fraction of a compound's total mass is contributed by a single element. You find it by dividing the mass of that element in one formula unit by the total molar mass of the compound and multiplying by 100. The result is a ratio of masses, so it stays the same no matter how much of the substance you have: one gram or one tonne of water is always about 11.19% hydrogen and 88.81% oxygen by mass. Chemists use percent composition to verify the identity of a pure sample, to convert between lab measurements and molecular formulas, and to compare how much of each element a compound contains.

Calculating from a chemical formula

When you start from a chemical formula, multiply the number of atoms of each element by its atomic mass from the periodic table to get that element's contribution to the molar mass. Sum all of those contributions to get the molar mass of the compound. Then divide each element's contribution by the molar mass and multiply by 100. For sodium bicarbonate (NaHCO3): Na gives 22.990 g/mol, H gives 1.008 g/mol, C gives 12.011 g/mol, and three O atoms give 47.997 g/mol, for a molar mass of 84.006 g/mol. Na is 22.990 / 84.006 x 100 = 27.37%. The calculator handles parentheses, hydrate notation (CuSO4.5H2O), and any combination of the 40 most common elements automatically.

Supported formula notation

This calculator accepts standard Hill-order chemical formulas with the following conventions. Capital letters begin each element symbol and one lowercase letter may follow (for example, Fe, Cl, Na). A number immediately after a symbol is the atom count for that element; no number means one atom. Parentheses group a sub-unit, followed by a multiplier: Al2(SO4)3 means two aluminium atoms and three SO4 groups. A period or middle dot separates hydrate water: CuSO4.5H2O means copper sulfate with five water molecules. Element symbols are case-sensitive: co is not a recognised symbol but Co is cobalt. If the parser cannot interpret your formula, check for typos in the element symbols.

From percent composition to empirical formula

Percent composition is the bridge between laboratory analysis and a molecular formula. If an analytical result gives the mass percent of each element, assume a 100 g sample so each percentage becomes a mass in grams, then divide each mass by the element's atomic mass to get moles. Divide every mole value by the smallest value to obtain a ratio, and round to the nearest whole number to get the empirical formula. This approach is how unknown compounds are routinely identified from combustion analysis or other quantitative tests. Once you know the empirical formula, a measured molar mass tells you how many empirical units make up the true molecular formula.

Checking your work with the 100% rule

A quick sanity check: the mass percentages of every element in a compound must add up to 100%. If they do not, you have made an arithmetic error or used the wrong atomic masses. Small rounding differences of a few hundredths of a percent are normal, but a discrepancy of more than about 0.1% signals a mistake. The element-by-element table generated by this calculator lists every element's contribution and sums to 100%, so you can use it to spot errors in hand calculations.

Percent composition of common compounds

CompoundFormulaElementMass percent
WaterH2OHydrogen11.19%
WaterH2OOxygen88.81%
Carbon dioxideCO2Carbon27.29%
Carbon dioxideCO2Oxygen72.71%
GlucoseC6H12O6Carbon40.00%
GlucoseC6H12O6Hydrogen 6.71%
GlucoseC6H12O6Oxygen53.29%
Sodium chlorideNaClSodium39.34%
Sodium chlorideNaClChlorine60.66%
AmmoniaNH3Nitrogen82.22%
Sodium bicarbonateNaHCO3Sodium27.37%
Copper(II) sulfateCuSO4Copper39.81%

Calculated from IUPAC 2021 standard atomic weights. All percentages for a given compound sum to 100%.

Frequently asked questions

What is percent composition by mass?

It is the percentage of a compound's total mass that comes from one particular element, found by dividing the element's contribution to the molar mass by the total molar mass and multiplying by 100. It is independent of sample size: the answer is the same for 1 g or 1 kg of the compound.

How do I enter a chemical formula with parentheses or water of crystallisation?

Type parentheses and a multiplier directly, for example Al2(SO4)3. For hydrates, separate the main compound and the water molecules with a period or middle dot, for example CuSO4.5H2O. Element symbols are case-sensitive: use a capital first letter and one optional lowercase letter (Fe, Cl, Na).

Should all the element percentages add up to 100%?

Yes. Because percent composition divides the entire molar mass among the elements, the mass percentages of every element in a compound sum to exactly 100%, with tiny rounding differences. Use the element-by-element breakdown table to verify this for any formula.

What is the difference between mass percent and mole percent?

Mass percent is the element's share of the total mass (element mass / compound mass x 100). Mole percent is the element's share of the total number of atoms in one molecule (element atom count / total atom count x 100). They give different numbers unless all elements have the same atomic mass, which never occurs in practice. This calculator computes mass percent, which is the standard meaning of percent composition in analytical chemistry.

How do I work backward from percent composition to an empirical formula?

Assume a 100 g sample so each mass percent becomes a number of grams. Divide each mass by the element's atomic mass to get moles. Divide all mole values by the smallest to get a ratio, and round to the nearest whole number. That ratio is the empirical formula. For example, a compound that is 40.00% C, 6.71% H, 53.29% O gives moles of 3.33, 6.66, and 3.33, then a ratio of 1:2:1, giving the empirical formula CH2O (the same as glucose, formaldehyde, and several other compounds).

Which elements does the formula mode support?

The calculator includes atomic masses for 40 common elements: H, He, Li, Be, B, C, N, O, F, Ne, Na, Mg, Al, Si, P, S, Cl, Ar, K, Ca, Sc, Ti, V, Cr, Mn, Fe, Co, Ni, Cu, Zn, Br, Kr, Rb, Sr, Ag, Sn, I, Ba, Pb, and Au. If your formula contains an element outside this list, switch to manual mode and enter the masses directly.

Sources

Written by Dr. Sofia Marchetti, PhD Chemist · Milan, Italy

Physical chemist and laboratory educator bringing rigorous solution science to accessible, accurate online tools.

Search 3,500+ calculators

Loading search…