Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Mass of Element in Compound
88.8149
grams
Percent by mass of element 88.81 %
Total mass of compound 100 g

What this calculator does

This tool tells you how many grams of a particular element are present in a sample of a chemical compound. It combines the percent-by-mass composition of the element with the total mass of the sample, so you get both the percentage and the actual mass in grams.

How to use it

Enter four values: the total mass of the compound sample (in grams), the molar mass of the whole compound (g/mol), the atomic mass of the element you care about (g/mol), and n, the number of atoms of that element in one formula unit. The calculator returns the mass of the element in grams plus its percent by mass.

The formula explained

The percent by mass of an element is the contribution of that element to the molar mass: \((n \times \text{atomic mass}) \div \text{molar mass}\). Multiplying this fraction by the total mass of your sample gives the mass of the element:

$$\text{mass}_{\text{element}} = \frac{n \times \text{atomic mass}}{\text{molar mass}} \times \text{total mass}$$

The same fraction times 100 gives the percent by mass, a value that does not depend on sample size.

Diagram showing the mass fraction of one element within a whole compound sample
Mass of an element equals its share of the compound's molar mass times the total sample mass.

Worked example

How much oxygen is in 100 g of water (H₂O)? Water has a molar mass of 18.015 g/mol and contains 1 oxygen atom (atomic mass 16). The fraction is \(16 \div 18.015 = 0.8882\), so the percent by mass is 88.82%. In 100 g of water that is \(0.8882 \times 100 = 88.82\) g, that is 88.82 g of oxygen.

Bar showing total compound mass split into element contributions
A worked example: the highlighted segment is the mass contributed by the chosen element.

FAQ

What is "n"? It is how many atoms of the chosen element appear in one formula unit — for example \(n = 2\) for hydrogen in H₂O.

Where do I find the molar mass? Add up the atomic masses of every atom in the formula, or look it up for common compounds.

Does the answer change with sample size? The percent by mass stays constant, but the mass in grams scales directly with the total mass you enter.

Last updated: