Last updated: July 3, 2026
Percent Composition Calculator
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Quick Answer
Percent composition is the mass percentage of an element in a compound. It is calculated as (element mass contribution ÷ total molar mass) × 100, where the element contribution equals the number of atoms times atomic mass. For example, hydrogen in water is (2 × 1.008 ÷ 18.015) × 100 = 11.19%.
Percent composition equals the element's mass contribution divided by the compound's total molar mass, multiplied by one hundred. For water, hydrogen is about eleven point one nine percent and oxygen is about eighty eight point eight one percent by mass.
Key Takeaways
- Percent composition equals an element's molar-mass contribution divided by the compound molar mass, multiplied by 100.
- The element contribution is nᵢ × Aᵢ, not just the atomic mass when the formula has multiple atoms.
- A complete set of element percentages should total approximately 100% after rounding.
- Use the exact compound formula, including hydrates or groups, before calculating molar mass.
- Carry precision through intermediate steps and round only the final percent.
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Formula
mass percent = (element mass contribution / total molar mass) × 100
Where:
- % composition=Mass percent of the queried element(%)
- n_i=Number of atoms of element i in the formula(atoms)
- A_i=Atomic mass of element i(g/mol)
- M=Molar mass of the compound(g/mol)
Worked Examples
Hydrogen in water (H2O)
Water has two hydrogen atoms contributing 2 × 1.008 = 2.016 g/mol to a molar mass of 18.015 g/mol.
- 1Find the hydrogen contribution: 2 × 1.008 = 2.016 g/mol.
- 2Use the water molar mass: 18.015 g/mol.
- 3Apply mass percent = (2.016 ÷ 18.015) × 100.
- 4Hydrogen accounts for about 11.19% of water by mass.
Oxygen in carbon dioxide (CO2)
Carbon dioxide has two oxygen atoms contributing 2 × 16.00 = 32.00 g/mol to a molar mass of 44.01 g/mol.
- 1Find the oxygen contribution: 2 × 16.00 = 32.00 g/mol.
- 2Use the CO2 molar mass: 44.01 g/mol.
- 3Apply mass percent = (32.00 ÷ 44.01) × 100.
- 4Oxygen accounts for about 72.71% of CO2 by mass.
Sodium in sodium chloride (NaCl)
Sodium contributes 22.99 g/mol to the 58.44 g/mol molar mass of sodium chloride.
- 1Read the sodium contribution: 22.99 g/mol.
- 2Use the NaCl molar mass: 58.44 g/mol.
- 3Apply mass percent = (22.99 ÷ 58.44) × 100.
- 4Sodium accounts for about 39.34% of NaCl by mass.
Introduction
Percent composition tells you what fraction of a compound's molar mass comes from a chosen element. It is a mass-based percentage, so the element's contribution is calculated as number of atoms × atomic mass, then divided by the compound's total molar mass. This calculator applies the standard chemistry relation used in empirical-formula work, analytical composition checks, and stoichiometry. Atomic weights should come from an authoritative source such as IUPAC or NIST.
What is percent composition?
Percent composition is the percentage by mass of each element in a compound. For a single element, it answers: if you had one mole of the compound, what percent of that mass would be due to this element? The percentages for all elements in a correctly calculated formula should add to approximately 100%, allowing for rounding.
It is a mass percent, not an atom-count percent.
Each element's contribution is nᵢ × Aᵢ in g/mol.
The denominator is the molar mass of the whole compound.
A complete composition table should total about 100%.
Percent composition formula
The working equation is mass% = (element mass contribution ÷ compound molar mass) × 100. The element mass contribution is nᵢ × Aᵢ, where nᵢ is the element's subscript in the formula and Aᵢ is its atomic mass. For water, hydrogen contributes 2 × 1.008 = 2.016 g/mol and oxygen contributes about 16.00 g/mol; dividing each by 18.015 g/mol gives 11.19% H and 88.81% O.
Use the same atomic-weight precision for the numerator and denominator whenever possible.
How to calculate percent composition step by step
Start by writing the correct chemical formula. Count atoms of the element you care about, multiply that count by the element's atomic mass, and calculate or look up the molar mass of the full compound. Enter those two masses in this calculator to get the percent. If you need help finding the denominator, use the molar mass calculator; if you are converting a weighed sample first, the grams to moles calculator may help.
Count the queried element in the formula.
Multiply count × atomic mass to get its mass contribution.
Find the full compound molar mass.
Divide contribution by total molar mass and multiply by 100.
Repeat for each element if you need a full composition table.
Verified example values
Common classroom examples make useful checks because their totals are familiar. Water is about 11.19% hydrogen and 88.81% oxygen by mass. Carbon dioxide is about 27.29% carbon and 72.71% oxygen. Sodium chloride is about 39.34% sodium and 60.66% chlorine. These values differ slightly across references when atomic weights are rounded differently.
| Compound | Element | Contribution (g/mol) | Total molar mass (g/mol) | Mass % |
|---|---|---|---|---|
| H2O | H | 2.016 | 18.015 | 11.19% |
| H2O | O | 16.00 | 18.015 | 88.81% |
| CO2 | C | 12.011 | 44.01 | 27.29% |
| CO2 | O | 32.00 | 44.01 | 72.71% |
| NaCl | Na | 22.99 | 58.44 | 39.34% |
| NaCl | Cl | 35.45 | 58.44 | 60.66% |
Why percent composition matters
Percent composition connects a formula to measurable mass data. It is used to check purity, compare hydrate water content, convert elemental-analysis reports into empirical formulas, and estimate how much of a nutrient or contaminant is present in a compound. Analytical chemists often compare measured mass percentages with theoretical percentages computed from a proposed formula.
Empirical formula determination from combustion or elemental analysis.
Hydrate analysis, such as finding water percent in CuSO4·5H2O.
Quality-control checks against labelled composition.
Stoichiometry problems where mass fractions are needed.
Common mistakes to avoid
The most common error is using the atomic mass for one atom when the formula contains multiple atoms of that element. Another is dividing by only the sum of selected elements rather than by the full compound molar mass. Use current atomic-weight values from sources such as CIAAW, keep extra digits through the calculation, and round only the final percentage.
As a sanity check, calculate every element in the compound: the rounded percentages should sum close to 100%.
Quick Reference Card
Percent Composition — Quick Reference
Quick reference • Percent Composition Calculator
mass% = (element mass contribution ÷ total molar mass) × 100Valid range: 0% to 100% for a single element; all elements in a compound should total about 100%
Common Values
⚠ Watch Out
- •Do not forget to multiply atomic mass by the element subscript.
- •Divide by the molar mass of the entire compound, not by the selected element mass.
- •Use the formula exactly as written, including waters of hydration.
- •Avoid rounding intermediate masses if you need accurate percentages.
Pro Tips
- →Assume a 100 g sample when converting percent composition into an empirical formula.
- →Check your work by summing all element percentages to about 100%.
- →Use current IUPAC atomic weights for high-precision analytical work.
- →For a group such as water in a hydrate, add the group contribution first, then divide by total molar mass.
FAQs
What is percent composition in chemistry?
Percent composition is the mass percent of each element in a compound. It is calculated by dividing an element's molar-mass contribution by the compound's total molar mass and multiplying by 100.
How do I find the element mass contribution?
Multiply the number of atoms of that element in the chemical formula by the element's atomic mass. For hydrogen in H2O, the contribution is 2 × 1.008 = 2.016 g/mol.
Should all element percentages add to 100%?
Yes, a complete percent-composition table should add to about 100%. Small differences are normal because individual values are rounded.
Is percent composition the same as empirical formula?
No. Percent composition reports mass percentages. An empirical formula gives the simplest whole-number atom ratio. Percent composition data can be converted into an empirical formula by assuming a 100 g sample and converting masses to moles.
Why does rounding atomic masses change the answer?
Percent composition is a ratio of masses, so rounding the atomic masses or molar mass changes both numerator and denominator slightly. Use consistent precision and round at the end for the best result.
Can I use this calculator for hydrates or ions?
Yes. Use the total molar mass of the exact formula, including waters of hydration or charged species as written, and enter the mass contribution of the element or group you are evaluating.