Saved

Press the star next to a tool's name to save it.

All my tools

Percent Composition Calculator

Enter a chemical formula to see each element’s percentage by mass, along with the compound’s molar mass.

For example: H2O, Ca(OH)2 or CuSO4·5H2O. Capital letters matter.

Your result opens on the next page.

Molar mass

180.156 g/mol

Enter a formula to see its composition.

Percent composition formula

Percent composition tells you how much of a compound’s mass comes from each element.

Percent of an element = (atoms × atomic weight) ÷ molar mass × 100

Worked example: water

Water, H₂O, has 2 hydrogen atoms at 1.008 each and 1 oxygen atom at 15.999. Its molar mass is 2.016 + 15.999 = 18.015 g/mol. Hydrogen is 2.016 ÷ 18.015 = 11.19%, and oxygen is 15.999 ÷ 18.015 = 88.81%.

Common compounds

CompoundMolar massComposition
Water, H2O18.015 g/molH 11.19%, O 88.81%
Carbon dioxide, CO244.009 g/molC 27.29%, O 72.71%
Table salt, NaCl58.44 g/molNa 39.34%, Cl 60.66%
Glucose, C6H12O6180.156 g/molC 40%, H 6.71%, O 53.28%

How to type a formula

  • Capital letters matter: Co is cobalt, and CO is carbon monoxide.
  • Use brackets for groups: Ca(OH)2 or Al2(SO4)3.
  • Use a dot for hydrates: CuSO4·5H2O or CuSO4.5H2O.

About the atomic weights

This calculator uses the abridged standard atomic weights from IUPAC’s commission. Elements with no stable isotopes have no standard weight, so they aren’t included.

How to use the percent composition calculator

  1. Type the formula. Enter it in the Chemical formula box, such as NaHCO3, Ca(OH)2 or CuSO4·5H2O. You don’t need special subscript characters. Plain numbers after each symbol work.
  2. Check the capitals. Each element starts with a capital letter, and a second letter, if it has one, is lower case. The calculator tells you if it can’t read the formula or doesn’t know an element.
  3. Press Calculate. The result shows the molar mass in grams per mole, then one row for each element with its number of atoms and its share of the mass as a percent.
  4. Copy or share. The copied summary lists every element and its percent on one line, which is handy for lab notes.

Worked example: calcium hydroxide

Enter Ca(OH)2. The brackets mean the OH group appears twice, so the compound has 1 calcium atom, 2 oxygen atoms and 2 hydrogen atoms. The calculator adds 40.078 for calcium, 2 × 15.999 for oxygen and 2 × 1.008 for hydrogen to get a molar mass of 74.092 g/mol.

  • Calcium: 40.078 ÷ 74.092 × 100 = 54.09%
  • Oxygen: 31.998 ÷ 74.092 × 100 = 43.19%
  • Hydrogen: 2.016 ÷ 74.092 × 100 = 2.72%

The same steps work for a bigger formula. Al2(SO4)3 has 2 aluminum, 3 sulfur and 12 oxygen atoms, a molar mass of 342.132 g/mol, and is 15.77% aluminum, 28.11% sulfur and 56.12% oxygen.

Worked example: a hydrate

Copper(II) sulfate pentahydrate is written CuSO4·5H2O. The part after the dot is water held in the crystal, and the 5 in front means five water molecules. The calculator gives a molar mass of 249.677 g/mol and these shares: copper 25.45%, sulfur 12.84%, oxygen 57.67% and hydrogen 4.04%.

To find how much of the hydrate is water, run the calculator twice. Without the water, CuSO4 is 159.602 g/mol. The difference, 249.677 − 159.602 = 90.075 g/mol, is the water. Divide it by the hydrate’s molar mass: 90.075 ÷ 249.677 × 100 = about 36.08% water by mass. This is the kind of figure you compare with a heating experiment, where you weigh a hydrate before and after driving the water off.

From percent to grams in a sample

Percent composition also tells you how much of an element is in any amount of the compound. Multiply the sample’s mass by the element’s percent. Iron(III) oxide, Fe2O3, is 69.94% iron, so a 50 g sample holds 50 × 69.94 ÷ 100 = 34.97 g of iron. The rest, about 15.03 g, is oxygen. This works for any mass unit, because a percent by mass doesn’t depend on the unit.

How precise are the results?

The IUPAC commission says abridged standard atomic weights are given to five significant figures unless that precision can’t be reached, because isotope mixes vary in normal materials or measurements are limited.[1] Each value comes with an uncertainty. Chlorine, for example, is listed as 35.45 ± 0.01, and sulfur as 32.06 ± 0.02.[1] So the last digit of a molar mass can shift a little from one table to another.

The calculator shows the molar mass to three decimal places and each percent to two. Because each percent is rounded on its own, the column may add up to 99.99% or 100.01% instead of exactly 100%. Glucose shows this: 40% + 6.71% + 53.28% = 99.99%. That small gap is rounding, not a mistake in the formula.

Percent composition and empirical formulas

Percent composition and the empirical formula are two sides of the same calculation. Here you start from a formula and get the percents. If you start from lab results, such as a sample that is 40% carbon, 6.71% hydrogen and 53.28% oxygen, the empirical formula calculator works back to the simplest whole-number ratio of atoms. Glucose, C6H12O6, and formaldehyde, CH2O, have the same percent composition, because one is six times the other. Percents alone can’t tell them apart. You also need the molar mass, which you can check with the molar mass calculator.

Common mistakes

  • Writing lower-case symbols. co or nacl won’t be read. Type Co for cobalt, CO for carbon monoxide and NaCl for salt.
  • Leaving out brackets. CaOH2 is read as 1 calcium, 1 oxygen and 2 hydrogen atoms, which isn’t calcium hydroxide. Use Ca(OH)2.
  • Using a decimal point in a count. A full stop is read as the hydrate dot, so CuSO4.5H2O means CuSO4 with five waters, not 4.5 oxygen atoms.
  • Adding charges or states. Leave out signs such as 2+ and labels such as (aq). Enter the neutral formula only.
  • Mixing up mass and atom percent. Water has twice as many hydrogen atoms as oxygen atoms, yet hydrogen is only 11.19% of its mass, because each hydrogen atom is much lighter.

What next

Use this often? Add Percent Comp to your Home screen.

Frequently asked questions

How do I calculate percent composition?

For each element, multiply its atoms by its atomic weight, divide by the molar mass, then multiply by 100. Water is 11.19% hydrogen and 88.81% oxygen.

What is the percent composition of glucose?

Glucose, C6H12O6, is about 40% carbon, 6.71% hydrogen and 53.28% oxygen by mass.

Does capitalization matter in a formula?

Yes. Co is the element cobalt, while CO is carbon monoxide, made of carbon and oxygen.

Why isn’t my element accepted?

Elements with no stable isotopes, such as technetium, have no standard atomic weight, so this calculator doesn’t include them.

How do I enter a hydrate in the percent composition calculator?

Put a dot between the salt and the water, such as CuSO4·5H2O or CuSO4.5H2O. The number after the dot is how many water molecules there are. Copper(II) sulfate pentahydrate comes out at 249.677 g/mol.

Why don’t the percentages add up to exactly 100?

Each percent is rounded to two decimal places on its own, so the total can be 99.99% or 100.01%. Glucose shows 40%, 6.71% and 53.28%, which add up to 99.99%.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Physics & Science Tools