Percent composition calculator

Type a formula to see how much of it, by mass, each element makes up, such as carbon in glucose or nitrogen in a fertilizer.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter chemical formula.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Element mass % = (atom count × atomic weight) ÷ molar mass of the compound × 100.

Example

Inputs: Chemical formula = C6H12O6. Result: Mass percent by element: C 40.00%, H 6.71%, O 53.28%; Molar mass: 180.156 g/mol.

Limits and caveats

  • Shown percentages are rounded to 2 decimals, so they may not add up to exactly 100.00.
  • Based on standard atomic weights, not on analysis of a real sample.

Questions about this tool

What percent of glucose is carbon?

About 40.00% by mass, since 6 carbons weigh 72.066 of its 180.156 g/mol.

What is the nitrogen content of urea, CH4N2O?

About 46.65%, which is why urea is one of the richest nitrogen fertilizers.

In what order are elements listed?

Hill order: carbon, then hydrogen, then the rest alphabetically; fully alphabetical when there is no carbon.