Percent Composition Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter the number of atoms of each element in the formula; elements left at 0 show 0%.
Result
C (mass %)
Molar mass (g/mol)
- H (mass %)
- N (mass %)
- O (mass %)
- S (mass %)
- P (mass %)
- Cl (mass %)
- Na (mass %)
- K (mass %)
- Ca (mass %)
- Mg (mass %)
- Fe (mass %)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- C atoms (atomic weight 12.011): enter 0 or more.
- H atoms (atomic weight 1.008): enter 0 or more.
- N atoms (atomic weight 14.007): enter 0 or more.
- O atoms (atomic weight 15.999): enter 0 or more.
- S atoms (atomic weight 32.06): enter 0 or more.
- P atoms (atomic weight 30.974): enter 0 or more.
- Cl atoms (atomic weight 35.45): enter 0 or more.
- Na atoms (atomic weight 22.99): enter 0 or more.
- K atoms (atomic weight 39.098): enter 0 or more.
- Ca atoms (atomic weight 40.078): enter 0 or more.
- Mg atoms (atomic weight 24.305): enter 0 or more.
- Fe atoms (atomic weight 55.845): enter 0 or more.
- Read the result: C (mass %); the panel also shows Molar mass (g/mol), H (mass %), N (mass %), O (mass %), S (mass %), P (mass %), Cl (mass %), Na (mass %), K (mass %), Ca (mass %), Mg (mass %) and Fe (mass %).
How this calculator works
Mass percent of an element = (number of atoms × atomic weight) ÷ molar mass × 100. Atomic weights: CIAAW abridged standard atomic weights 2024 (ciaaw.org/abridged-atomic-weights.htm, read 2026-10-27).
The percentages add up to 100%. For the reverse problem, from percentages to a formula, use the empirical formula calculator.
The formula
| Symbol | Meaning | Unit |
|---|---|---|
| C atoms (atomic weight 12.011) | ||
| H atoms (atomic weight 1.008) | ||
| N atoms (atomic weight 14.007) | ||
| O atoms (atomic weight 15.999) | ||
| S atoms (atomic weight 32.06) | ||
| P atoms (atomic weight 30.974) | ||
| Cl atoms (atomic weight 35.45) | ||
| Na atoms (atomic weight 22.99) | ||
| K atoms (atomic weight 39.098) | ||
| Ca atoms (atomic weight 40.078) | ||
| Mg atoms (atomic weight 24.305) | ||
| Fe atoms (atomic weight 55.845) | ||
| Molar mass | g/mol | |
| C (mass %) | % |
Worked example
| C atoms (atomic weight 12.011) | 6 |
|---|---|
| H atoms (atomic weight 1.008) | 12 |
| N atoms (atomic weight 14.007) | 0 |
| O atoms (atomic weight 15.999) | 6 |
| S atoms (atomic weight 32.06) | 0 |
| P atoms (atomic weight 30.974) | 0 |
| Cl atoms (atomic weight 35.45) | 0 |
| Na atoms (atomic weight 22.99) | 0 |
| K atoms (atomic weight 39.098) | 0 |
| Ca atoms (atomic weight 40.078) | 0 |
| Mg atoms (atomic weight 24.305) | 0 |
| Fe atoms (atomic weight 55.845) | 0 |
| Molar mass (g/mol) | 180.156 |
|---|---|
| H (mass %) | 6.71% |
| O (mass %) | 53.28% |
C (mass %) 40%
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What is the percent composition of water?
H 11.19% and O 88.81% (2.016 and 15.999 out of 18.015 g/mol).
What is the percent of carbon in glucose?
72.066 ÷ 180.156 = 40%.