By Tim King · Updated
Percent Composition Calculator
Mass Percent of Each Element in a Formula, With Grams in a Sample
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Percent Composition Calculator works
This percent composition calculator splits a chemical formula into the share of its mass that comes from each element. Type a formula such as C6H12O6 or Fe2O3 to see every element's mass percent with the working, and add a sample mass to see how many grams of each element it holds.
Percent composition answers questions like how much iron is in iron ore or how much nitrogen a fertiliser supplies. It is also the starting point for working backwards from a lab analysis to an empirical formula. The percentages always add up to 100%, give or take rounding.
How the percent composition calculator works
The formula is mass % of an element = (atoms of that element × atomic mass) ÷ molar mass × 100. The calculator finds the molar mass first, then each element's contribution, and lists them from the largest share to the smallest.
First example. Glucose, C6H12O6, has a molar mass of 180.156 g/mol. Carbon contributes 6 × 12.011 = 72.066 g, which is 40.00%. Hydrogen is 6.71% and oxygen 53.28%, so a 50 g sample holds about 20 g of carbon.
Second example. Iron(III) oxide, Fe2O3, is 2 × 55.845 ÷ 159.687 = 69.94% iron and 30.06% oxygen. A tonne of pure haematite contains about 699 kg of iron.
How many grams of nitrogen are in 1 kg of ammonium nitrate? NH4NO3 is 35.0% nitrogen, so 1 kg holds about 350 g.
Percent composition of common compounds by mass
| Compound | Formula | Mass % by element |
|---|---|---|
| Water | H2O | H 11.19%, O 88.81% |
| Carbon dioxide | CO2 | C 27.29%, O 72.71% |
| Oxygen | O2 | O 100.00% |
| Nitrogen | N2 | N 100.00% |
| Methane | CH4 | C 74.87%, H 25.13% |
| Ammonia | NH3 | N 82.24%, H 17.76% |
| Sodium chloride | NaCl | Na 39.34%, Cl 60.66% |
| Ethanol | C2H5OH | C 52.14%, H 13.13%, O 34.73% |
| Glucose | C6H12O6 | C 40.00%, H 6.71%, O 53.28% |
| Sucrose | C12H22O11 | C 42.11%, H 6.48%, O 51.41% |
| Sulfuric acid | H2SO4 | H 2.06%, S 32.69%, O 65.25% |
| Hydrochloric acid | HCl | H 2.76%, Cl 97.24% |
| Nitric acid | HNO3 | H 1.60%, N 22.23%, O 76.17% |
| Sodium hydroxide | NaOH | Na 57.48%, O 40.00%, H 2.52% |
| Calcium carbonate | CaCO3 | Ca 40.04%, C 12.00%, O 47.96% |
| Sodium bicarbonate | NaHCO3 | Na 27.37%, H 1.20%, C 14.30%, O 57.14% |
| Acetic acid | CH3COOH | C 40.00%, H 6.71%, O 53.28% |
| Hydrogen peroxide | H2O2 | H 5.93%, O 94.07% |
| Propane | C3H8 | C 81.71%, H 18.29% |
| Potassium permanganate | KMnO4 | K 24.74%, Mn 34.76%, O 40.50% |
| Calcium hydroxide | Ca(OH)2 | Ca 54.09%, O 43.19%, H 2.72% |
| Iron(III) oxide | Fe2O3 | Fe 69.94%, O 30.06% |
| Aspirin | C9H8O4 | C 60.00%, H 4.48%, O 35.52% |
| Caffeine | C8H10N4O2 | C 49.48%, H 5.19%, N 28.85%, O 16.48% |
Tips and pitfalls
- Use mass, not atom count. Water is two-thirds hydrogen by atoms but only 11.2% hydrogen by mass, because oxygen atoms are 16 times heavier.
- Hydrates include the water. CuSO4·5H2O is 25.5% copper, while anhydrous CuSO4 is 39.8%.
- Expect rounding totals. Rounded percentages may add to 99.99% or 100.01%; that is not an error.
- Purity is separate. A real ore or fertiliser is a mixture, so multiply by its purity to get the actual element content.
FAQ
How do you calculate percent composition?
Find the molar mass of the compound, then for each element multiply its atomic mass by the number of atoms and divide by the molar mass. Multiply by 100 to get a percentage. For water, 2 × 1.008 ÷ 18.015 × 100 gives 11.19% hydrogen.
What is the percent composition of water?
Water is 11.19% hydrogen and 88.81% oxygen by mass. Even though each molecule has two hydrogen atoms and one oxygen, the oxygen atom is so much heavier that it makes up almost nine-tenths of the mass of any amount of water.
How is percent composition used to find an empirical formula?
Treat the percentages as grams in a 100 g sample, divide each by its atomic mass to get moles, then divide by the smallest number of moles to get the ratio. The empirical formula calculator on this site does those steps for you.
Do the percentages always add up to 100?
For a pure compound the exact values add to exactly 100%, because every gram of the compound belongs to one of its elements. Displayed values are rounded, so the sum shown might be a hundredth or two away from 100.
Can I find the mass of an element in a sample?
Yes. Enter the sample mass and the calculator multiplies it by each element's mass fraction. A 50 g sample of glucose contains 20.0 g of carbon, 3.36 g of hydrogen and 26.6 g of oxygen.
See also: all Chemistry tools, Physics, Electronics.
Related tools
Molar Mass Calculator
Molar mass of any formula, brackets and hydrates included.
Empirical Formula Calculator
Empirical and molecular formula from percent or grams.
Grams To Moles Converter
Grams to moles and back for any formula.
Interactive Periodic Table
All 118 elements, coloured by category, block or property.
Chemical Equation Balancer
Balance any chemical equation with whole-number coefficients.