Calculate a mass ratio from two masses, find element or compound mass, or get the mass ratio and percent of each element in a chemical formula.

Result unit

Calculator Functions

FunctionWhat it doesWhat it requires
Mass ratioFinds the share of a compound’s mass that one element makes upRequires the element mass and the compound mass
Element massFinds the mass of an element in a given mass of compoundRequires the compound mass and the mass ratio as a percent or a decimal
Compound massFinds the mass of compound that contains a given mass of an elementRequires the element mass and the mass ratio as a percent or a decimal
Percent by formulaFinds the mass percent of an element from a chemical formula, with no weighing neededRequires a common compound or a typed chemical formula, and the element

Masses can be entered in grams, kilograms, pounds or ounces, and the two masses in a ratio do not need the same unit. Mass ratio can be shown as a percent or a decimal, and the mass results in g, kg, lb or oz. Percent by formula has an optional sample mass, which adds the mass of the element in that much pure compound. It also lists the molar mass, the mass ratio of all the elements to one another and a table of each element’s share.

Mass Ratio Formulas

MR = mE ÷ mC × 100 [1]
MRMass ratio (%)
mEMass of the element
mCMass of the whole compound, in the same unit

This is the mass fraction of the element, the mass of one component divided by the total mass [1], written as a percent. It is also called percent by mass or mass percent. Leaving out the × 100 gives the decimal form, which runs from 0 to 1.

Mass ratio

The main formula applies directly. A 4.00 g sample of a compound that contains 3.25 g of an element has a mass ratio of 3.25 ÷ 4.00 × 100 = 81.25%, or 0.8125 as a decimal. The result also gives the element-to-compound ratio, here 1 : 1.2308. The element mass cannot be larger than the compound mass.

Element mass

mE = mC × MR ÷ 100

Water is 11.19% hydrogen by mass, so 18 g of water contains 18 × 0.1119 = 2.014 g of hydrogen.

Compound mass

mC = mE ÷ (MR ÷ 100)

If an element makes up 40% of a compound, 6 g of the element corresponds to 6 ÷ 0.40 = 15 g of compound. A mass ratio of zero has no answer.

Percent by formula

MR = n × Ar ÷ M × 100

Here n is the number of atoms of the element in the formula, Ar is its atomic weight and M is the molar mass of the compound, the sum of n × Ar over every element. The calculator reads the formula, including brackets and hydrates written with a dot, and uses standard atomic weights [2]. For water, H2O, hydrogen contributes 2 × 1.008 = 2.016 and oxygen 15.999, so M = 18.015 g/mol and hydrogen is 2.016 ÷ 18.015 × 100 = 11.19%. The mass ratio of hydrogen to oxygen is 1 : 7.936.

CompoundElementMass percent
Water, H2OH11.19%
Water, H2OO88.81%
Carbon dioxide, CO2O72.71%
Sodium chloride, NaClNa39.34%
Copper sulfate pentahydrate, CuSO4·5H2OCu25.45%

How to Find Mass Ratio

There are two ways, depending on what is known. From measured masses, divide the mass of the element by the mass of the compound and multiply by 100: 3.25 g in 4.00 g is 81.25%. From a chemical formula, multiply each element’s atomic weight by its number of atoms, add the results to get the molar mass, and divide one element’s share by that total: in CO2, oxygen is 2 × 15.999 = 31.998 out of 44.009, which is 72.71%.

To find the mass ratio of the elements to each other, compare their shares directly. In water the shares are 2.016 for hydrogen and 15.999 for oxygen, so the ratio by mass is 2.016 : 15.999, or about 1 : 8. Both masses must be in the same unit before dividing, and the element mass can never exceed the compound mass.

Limits of This Estimate

  • Percent by formula assumes a pure compound with exactly the formula entered. A real sample with impurities, moisture or a different hydrate has a different composition.
  • Atomic weights are standard values for normal terrestrial material, and the isotope mix of some elements varies by source [2]. Elements with no standard atomic weight, such as technetium and plutonium, use the mass number of a common isotope.
  • Formulas with charges or isotope notation are not read, and element symbols are case-sensitive: Co is cobalt and CO is carbon monoxide.
  • Mass ratio in this sense is a part-to-whole share. A ratio between two separate objects, or a charge-to-mass ratio, is a different quantity.

Sources

  1. NIST Special Publication 811, Guide for the Use of the SI, Section 8.6.10: mass fraction as the mass of a substance divided by the mass of the mixture
  2. IUPAC Commission on Isotopic Abundances and Atomic Weights, Abridged Standard Atomic Weights 2024: the atomic weights used for formulas, and their variation