Percent Composition Calculator

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.

Key takeaway: Percent composition tells you what percentage of a compound’s mass comes from each element. Find the mass contribution of the element, divide by the molar mass of the compound, and multiply by 100%.
How to use this calculator
  1. Choose Chemical formula to let the calculator read the formula and calculate every element automatically.
  2. Enter a formula such as H2O, CO2, CaCO3 or (NH4)2SO4.
  3. Alternatively, choose Manual mass contributions and enter each element with its mass contribution.
  4. In manual mode, enter the molar mass or leave it blank to use the sum of the entered contributions.
  5. 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

percentage of an element = mass contribution of the element ÷ molar mass of the compound × 100%

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

Mr = 2(1.0) + 16.0 = 18.0
percentage H = 2.0 ÷ 18.0 × 100% = 11.1%
percentage O = 16.0 ÷ 18.0 × 100% = 88.9%

Example 2: Carbon dioxide, CO2

Mr = 12.0 + 2(16.0) = 44.0
percentage C = 12.0 ÷ 44.0 × 100% = 27.3%
percentage O = 32.0 ÷ 44.0 × 100% = 72.7%

Example 3: Calcium carbonate, CaCO3

Calcium carbonate contains one calcium atom, one carbon atom and three oxygen atoms.

Mr = 40.1 + 12.0 + 3(16.0) = 100.1

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

Trap 1: Percent composition is based on mass, not simply on the number of atoms.
Trap 2: Multiply Ar by the number of atoms. In CO2, oxygen contributes 2 × 16.0, not 16.0.
Trap 3: The percentages should add up to approximately 100%. A small difference can arise from rounding.
Trap 4: Percent composition gives mass percentages, whereas an empirical formula gives the simplest atom ratio.
Trap 5: Check brackets carefully. In (NH4)2SO4, the bracket multiplier applies to both N and H.

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.

Scroll to Top