BYTETOOLS

Percent Composition Calculator

Find the mass percent of every element in a chemical formula. Enter a compound and get the full composition table plus grams per element in any sample size.

180.156
Molar mass (g/mol)
3
Elements
24
Atoms per unit

Percent composition by mass

ElementAtomsMass per moleMass %In 100 g
O Oxygen695.994 g53.284%53.2838 g
C Carbon672.066 g40.002%40.002 g
H Hydrogen1212.096 g6.714%6.7142 g
O
53.28%
C
40.00%
H
6.71%

Mass % = (atoms × atomic mass ÷ molar mass) × 100. Percentages sum to 100% apart from rounding.

What is the Percent Composition Calculator?

Percent composition is the share of a compound's mass contributed by each element: (atoms × atomic mass ÷ molar mass) × 100. Water is 11.19% hydrogen and 88.81% oxygen by mass.

  • Mass percent for every element in the formula
  • Handles nested brackets, hydrates and multi-letter symbols
  • Optional sample mass converts percentages into grams
  • Bar chart showing the relative contribution of each element
  • Molar mass and atom count shown alongside
  • 100% client-side — your formulas stay private

How to use the Percent Composition Calculator

  1. 1

    Enter a chemical formula such as C6H12O6 or (NH4)2SO4.

  2. 2

    Optionally set a sample mass in grams.

  3. 3

    Read the mass percent of each element in the table.

  4. 4

    Compare the bars to see which element dominates the mass.

  5. 5

    Copy the table for your report or homework.

About the Percent Composition Calculator

The ByteTools Percent Composition Calculator breaks a compound down into the mass percentage of each element it contains. Type a formula and the tool parses it, computes the molar mass, and divides each element's total mass by that figure to produce a full composition table with a bar chart beside it.

It handles nested brackets like (NH4)2SO4 and hydrates like CuSO4·5H2O, so you can enter formulas exactly as they appear in a textbook. Adding an optional sample mass converts the percentages into grams, which is useful for fertiliser analysis, gravimetric work and empirical-formula questions.

The parser and the atomic weight table both live in the page, so the whole calculation runs in your browser with no server involved. Nothing you type is uploaded or stored, and the tool works offline once loaded.

Frequently asked questions

How do you calculate percent composition by mass?

Divide the total mass of one element in the formula by the compound's molar mass, then multiply by 100. In water the two hydrogens weigh 2.016 out of 18.015, which is 11.19%, leaving oxygen at 88.81%.

What is the percent composition of glucose?

Glucose, C₆H₁₂O₆, has a molar mass of 180.156 g/mol and works out as 40.00% carbon, 6.71% hydrogen and 53.28% oxygen by mass. Notice that hydrogen makes up half the atoms but only a small fraction of the mass.

How is percent composition used to find an empirical formula?

Take 100 g of the compound so each percentage becomes a mass in grams, divide each by the element's atomic mass to get moles, then divide all the results by the smallest one to reach the simplest whole-number ratio.

Why do my percentages not add up to exactly 100?

They should sum to 100% apart from rounding. Each percentage is displayed to three decimal places, so the last digit can leave a difference of a thousandth or two. Any larger gap means the formula was mistyped.

Does percent composition include water of crystallisation?

Yes, if you enter the hydrated formula. CuSO4·5H2O has a molar mass of 249.68 g/mol and the five waters account for about 36% of that mass, which is why hydrated and anhydrous salts give very different results.

Related tools