Last updated: June 2026
Use this percent composition calculator to find the percentage by mass of each element in a compound. It is designed for O-Level, IGCSE, A-Level and Singapore H2 Chemistry students connecting chemical formulae, molar mass and percentage composition.
- Choose Chemical formula to let the calculator read the formula and calculate every element automatically.
- Enter a formula such as H2O, CO2, CaCO3 or (NH4)2SO4.
- Alternatively, choose Manual mass contributions and enter each element with its mass contribution.
- In manual mode, enter the molar mass or leave it blank to use the sum of the entered contributions.
- Select Calculate to see the percentage composition and full step-by-step working.
What is percent composition?
Percent composition is the percentage by mass of each element in a compound. Water contains hydrogen and oxygen, so its percent composition tells us what fraction of the mass comes from hydrogen and what fraction comes from oxygen.
Chemical formulae describe numbers of atoms, while laboratory measurements are usually made using mass. Percent composition connects these two ideas by converting the atomic composition of a formula into mass percentages.
Percent composition formula
The mass contribution of an element is found by multiplying the number of atoms of that element by its relative atomic mass, Ar.
How to calculate percent composition
First calculate the molar mass of the whole compound. Then calculate how much of that molar mass comes from each element. Dividing each contribution by the total molar mass gives its fraction by mass.
For H2O, hydrogen contributes 2 × 1.0 = 2.0, while oxygen contributes 1 × 16.0 = 16.0. The molar mass is therefore 18.0 g mol−1.
Worked examples
Example 1: Water, H2O
Example 2: Carbon dioxide, CO2
Example 3: Calcium carbonate, CaCO3
Calcium carbonate contains one calcium atom, one carbon atom and three oxygen atoms.
This gives approximately 40.1% calcium, 12.0% carbon and 48.0% oxygen by mass.
Using percent composition to find empirical formula
Percent composition can also be used in reverse to find an empirical formula. Assume a 100 g sample so that each percentage becomes a mass in grams. Convert each mass into moles and find the simplest whole-number ratio.
For 40.0% carbon, 6.7% hydrogen and 53.3% oxygen, treat the data as 40.0 g carbon, 6.7 g hydrogen and 53.3 g oxygen in a 100 g sample.
Common exam traps
Frequently Asked Questions
What does a percent composition calculator calculate?
It calculates the percentage by mass of each element in a compound from the chemical formula and relative atomic masses.
Is percent composition based on mass or atom count?
It is based on mass. Atom count matters because it determines the mass contribution of each element in the formula.
Why might the percentages not total exactly 100%?
Rounding each percentage can make the displayed total slightly above or below 100%.
How is percent composition related to empirical formula?
Percentage composition can be converted into an empirical formula by assuming a 100 g sample, converting each element’s mass into moles and finding the simplest ratio.
Can percent composition identify an unknown compound?
It can narrow down the possibilities and help determine an empirical formula, but molar mass, spectroscopy or chemical evidence may still be needed for a complete identification.
