⚗️ Percent Composition Calculator – Find the Mass Percentage of Every Element
The Percent Composition Calculator instantly tells you what fraction of a compound's mass comes from each element. Enter any chemical formula — from simple molecules like H₂O to complex salts like (NH₄)₂SO₄ — and get a full breakdown in seconds.
📘 What Is Percent Composition?
Percent composition (also called mass percent) expresses the proportion of each element's mass relative to the compound's total molar mass. The formula is:
% element = (mass of element in 1 mol ÷ molar mass of compound) × 100Because all element masses must add up to the total, the percentages always sum to 100%. For example, water (H₂O) is roughly 11.19% hydrogen and 88.81% oxygen by mass — information that is invisible from the formula alone.
⚙️ How the Calculator Works
The calculation follows four straightforward steps that the tool executes automatically:
- Parse the formula — The formula is broken into element symbols and their subscripts, including groups inside parentheses or brackets.
- Look up atomic masses — IUPAC 2021 standard atomic weights are used for every element (e.g., H = 1.008 g/mol, O = 15.999 g/mol).
- Compute each element's mass contribution — atomic mass × subscript count (e.g., O in H₂O: 15.999 × 1 = 15.999 g/mol).
- Divide and multiply — element mass ÷ total molar mass × 100 gives the percentage for that element.
📐 Worked Example: Ca(OH)₂ (Calcium Hydroxide)
Calcium hydroxide is widely used in construction (lime mortar) and water treatment. Its composition calculation proceeds as follows:
Ca: 40.078 × 1 = 40.078 g/mol
O: 15.999 × 2 = 31.998 g/mol
H: 1.008 × 2 = 2.016 g/mol
─────────────────────────────────
Total molar mass = 74.092 g/mol
% Ca = (40.078 ÷ 74.092) × 100 = 54.09%
% O = (31.998 ÷ 74.092) × 100 = 43.19%
% H = ( 2.016 ÷ 74.092) × 100 = 2.72%🧪 Supported Formula Syntax
The parser handles a wide range of chemical notation:
- Simple formulas —
NaCl,CO₂,CH₄ - Parentheses and brackets —
Ca(OH)₂,K₄[Fe(CN)₆],Al₂(SO₄)₃ - Nested groups —
(NH₄)₂SO₄,(CH₂)ₙ-style polymers - Hydrates —
CuSO₄·5H₂Ousing a middle dot or period - Multi-letter elements —
Na,Fe,Mg,Zn, etc.
Important: Element symbols are case-sensitive. Co is cobalt, but CO means carbon + oxygen.
🔬 Real-World Applications
- Analytical chemistry — Verify compound purity by comparing theoretical composition with combustion analysis data.
- Fertiliser labelling — Agrochemical grades list N-P-K percentages, which are simply the percent compositions of nitrogen, phosphorus (as P₂O₅), and potassium (as K₂O).
- Empirical formula determination — Percent composition is the starting point for deriving empirical formulas from mass spectrometry or elemental analysis.
- Industrial quality control — Cement, steel alloys, and glass manufacturers specify strict elemental percentages that must be checked at each production batch.
- Nutrition and food science — Macronutrient percentages in food molecules (carbohydrates, fats, proteins) are a form of percent composition.
💡 Tips for Accurate Input
- Type element symbols in standard capitalisation: first letter uppercase, second (if any) lowercase — e.g.,
Na, notNAorna. - Omit spaces inside the formula. Spaces are not part of standard chemical notation.
- For hydrates, use
·(middle dot, U+00B7) or a regular period:CuSO4.5H2Oworks just as well asCuSO4·5H2O. - Charge annotations like
+or2-at the end of a formula are automatically stripped, since charge does not affect molar mass.
📊 Interpreting the Results
The calculator displays each element's mass contribution (in g/mol) and its percentage by mass, accompanied by a colour-coded pie chart and progress bars for quick visual comparison. Use the Show Steps button to see the full arithmetic, and the CSV button to export results for reports or spreadsheets.
All calculations are performed locally in your browser — no data is sent to any server.