Toolvito

Works on this device

Elemental Composition Calculator

Type a chemical formula to see how much of its mass comes from each element. You can also find the mass of each element in a sample, or how much compound holds a mass of one element.

Enter your values

For example the percent composition of magnesium nitrate, Mg(NO3)2.

Your values

Element symbols with capital letters, such as Mg(NO3)2, C6H12O6 or CuSO4.5H2O.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

How to use this calculator

  1. Choose what you want to work out.
  2. Type the formula with capital letters for each element, such as Mg(NO3)2, C6H12O6 or CuSO4.5H2O.
  3. For a sample, enter its mass and choose the unit.
  4. Choose Calculate. The table shows each element; you can download it as a CSV file.

The formulas

  • Mass of an element in one mole = number of its atoms in the formula × its atomic weight.
  • Molar mass M = the sum of these masses.
  • Mass percent of an element = its mass in one mole ÷ M × 100.
  • Atom share (mole fraction of atoms) = its atoms ÷ all atoms in the formula × 100.
  • Mass of an element in a sample = mass percent ÷ 100 × mass of the sample.
  • Mass of compound that holds a mass of an element = mass of the element ÷ (mass percent ÷ 100).

To find an empirical or molecular formula from percentages, use the Chemical Formula Calculator. For a molar mass on its own, use the Molar Mass Calculator.

Worked example

Magnesium nitrate, Mg(NO3)2, has 1 Mg, 2 N and 6 O atoms. Its molar mass is 24.305 + 2 × 14.007 + 6 × 15.999 = 148.313 g/mol.

Mass percent of magnesium: 24.305 ÷ 148.313 × 100 = 16.3876 %. Nitrogen: 28.014 ÷ 148.313 × 100 = 18.8884 %. Oxygen: 95.994 ÷ 148.313 × 100 = 64.7239 %. The three add up to 100 %.

A 10 g sample holds 1.88884 g of nitrogen. To get 1 g of copper from copper(II) sulfate pentahydrate (CuSO4.5H2O, 249.677 g/mol, 25.4513 % copper), you need 3.92908 g of it.

Limits you should know

  • Atomic weights are the IUPAC abridged standard atomic weights (2021), with five significant figures. A real sample can differ a little in its isotopes.
  • Formulas may have brackets and hydrates. Charges, isotopes and elements without a standard atomic weight are not read.
  • The sample results assume a pure compound. They do not include water, other salts or impurities.
  • In mass spectrometry, "elemental composition" means finding a formula from an exact mass. This tool does not do that.

Related tools