Percent Composition from Chemical Formula Calculator
Enter a chemical formula such as C6H12O6, Ca(OH)2 or CuSO4·5H2O and get the molar mass plus the mass percent of every element in the compound. Optionally override the atomic masses used.
Mass Percent of Each Element in a Compound
Percent Composition Formula
Where:
- \(n_E\) — number of atoms of element \(E\) in the formula (the subscript)
- \(A_r(E)\) — atomic mass of element \(E\) (g/mol)
- \(M\) — molar mass of the whole compound (g/mol)
Each element's total mass in one mole of the compound is divided by the molar mass and expressed as a percentage. The percentages of all elements always add up to 100%.
Percent Composition – Calculation Example
Example: find the percent composition of glucose, C6H12O6.
\[ M = 6 \times 12.011 + 12 \times 1.008 + 6 \times 15.999 = 72.066 + 12.096 + 95.994 = 180.156 \text{ g/mol} \]
\[ \text{C: } \frac{72.066}{180.156} \times 100 = 40.002\% \quad \text{H: } \frac{12.096}{180.156} \times 100 = 6.714\% \quad \text{O: } \frac{95.994}{180.156} \times 100 = 53.287\% \]
Result: glucose is 40.002% carbon, 6.714% hydrogen and 53.287% oxygen by mass (molar mass 180.156 g/mol). In other words, 100 g of glucose contains 40.00 g of carbon, 6.71 g of hydrogen and 53.29 g of oxygen.
How to Use the Calculator
- Type the compound's formula into the Chemical Formula field. Element symbols are case-sensitive:
Cois cobalt, butCOis carbon monoxide. Parentheses and square brackets with multipliers (e.g.Ca(OH)2,Fe2(SO4)3) and hydrate dots (e.g.CuSO4·5H2O) are supported. - If you want to use atomic masses other than the built-in IUPAC values (for example, the rounded values from your textbook), enter them in the Atomic Masses (optional) field, one per line or separated by semicolons, in the format
Symbol: mass— for exampleCl: 35.45; Cu: 63.546. Leave the field empty to use standard values. - Read the results: the molar mass of the compound, a table with the mass percent of every element, and a step-by-step breakdown of the calculation.
What Is Percent Composition?
Percent composition (also called mass percent or percentage composition) tells you what fraction of a compound's mass comes from each chemical element. Water is 11.19% hydrogen and 88.81% oxygen by mass; table salt, NaCl, is 39.34% sodium and 60.66% chlorine. Because percent composition depends only on the formula and the atomic masses, it is the same for any sample of a pure compound, whether you have a milligram or a kilogram.
The result is easy to interpret practically: the mass percent of an element equals the grams of that element contained in 100 g of the compound. If a fertilizer label states that ammonium nitrate, NH4NO3, is 35.00% nitrogen, that means 35 g of nitrogen in every 100 g of fertilizer — a number you can verify with this calculator.
Percent composition is a standard tool in chemistry courses and in the lab. It is used to check the purity of a sample against its theoretical composition, to compare fertilizers by nutrient content, to analyze the composition of minerals and alloys, and as the first step in determining an empirical formula from experimental data. Together with related measures such as atom economy, it also helps evaluate how efficiently a synthesis incorporates starting material atoms into the desired product.
Assumptions and Practical Tips
- Natural isotope mixtures. The built-in atomic masses are IUPAC conventional values averaged over natural isotopic abundances, so the results describe an ordinary terrestrial sample. An enriched or synthetic isotopic sample would have a slightly different composition; use the atomic-mass overrides to model such cases.
- Whole-number subscripts. Subscripts are read as exact whole numbers. Ionic charge notation (e.g. SO4^2-) and dot-separated adducts other than hydrates are not supported — expand them into a single combined formula if needed.
- Hydrates. For hydrates like
CuSO4·5H2O, use the middle dot, an asterisk or a period between the salt and the water. The water of crystallization is included in the molar mass, so hydrogen and oxygen percentages reflect the full hydrate. - Check your capitalization. The most common input error is letter case.
Co(cobalt),CO(carbon monoxide) andCoO(cobalt(II) oxide) are all different compounds with very different compositions. - Rounding. Percentages are shown to three decimals and may sum to slightly more or less than 100% because of rounding; small deviations of ±0.01% are normal.
If you are working with reaction analysis rather than a single compound, you may also find the mass spectrometry m/z calculator useful, and the degree of unsaturation calculator can help you interpret the molecular formula once you have derived it.
Frequently Asked Questions
Why do my textbook's percentages differ slightly from the calculator's results?
Textbooks often use rounded atomic masses such as H = 1, C = 12, O = 16, while this calculator uses the more precise IUPAC values. For example, with rounded masses water is 11.1% hydrogen, but with 1.008 and 15.999 it is 11.19%. If you need to match your textbook exactly, enter its atomic masses in the optional field, e.g. H: 1; O: 16, and the percentages will be recalculated with those values.
What is the difference between mass percent and mole (atom) percent?
Mass percent is the fraction of the compound's total weight contributed by an element; mole percent is the fraction of the atoms. In water, hydrogen is 2 of 3 atoms (66.7 mole %) but only 11.19 mass %, because hydrogen atoms are much lighter than oxygen atoms. Percent composition always refers to mass percent unless stated otherwise, which is why the two numbers can look very different.
How can I use percent composition to find an empirical formula?
Take the mass percent of each element as grams, divide by its atomic mass to convert to moles, then divide every result by the smallest one. This gives a simple whole-number or near-whole-number ratio of atoms. For example, a compound that is 40.00% C, 6.71% H and 53.29% O gives a 1:2:1 ratio — the empirical formula CH2O. Multiply through by an integer if the ratios are fractional.
Can percent composition alone identify an unknown compound?
No. Percent composition gives only the empirical (simplest) ratio, and many different compounds share the same composition — glucose (C6H12O6), formaldehyde (CH2O) and acetic acid (C2H4O2) all have identical mass percentages. To identify the compound you also need its molar mass, typically measured by freezing-point depression or mass spectrometry, to convert the empirical formula into a molecular formula.
Does percent composition depend on how much of the compound I have?
No. Percent composition depends only on the formula and the atomic masses, so a milligram and a kilogram of the same pure compound have exactly the same percentages. What changes with sample size is the absolute mass of each element: 10 g of NaCl always contains 3.934 g of sodium and 6.066 g of chlorine, which is the same 39.34% / 60.66% split as any other amount.
How do I calculate percent composition by hand without a calculator?
Three steps: first, multiply each element's atomic mass by its subscript in the formula and add everything up to get the molar mass \(M\). Second, for each element compute \(n_E \times A_r(E)\), the mass of that element in one mole. Third, divide that mass by \(M\) and multiply by 100. Always double-check the subscripts of grouped terms first — a common slip is forgetting that (OH)2 means 2 oxygens and 2 hydrogens.
Why is the mass percent of water not shown separately for hydrates like CuSO4·5H2O?
The calculator treats the hydrate as a single compound, so the water's hydrogens and oxygens are merged with the salt's, and copper, sulfur and oxygen percentages are diluted by the added water mass. If you need the water content itself, compute the mass of 5 H2O (90.075 g) divided by the total molar mass of 249.68 g/mol — about 36.08% — which is how water content in hydrates is usually reported in gravimetric analysis.