Percent composition calculator
This percent composition calculator gives the mass percent of every element in a compound. Example: glucose (C6H12O6) is 40 % carbon by mass.
Source: IUPAC CIAAW – Abridged Standard Atomic Weights (Atomic Weights 2021, Revision 2024). Updated: .
How it is calculated
The percent composition of a compound states what share of the total mass each element contributes. It follows from the chemical formula and the atomic weights and is used for purity checks, for working out a formula, or for fertiliser calculations.
Formula
w(element) = number of atoms · atomic weight / molar mass of the compound · 100 %. The molar mass M is the sum of all atomic weights in the formula. The mass percentages of all elements add up to 100 %. For a sample of mass m, the sample contains m · w / 100 grams of that element.
Worked example
Glucose, C6H12O6: the molar mass is M = 6 · 12.011 + 12 · 1.008 + 6 · 15.999 = 180.156 g/mol. This gives w(C) = 40 %, w(H) = 6.71 % and w(O) = 53.28 %. A 50 g sample contains 20 g carbon, 3.36 g hydrogen and 26.64 g oxygen. Water (H2O, M = 18.015 g/mol) is 11.19 % hydrogen and 88.81 % oxygen by mass; table salt (NaCl) is 39.34 % sodium and 60.66 % chlorine.
- The calculator understands brackets (Ca(OH)2) and hydrate dots (CuSO4·5H2O).
- The percentages always add to 100 %; deviations come only from rounding.
- Mass percent is not the same as mole percent – the latter counts atoms, not grams.
Frequently asked questions
How do you calculate the percent composition of a compound?
Divide atom count times atomic weight of each element by the molar mass and multiply by 100. For glucose this gives 40 % carbon.
What is the difference between mass percent and mole percent?
Mass percent refers to grams, mole percent to the number of atoms or particles. In water 11.19 % of the mass is hydrogen, but two thirds of the atoms are.
How do I find the grams of an element in a sample?
Sample mass times mass percent divided by 100. For 50 g of glucose that is 20 g carbon.
Sources and legal basis
- IUPAC CIAAW – Abridged Standard Atomic Weights (Atomic Weights 2021, Revision 2024)
- IUPAC Gold Book: mass fraction
As of: · Editorial policy
Related tools
- Average atomic mass calculator: weighted mean of isotope massesAverage atomic mass calculator: isotope masses and abundances give the weighted average in u, or find the abundance of two isotopes from the average mass.
- Empirical formula calculator with molecular formulaEmpirical formula calculator: enter mass percent or grams per element to get the empirical formula with steps and, with the molar mass, the molecular formula.
- Molar Mass CalculatorCalculate molar mass in g/mol from any chemical formula – with brackets, hydrates like CuSO4·5H2O, mass percent by element, working steps and n = m/M.
- Grams to Moles CalculatorGrams to moles calculator (and back) using molar mass: amount n = m / M, plus the number of particles via the Avogadro constant, with the steps and an example.
- Mole fraction calculatorMole fraction calculator for up to three substances from moles or from masses and molar masses – with percentages, a check sum and the calculation steps.
- Percent Yield CalculatorPercent yield calculator from actual and theoretical yield; the theoretical yield can be worked out from the limiting reagent and the balanced equation.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- LM317 calculator: output voltage, R2 and constant currentLM317 calculator: output voltage from R1 and R2, R2 for a target voltage or the resistor for a constant current source, using the TI data sheet formula.
- Center of mass calculator for up to four massesCenter of mass calculator: x and y coordinates of the centre of mass of up to four point masses – or the centroid of a composite shape from its part areas.