Percent Composition Calculator
Calculate the percent composition by mass of each element in any chemical formula. Shows a visual breakdown bar for each element. Enter any formula including parenthesised groups like Ca(OH)2 or Fe2(SO4)3.
Explore all Chemistry Calculators
Molar mass, empirical formula, atom calculator and more -- all free.
Rate this tool
Why use the LazyTools Percent Composition Calculator?
Parse any formula
Handles H2O, Ca(OH)2, Fe2(SO4)3, hydrates and any standard chemical formula.
Visual bar for each element
A proportional bar shows each element's contribution at a glance alongside the percentage.
Molar mass also shown
The total molar mass is displayed alongside the percent composition.
Percentages sum to 100%
All contributions are calculated relative to total molar mass so they sum exactly to 100%.
8 pre-loaded examples
Click H2O, NaCl, CO2, glucose and others to populate instantly.
Free, no signup
Runs in your browser.
How to use this tool in three steps
Enter formula
Type any chemical formula. Or click a pre-loaded example.
Click Calculate
Percent by mass for each element appears with a visual bar.
Read breakdown
Each element shows count, contribution in g/mol and percent.
Copy result
Click Copy for lab reports or assignments.
LazyTools vs other Percent Composition Calculator tools
| Feature | LazyTools | Omnicalculator | Webqc | ChemCalc |
|---|---|---|---|---|
| Any formula input | YES | ✓ Yes | ✓ Yes | ✓ Yes |
| Visual bar chart | YES | ✗ No | ✗ No | ✗ No |
| Molar mass shown | YES | ✓ Yes | ✓ Yes | ✓ Yes |
| Pre-loaded examples | YES | ✗ No | ✗ No | ✗ No |
| No signup | YES | ✓ Yes | ✓ Yes | ✓ Yes |
Percent composition of common compounds
| Compound | Formula | %C | %H | %O | %Other |
|---|---|---|---|---|---|
| Water | H2O | -- | 11.19 | 88.81 | -- |
| CO2 | CO2 | 27.29 | -- | 72.71 | -- |
| Glucose | C6H12O6 | 40.00 | 6.71 | 53.29 | -- |
| Ammonia | NH3 | -- | 17.76 | -- | 82.24% N |
| NaCl | NaCl | -- | -- | -- | 39.34% Na, 60.66% Cl |
| CaCO3 | CaCO3 | 12.00 | -- | 47.96 | 40.04% Ca |
| H2SO4 | H2SO4 | -- | 2.06 | 65.25 | 32.69% S |
| Ethanol | C2H5OH | 52.14 | 13.13 | 34.73 | -- |
Percent Composition Calculator: Complete Guide
Percent composition is the mass percentage of each element in a compound. Formula: %Element = (mass of element in formula / molar mass of compound) x 100. For water H2O (M = 18.015 g/mol): %H = (2 x 1.008 / 18.015) x 100 = 11.19%. %O = (15.999 / 18.015) x 100 = 88.81%. The percentages always sum to 100%.
How to calculate percent composition from a formula
Step 1: calculate the molar mass of the compound. Step 2: for each element, multiply the atomic mass by the subscript. Step 3: divide by the molar mass and multiply by 100. Example: glucose C6H12O6, M = 180.156 g/mol. %C = (6 x 12.011 / 180.156) x 100 = (72.066 / 180.156) x 100 = 40.00%. %H = (12 x 1.008 / 180.156) x 100 = (12.096 / 180.156) x 100 = 6.71%. %O = (6 x 15.999 / 180.156) x 100 = (95.994 / 180.156) x 100 = 53.29%. Sum = 100.00%. Example 2: ammonia NH3, M = 17.031 g/mol. %N = (14.007 / 17.031) x 100 = 82.24%. %H = (3 x 1.008 / 17.031) x 100 = 17.76%.
Using percent composition to find empirical formula
Combustion analysis gives the percent composition of an organic compound. To find the empirical formula: Step 1: assume 100 g sample. Step 2: mass of each element = its percentage in grams. Step 3: divide each mass by atomic mass to get moles. Step 4: divide all moles by the smallest value. Step 5: round to whole numbers (multiply if necessary). Example: a compound is 40.00% C, 6.71% H and 53.29% O. In 100 g: C = 40.00/12.011 = 3.33 mol; H = 6.71/1.008 = 6.66 mol; O = 53.29/15.999 = 3.33 mol. Divide by smallest (3.33): C:H:O = 1:2:1. Empirical formula: CH2O. If the molar mass is 180 g/mol and empirical formula mass is 30, the molecular formula is (CH2O)6 = C6H12O6 = glucose.
Percent composition for ionic compounds and hydrates
For ionic compounds, use the formula unit. CaCO3 (M = 100.086 g/mol): %Ca = 40.078/100.086 x 100 = 40.04%. %C = 12.011/100.086 x 100 = 12.00%. %O = (3 x 15.999)/100.086 x 100 = 47.96%. For hydrates, include water. CuSO4.5H2O (M = 249.685 g/mol): mass of water = 5 x 18.015 = 90.075 g/mol. %H2O = 90.075/249.685 x 100 = 36.08%. This percentage water calculation is used to determine the degree of hydration of a salt and to verify the formula of a hydrate by thermal gravimetric analysis (TGA).
Percent composition in chemical analysis
Percent composition is used in qualitative and quantitative chemical analysis. Elemental analysis (CHN analysis) measures the percent carbon, hydrogen and nitrogen in an organic sample by combustion, then comparing with the theoretical values for candidate structures. A match within 0.3% for each element confirms the formula. In iron ore analysis, the percent iron is determined by gravimetric or titrimetric methods and compared with the theoretical percent iron in candidate minerals (Fe2O3: %Fe = 69.94%; Fe3O4: %Fe = 72.36%; FeS2: %Fe = 46.55%). These distinctions drive mineral identification in geology and mining chemistry.
Percent composition in nutrition labels
The mass percent concept appears on food nutrition labels as the mass fraction of macronutrients and micronutrients per serving or per 100 g. Proteins, carbohydrates and fats are reported in grams per 100 g (equivalent to mass percent). The percent composition calculation is therefore directly applicable to real-world food science and nutritional analysis. For exam purposes: if asked to find the % nitrogen in a protein with formula empirical unit C5H9NO2 (glutamate, M = 131.130 g/mol): %N = 14.007/131.130 x 100 = 10.68%. This type of calculation links percent composition to biochemistry and nutritional science.
Using this tool in coursework and lab reports
All LazyTools chemistry calculators run entirely in your browser with no data sent to any server. Results can be copied with one click for inclusion in lab reports, assignments and problem sets. The formula is shown with every result. The LazyTools chemistry suite covers all major quantitative chemistry topics -- see the related tools section below for the calculators most commonly used alongside this one.
Chemistry problem-solving: common errors and how to avoid them
The most frequent errors in chemistry calculations are: using the wrong formula for the context, failing to convert percentages to fractions where required, rounding intermediate values instead of carrying full precision to the final step, and misidentifying which quantity is the unknown. This calculator displays the formula alongside every result, making it straightforward to identify which step went wrong and correct it. For best exam preparation, attempt problems manually first and use the calculator to verify, so you build both procedural fluency and error-checking habits simultaneously.
Percent composition in geology and mineralogy
Mineralogists use percent composition to characterise ore deposits and geological samples. The percent iron in iron oxides determines the economic value of an ore. Haematite (Fe2O3, M = 159.69 g/mol): %Fe = 2 x 55.845 / 159.69 x 100 = 69.94%. Magnetite (Fe3O4, M = 231.54 g/mol): %Fe = 3 x 55.845 / 231.54 x 100 = 72.36%. Siderite (FeCO3, M = 115.856 g/mol): %Fe = 55.845 / 115.856 x 100 = 48.22%. These different iron percentages mean that haematite and magnetite are the preferred ore minerals for iron and steel production, while pyrite (FeS2) at 46.55% Fe is not smelted for iron because the sulfur content creates pollution problems. Similar calculations apply to copper ores (chalcopyrite CuFeS2: %Cu = 34.6%), aluminium (bauxite Al2O3: %Al = 52.9%) and other economically important minerals.
Percent composition in pharmaceutical quality control
In pharmaceutical manufacturing, the theoretical percent composition of the active pharmaceutical ingredient (API) is calculated from its molecular formula and used as a reference for quality control assays. If the measured percent composition (from CHN analysis, HPLC or other quantitative method) deviates by more than a specified limit from the theoretical value, the batch fails quality control. For aspirin (acetylsalicylic acid, C9H8O4, M = 180.159 g/mol): %C = 60.00%, %H = 4.48%, %O = 35.52%. These values, derived from the molecular formula, are the theoretical targets. Any impurity or degradation product would shift the measured percents away from these values, triggering investigation. The LazyTools percent composition calculator provides theoretical values for any compound formula.
Determining the formula of a hydrate: experimental method
A common quantitative chemistry practical determines the formula of a hydrated salt by thermal analysis. Procedure: (1) weigh a crucible and cover. (2) Add hydrated salt and weigh. (3) Heat strongly to drive off water. (4) Cool and reweigh. The mass lost is the water; the mass remaining is the anhydrous salt. Calculate moles of anhydrous salt and moles of water. The ratio gives x in MgSO4.xH2O. Example: 2.463 g of hydrate gives 1.202 g anhydrous MgSO4 after heating. Mass H2O = 1.261 g. Moles MgSO4 = 1.202 / 120.37 = 0.009984. Moles H2O = 1.261 / 18.015 = 0.06999. Ratio = 0.06999 / 0.009984 = 7.01 = 7. Formula: MgSO4.7H2O (Epsom salt). The percent water = 1.261/2.463 x 100 = 51.2%, and the theoretical percent water in MgSO4.7H2O = 7(18.015)/246.48 x 100 = 51.17% -- confirming the formula.
The LazyTools percent composition calculator works with any chemical formula and displays both the percentage and molar mass contribution of each element, making it straightforward to use the results directly for empirical formula determination or for checking experimental elemental analysis data against theoretical values.
Percent composition calculations are a foundational skill in quantitative chemistry, used from GCSE to postgraduate research in analytical, inorganic, organic, pharmaceutical, geological and materials chemistry contexts worldwide.
The LazyTools percent composition calculator supports any standard chemical formula and is completely free to use, with no account required -- making it ideal for quick homework verification, pre-lab preparation and revision at any level from GCSE to undergraduate.
Frequently asked questions
%Element = (mass of element in formula / molar mass) x 100. For H in H2O: (2 x 1.008 / 18.015) x 100 = 11.19%.
H2O: %H = 11.19%, %O = 88.81%. Total = 100%.
C6H12O6: %C = 40.00%, %H = 6.71%, %O = 53.29%. Glucose has the same empirical formula as formaldehyde (CH2O) by mass ratio.
Assume 100 g. Convert percents to grams. Divide by atomic mass for moles. Divide by smallest mol count. Round to whole number ratios.
NH3 (M=17.031): %N = 14.007/17.031 x 100 = 82.24%.
M = 249.685 g/mol; water = 5 x 18.015 = 90.075 g/mol. %H2O = 90.075/249.685 x 100 = 36.08%.
Combustion analysis measuring %C, %H, %N in organic compounds. Results are compared with theoretical values to confirm or identify a molecular formula.
Yes. Free, no signup, runs in your browser.