Percent Composition Calculator
Type a formula to see what share of its mass each element makes up…
Type a formula to see what share of its mass each element makes up, how that compares with its share of the atoms, and how many grams of each a sample holds.
Read as CO(NH2)2
Element
How much of each element a sample of this size holds.
ExampleNitrogen in CO(NH₂)₂
46.65%
2 × 14.007 = 28.014 g of every 60.056 g/mol is nitrogen: 466 g in a 1000 g sample.
Type your own formula.
- C20.00% of mass, 12.5% of atoms
- O26.64% of mass, 12.5% of atoms
- N46.65% of mass, 25.0% of atoms
- H6.71% of mass, 50.0% of atoms
- Carbon
- 20.00% · 200 g
- Oxygen
- 26.64% · 266 g
- Hydrogen
- 6.71% · 67.1 g
How this works: 4 sources,
How this works
Method
Percent composition is each element’s share of a compound’s mass. Take the mass of that element in one mole (its atomic weight times its number of atoms), divide by the molar mass and multiply by 100. In urea, CO(NH2)2, the two nitrogen atoms weigh 2 × 14.007 = 28.014 g of the 60.056 g in a mole, so urea is 46.6% nitrogen. Full method
Sources
How it’s tested
2 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.
Privacy
On your device. Nothing you enter or open leaves this browser. About privacy labels
Changes
- First published: molar mass with each element’s share of the mass and atoms, grams to moles and back, percent composition, empirical formula, limiting reagent, theoretical and percent yield.
How to calculate percent composition
Percent composition is each element’s share of a compound’s mass. Take the mass of that element in one mole (its atomic weight times its number of atoms), divide by the molar mass and multiply by 100. In urea, CO(NH2)2, the two nitrogen atoms weigh 2 × 14.007 = 28.014 g of the 60.056 g in a mole, so urea is 46.6% nitrogen.
A share of the atoms is not a share of the mass. Water has two hydrogen atoms for every oxygen, so hydrogen is two thirds of its atoms, but hydrogen is so light that it is only 11.2% of the mass. The two bars on the tool show both shares side by side, which is where that difference jumps out.
With a sample mass, the same shares tell you how much of each element you have: a 1 kg bag of urea holds 466 g of nitrogen. That is how fertiliser labels are compared: the nitrogen figure on the bag is the nitrogen percent of what is inside.
mass % of element = (atoms × atomic weight) ÷ molar mass × 100
- Every percentage here is built from CIAAW’s standard atomic weights; for the elements whose weight varies in nature (H, C, N, O, S, Cl…) the conventional value is used. Source: CIAAW, Standard Atomic Weights 2024.
- Percent composition can be calculated from a formula, or measured by analysing a sample and then used to work out the formula. Source: OpenStax Chemistry 2e, 3.2 Determining Empirical and Molecular Formulas.
Nitrogen in common fertilisers
The mass percent of nitrogen in pure nitrogen fertiliser compounds, from their formulas.
| Fertiliser | Formula | Molar mass (g/mol) | Nitrogen (% by mass) |
|---|---|---|---|
| Anhydrous ammonia | NH₃ | 17.031 | 82.2 |
| Urea | CO(NH₂)₂ | 60.056 | 46.6 |
| Ammonium nitrate | NH₄NO₃ | 80.043 | 35.0 |
| Ammonium chloride | NH₄Cl | 53.489 | 26.2 |
| Ammonium sulfate | (NH₄)₂SO₄ | 132.134 | 21.2 |
| Diammonium phosphate | (NH₄)₂HPO₄ | 132.056 | 21.2 |
| Monoammonium phosphate | NH₄H₂PO₄ | 115.025 | 12.2 |
| Calcium nitrate | Ca(NO₃)₂ | 164.086 | 17.1 |
| Potassium nitrate | KNO₃ | 101.102 | 13.9 |
| Sodium nitrate | NaNO₃ | 84.994 | 16.5 |
Show all 11 rowsShow fewer
| Calcium cyanamide | CaCN₂ | 80.103 | 35.0 |
Common questions
Do the percentages always add up to 100?
Yes, exactly, when they come from a formula. Measured percentages from a lab analysis usually add up to a little more or less because of experimental error, and the gap is often the oxygen, which is found by difference.
How is percent composition different from mass percent of a solution?
Percent composition is about the elements inside one compound. Mass percent of a solution is about how much of one compound is dissolved in a mixture, such as 5 g of salt in 100 g of salt water.
Can I get the formula back from the percentages?
You can get the simplest ratio, the empirical formula, and with the molar mass the molecular formula too. That is the reverse calculation, on the empirical formula page.