🏆 US-Registered Digital Marketing Agency
Advertisement
Advertisement
CHEMISTRY

Percent Composition Calculator — mass percent of every element in a formula

Enter a chemical formula and get each element's share of the total mass, the grams of any element in a weighed sample, and how much compound delivers a target element mass.

Capitalisation matters. Brackets nest to any depth, and a dot marks a hydrate, as in CuSO4·5H2O.
The symbol of the element you care about. Leave it blank and the tool features whichever element contributes the most mass.
The first box asks how much of the featured element sits inside a sample you have weighed. The second asks how much compound you would need to supply a given mass of that element.
Mass percent of the featured element
0%
 
0
Molar mass (g/mol)
0
Featured element in your sample
0
Compound needed for target
0
Water of crystallisation
Tip: the percentages here always sum to 100 because they are shares of one molar mass. If a published assay does not sum to 100, the difference is moisture, an unlisted counter-ion, or the analysis simply did not measure everything.
Advertisement

The percent composition calculator above takes a chemical formula and works out what fraction of the compound's mass each element accounts for. It parses brackets, nested brackets and hydrate dots, adds the standard atomic weight of every atom it finds, and then reports each element's contribution both as a percentage and as a number of grams inside a sample you specify. It also runs the calculation backwards: tell it how much of one element you need and it returns the mass of compound that supplies it.

Arb Digital builds free calculators that go one step past the textbook answer. Percent composition on its own is a homework quantity; percent composition attached to a real sample mass is what a fertiliser blender, a supplement formulator or an analyst actually uses. Both are here, along with a separate figure for water of crystallisation, which is the part of a hydrate's mass that will disappear the moment the solid is dried.

What This Percent Composition Calculator Does

Percent composition by mass is each element's total atomic mass contribution divided by the molar mass of the whole compound, times one hundred. The tool computes it for every element present, sorts them heaviest contribution first, and draws a bar for each so the dominant element is obvious at a glance.

Three boundaries are worth naming, because three other tools on this site sit nearby and each does a different job. Our molar mass calculator exists to produce the single g/mol figure; percent composition is a by-product there rather than the destination. Our mass percent calculator deals with solutions — the mass of a dissolved solute as a percentage of the solution it is in — which is a different quantity that happens to share the word percent. And our empirical formula calculator runs this page in reverse: it starts from measured percentages and derives a formula. This page starts from the formula and derives the percentages.

The featured-element box is what turns the output into an answer rather than a table. Type a symbol and the hero figure, the sample-mass tile and the target tile all follow that element. Leave it empty and the tool features whichever element carries the most mass, which is a sensible default when you are simply exploring a compound.

How to Use It

  1. Type the formula exactly. Capital letter first, lowercase second. Brackets group repeating units, so calcium phosphate is Ca3(PO4)2 and the 2 applies to everything inside.
  2. Name the element you care about using its symbol — N for nitrogen, Fe for iron. The hero percentage and both mass figures follow whichever element you pick.
  3. Enter a sample mass to see how many grams of that element are inside a quantity you have actually weighed out.
  4. Enter a target element mass to run the sum backwards and get the mass of compound that supplies it.
  5. Read the bars. Each one is an element's share of the molar mass. They always sum to 100 percent, which is the fastest way to spot a mistyped subscript.

The Formula and How It Is Calculated

For each element, the mass percent is %E = (nE × AE) / M × 100, where n is the count of that element's atoms in one formula unit, A is its standard atomic weight, and M is the molar mass of the compound. The grams of that element in a sample of mass m are simply m × %E / 100, and the compound mass needed to supply a target element mass t is t ÷ (%E / 100).

Take the default, ammonium sulfate, (NH4)2SO4. There are 2 nitrogen atoms at 14.007, 8 hydrogen at 1.008, 1 sulfur at 32.06 and 4 oxygen at 15.999. Those contributions are 28.014, 8.064, 32.06 and 63.996 g/mol, summing to a molar mass of 132.13 g/mol. Nitrogen's share is 28.014 ÷ 132.13 = 0.2120, so ammonium sulfate is 21.20 percent nitrogen by mass — which is exactly the 21 printed on every bag of it sold as a fertiliser. A 100 g sample therefore contains 21.2 g of nitrogen, and supplying 10 g of nitrogen needs 10 ÷ 0.2120 = 47.2 g of the salt.

The atomic weights are the conventional standard values published by the IUPAC Commission on Isotopic Abundances and Atomic Weights and mirrored in the NIST atomic weights and isotopic compositions data. They are averages weighted by natural isotopic abundance, which is why sulfur is 32.06 and not 32.

Advertisement

Why Two Different Compounds Can Share a Percent Composition

Percent composition does not identify a compound. Formaldehyde is CH2O, acetic acid is C2H4O2 and glucose is C6H12O6. All three are 40.0 percent carbon, 6.7 percent hydrogen and 53.3 percent oxygen by mass, to every decimal place, because they share the empirical formula CH2O. A combustion analysis that returns those percentages has told you the ratio and nothing about the size of the molecule.

Resolving the ambiguity needs a second, independent measurement of the molar mass — historically by vapour density or freezing-point depression, today almost always by mass spectrometry. Divide the measured molar mass by the empirical formula mass and the whole number you get is the multiplier. This is why a laboratory report pairs elemental analysis with a mass spectrum rather than relying on either alone, and it is the single most important limitation to remember about the numbers on this page.

The practical consequence for checking work: if your calculated percentages match a literature value but your compound is wrong, the percentages will not tell you. They are a necessary condition, not a sufficient one.

Hydrates, and the Mass That Walks Away in the Oven

A hydrate carries water molecules locked into its crystal lattice, and that water is a real part of the weighed mass. Copper(II) sulfate pentahydrate is 249.68 g/mol, of which 5 × 18.015 = 90.08 g/mol is water — just over 36 percent of the bottle's contents by mass. The fourth result tile reports that figure directly whenever the formula contains a hydrate dot.

This matters whenever a mass is used to calculate an amount. Weigh out 25 g of the pentahydrate expecting 25 g of copper sulfate and you have about 16 g of the anhydrous salt and 9 g of water. Every mole figure that follows is out by more than a third. The reverse error is just as common: a formula written without its water of crystallisation, then applied to a bottle that clearly says pentahydrate on the label.

Gravimetric analysis turns this into a measurement. Heat a hydrate to constant mass, record the loss, divide by the molar mass of water and compare the moles of water to the moles of anhydrous salt. The whole-number ratio is the hydrate number. The percentage this tool reports is what that experiment should return, so it is a useful predicted value to check a result against. If the measured loss is higher, the sample was damp on the outside as well as hydrated inside; if lower, the heating did not go to completion.

Where the Featured-Element Figure Earns Its Keep

Percent composition stops being an exercise the moment somebody is buying an element rather than a compound. Fertiliser is priced and regulated on nitrogen, phosphorus and potassium content, not on the mass of the salt in the bag. Ammonium nitrate is 35.0 percent nitrogen and ammonium sulfate is 21.2 percent, so a tonne of the first delivers two thirds more nitrogen than a tonne of the second — which is the number that decides whether a price per tonne is good value.

The same reasoning runs through mineral supplements, where the label quantity is elemental and the ingredient is a salt. Calcium carbonate is 40.0 percent calcium; calcium citrate is 21.1 percent. Iron sulfate heptahydrate is 20.1 percent iron; iron fumarate is 32.9 percent. In pigments and ceramics the assay is quoted as an oxide percentage for exactly the same reason, and in ore processing the grade of a deposit is the percent composition of the metal in the rock. Feed the compound in, name the element, and the two mass tiles answer both directions of that question at once.

If you already have moles rather than a formula and want to move between mass and amount, the moles to grams calculator is the direct route, and the molar ratio calculator handles the stoichiometric step that usually follows.

Precision, and When Percentages Stop Agreeing

The percentages here are exact consequences of the atomic weights used, so they carry as many figures as those weights support — about four significant figures for most elements. Reporting six is false precision. The decimal-place selector exists so you can match the convention of whatever you are comparing against, not because the extra digits are meaningful.

Published elemental analyses rarely match a calculated composition to more than a couple of decimal places, and a difference of up to about 0.4 percentage points on carbon, hydrogen and nitrogen is the normal accepted tolerance for a pure compound. Larger gaps usually mean residual solvent, adsorbed water, an incompletely removed counter-ion, or genuine impurity. Comparing a measured figure against the calculated one is a job for our percent error calculator, which handles the sign and the reference value correctly.

A separate source of disagreement is the atomic weight itself. IUPAC now publishes intervals rather than single values for a set of light elements whose isotopic composition varies with the source of the material, including hydrogen, carbon, oxygen and sulfur. The conventional single values used here are the ones recommended for routine calculation on material of unknown origin. The average atomic mass calculator shows how such an average is built from isotope abundances if you need to work from a specific isotopic composition instead.

Need a different calculation?

Arb Digital publishes hundreds of free calculators across chemistry, maths, finance and marketing — no sign-up, no limits. If something you need is missing, tell us and we will look at building it.

Browse All Free Tools Suggest a Tool

Common Mistakes to Avoid

  • Missing a bracket subscript — (NH4)2SO4 has two nitrogens and eight hydrogens, not one and four. This single slip is the most frequent cause of a wrong percentage.
  • Ignoring water of crystallisation — a pentahydrate is over a third water by mass, so using the anhydrous formula for a hydrated bottle overstates every element by more than 50 percent.
  • Treating percent composition as proof of identity — formaldehyde, acetic acid and glucose are identical by percentage. Only a molar mass measurement separates them.
  • Confusing it with solution mass percent — this page splits a compound's own mass among its elements. The percentage of a solute dissolved in water is a different quantity entirely.
  • Reporting more figures than the atomic weights support — four significant figures is the honest ceiling for most elements, however many digits a calculator shows.

Related Free Tools From Arb Digital

Get the g/mol figure on its own with the molar mass calculator, run the calculation in reverse with the empirical formula calculator, and handle solution strength with the mass percent calculator. Convert between mass and amount using the moles to grams calculator, set up the stoichiometry with the molar ratio calculator, and compare a measured figure to a calculated one with the percent error calculator. The full free online tools hub lists everything else.

Frequently Asked Questions

What is percent composition by mass?

It is each element's share of a compound's total mass, written as a percentage. You multiply the number of atoms of the element by its atomic weight, divide by the molar mass of the whole compound, and multiply by one hundred.

How do I find the percent composition of a compound?

Work out the molar mass by adding the atomic weight of every atom in the formula, then divide each element's total contribution by that molar mass. Ammonium sulfate contributes 28.014 g/mol of nitrogen out of 132.13 g/mol, which is 21.20 percent nitrogen.

Do the percentages always add up to 100?

Yes, because they are shares of a single molar mass, apart from a rounding difference in the last decimal place. A published assay that does not sum to 100 is usually missing moisture, a counter-ion, or an element that was never measured.

Can two compounds have the same percent composition?

They can. Formaldehyde, acetic acid and glucose are all 40.0 percent carbon, 6.7 percent hydrogen and 53.3 percent oxygen because they share the empirical formula CH2O. Only an independent molar mass measurement tells them apart.

How does the calculator handle hydrates?

Write the anhydrous formula, a dot, the coefficient and then the water, as in CuSO4 5H2O. The coefficient multiplies the whole water unit, and the fourth result tile reports what percentage of the total mass that water represents.

How much compound do I need to supply a given mass of one element?

Divide the target element mass by the element's mass fraction. To supply 10 grams of nitrogen from ammonium sulfate at 21.20 percent nitrogen, you need 10 divided by 0.2120, which is about 47.2 grams of the salt.

Is percent composition the same as mass percent of a solution?

No. Percent composition splits a pure compound's mass among the elements inside it. Solution mass percent is the mass of a dissolved solute as a fraction of the total solution mass, and it depends on how much water you added.

How precise are these percentages?

They are exact consequences of the atomic weights used, which support roughly four significant figures for most elements. A measured elemental analysis on a pure compound normally agrees to within about 0.4 percentage points on carbon, hydrogen and nitrogen.

This calculator is provided for education and general reference. It describes how percent composition is computed and is not laboratory, agricultural, nutritional or safety guidance; follow the procedures and risk assessments issued by your own institution.

Advertisement
Advertisement

Take it further