Percent Composition CalculatorMass percent of every element, and how much of an element is in your sample
Work from a formula, from measured masses, or ask how many milligrams of sodium, iron or any element a given amount of compound contains.
How do you calculate percent composition?
Divide the total mass of each element in the formula by the compound’s molar mass, then multiply by 100. In NaCl (58.44 g/mol), sodium is 22.990 ÷ 58.44 × 100 = 39.34% and chlorine is 60.66%. From lab data, divide each element’s measured mass by the sample’s total mass instead.
Have results from an elemental analysis? Type your measured percentages into the table to compare them with theory. Within ±0.4 percentage points is the usual acceptance window.
| Element | Mass % | Atom % | Measured % | Difference |
|---|
Enter each element and the mass of it found in your sample (any one mass unit).
Next step: turn these percentages into a formula with the empirical formula calculator.
Percent composition formulas
How to use the percent composition calculator
- From a formula: type the formula. You get mass percent, atom percent and a chart. Add measured values to compare with theory.
- From sample masses: list each element and the mass found. The calculator normalises to 100%.
- Element in a sample: pick a compound and an element, enter a mass, and see how many milligrams or grams of that element it contains.
Worked examples
1. Glucose, C₆H₁₂O₆
Molar mass 180.156 g/mol. Carbon: 6 × 12.011 = 72.066 → 40.00%. Hydrogen: 12 × 1.008 = 12.096 → 6.71%. Oxygen: 6 × 15.999 = 95.994 → 53.28%.
2. Sodium in baking soda
Sodium bicarbonate, NaHCO₃, is 84.006 g/mol and contains one sodium (22.990), so it is 27.37% sodium. A 1 g dose of baking soda as an antacid delivers about 274 mg of sodium, close to 12% of a 2,300 mg daily limit. That is why pharmacists flag sodium-containing antacids for people on low-sodium diets.
3. Iron in an iron supplement
Ferrous sulfate heptahydrate, FeSO₄·7H₂O (278.0 g/mol), is 20.1% iron. A 325 mg tablet therefore provides about 65 mg of elemental iron, the figure printed on supplement labels as “elemental iron”.
Elemental content of common salts and supplements
| Compound | Element | Mass % | Element in 1 g |
|---|---|---|---|
| Sodium chloride (NaCl) | Sodium | 39.34% | 393 mg |
| Sodium bicarbonate (NaHCO₃) | Sodium | 27.37% | 274 mg |
| Potassium chloride (KCl) | Potassium | 52.45% | 524 mg |
| Calcium carbonate (CaCO₃) | Calcium | 40.04% | 400 mg |
| Ferrous sulfate·7H₂O | Iron | 20.09% | 201 mg |
| Magnesium oxide (MgO) | Magnesium | 60.30% | 603 mg |
| Zinc sulfate·7H₂O | Zinc | 22.74% | 227 mg |
Supplement and salt labels often list the compound weight, not the elemental weight. Percent composition is how you convert between the two.
Related chemistry calculators
Percent composition connects formulas to real samples. These tools take the next step.
Percent composition FAQs
Percent composition is the percentage by mass of each element in a compound. For water, hydrogen is 11.19% and oxygen is 88.81% of the total mass.
Mass percent of an element = (number of atoms × atomic weight ÷ molar mass of the compound) × 100. For sodium in NaCl: 22.990 ÷ 58.44 × 100 = 39.34%.
Divide the mass of each element by the total sample mass and multiply by 100. If a 4.6 g sample contains 2.4 g carbon, carbon is 2.4 ÷ 4.6 × 100 = 52.2%.
Multiply the sample mass by the element's mass fraction. 50 g of iron(III) oxide, Fe2O3, is 69.94% iron, so it contains 50 × 0.6994 = 34.97 g of iron.
Sodium makes up 27.37% of NaHCO3 by mass, so 1 g of baking soda contains about 274 mg of sodium. This kind of calculation matters when checking sodium intake from antacids.
For a pure compound calculated from its formula, yes. Experimental percentages may add to slightly less or more than 100% because of measurement error, impurities or elements that were not analysed.
Percent composition tells you how much of each element is present by mass. The empirical formula tells you the simplest whole-number ratio of atoms. You can convert between them with the empirical formula calculator.
No. A pure compound has the same percent composition whether you have 1 mg or 1 tonne, which is the law of definite proportions.
Chemists compare measured percentages from elemental analysis with theoretical values. For publication, results within about ±0.4 percentage points of the calculated values are widely accepted as evidence of purity.
Include the water of hydration in the formula, for example CuSO4·5H2O. Water then counts toward the hydrogen and oxygen percentages, and you can also see what fraction of the mass is water.
Divide the mass of the water molecules by the hydrate's molar mass. For CuSO4·5H2O, 5 × 18.015 ÷ 249.677 = 36.08% water.
No. Mass percent weighs each element by its atomic weight, while mole percent counts atoms. In water, hydrogen is 66.7% of the atoms but only 11.2% of the mass.
Sources
This percent composition calculator is for education and lab work. Elemental content figures are calculated from ideal formulas; product labels and certificates of analysis take priority for dosing.
