molecalculator

Moles & Molar Mass

Relative Formula Mass: How to Calculate It

Calculator No. 01-16869 · Updated · Formula and assumptions shown below

Relative formula mass 32.04 u
Carbon atoms
1
Set in the form below
Hydrogen atoms
4
Set in the form below
Oxygen atoms
1
Set in the form below
Nitrogen atoms
0
Set in the form below
You enter
Carbon atoms, Hydrogen atoms, Oxygen atoms, Nitrogen atoms, Sulfur atoms, Chlorine atoms
You get
Relative formula mass (u)
Rounding
2 dp

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

Relative formula mass (RFM) is the sum of the atomic masses of all atoms in a chemical formula, measured in atomic mass units (u). You calculate it by adding together the standard atomic weights of each element in the compound, multiplied by the number of atoms of that element.

Formula

Relative formula mass (RFM) is calculated using the formula:

RFM = (number of C atoms × atomic mass of C) + (number of H atoms × atomic mass of H) + (number of O atoms × atomic mass of O) + (number of N atoms × atomic mass of N) + (number of S atoms × atomic mass of S) + (number of Cl atoms × atomic mass of Cl)

Where:

  • C = number of carbon atoms (unitless)
  • H = number of hydrogen atoms (unitless)
  • O = number of oxygen atoms (unitless)
  • N = number of nitrogen atoms (unitless)
  • S = number of sulfur atoms (unitless)
  • Cl = number of chlorine atoms (unitless)
  • Atomic masses in u: C = 12.011, H = 1.008, O = 15.999, N = 14.007, S = 32.06, Cl = 35.45 (IUPAC abridged standard atomic weights)

Worked Example

Calculate the relative formula mass of methane (CH₄), which has 1 carbon atom and 4 hydrogen atoms. Use the default values from the calculator: C = 1, H = 4, O = 1, N = 0, S = 0, Cl = 0.

  1. Mass contribution from carbon: 1 × 12.011 = 12.011 u
  2. Mass contribution from hydrogen: 4 × 1.008 = 4.032 u
  3. Mass contribution from oxygen: 1 × 15.999 = 15.999 u (note: included in defaults but not in methane)
  4. Sum: 12.011 + 4.032 + 15.999 + 0 + 0 + 0 = 32.042 u

However, methane is CH₄ only — the default oxygen value of 1 is not part of the molecule. Recalculate correctly with O = 0:

  • Carbon: 1 × 12.011 = 12.011 u
  • Hydrogen: 4 × 1.008 = 4.032 u
  • Total RFM = 12.011 + 4.032 = 16.043 u

The calculator returns 16.04 when inputs are set to C=1, H=4, O=0, N=0, S=0, Cl=0, rounded to two decimal places.

Background and Importance

Relative formula mass, also known as formula weight, is a dimensionless quantity that represents the sum of the atomic masses of all atoms in a formula unit. It is used for ionic compounds (like NaCl) and covalent molecules (like H₂O). For covalent substances, it is often called relative molecular mass (RMM), but the calculation is identical.

RFM is essential in stoichiometry, molar calculations, and preparing solutions of known concentration. It links the microscopic scale (atoms and molecules) to the macroscopic scale (grams and moles). For example, one mole of a substance has a mass in grams equal to its RFM.

How to Calculate Relative Formula Mass

Follow these steps:

  1. Write down the chemical formula.
  2. Determine the number of atoms of each element in the formula.
  3. Look up the standard atomic weight for each element (use IUPAC values).
  4. Multiply each atomic mass by the number of atoms of that element.
  5. Add all the values together.

Example: Water (H₂O)

  • Hydrogen: 2 atoms × 1.008 u = 2.016 u
  • Oxygen: 1 atom × 15.999 u = 15.999 u
  • RFM = 2.016 + 15.999 = 18.015 u

Common Elements and Their Atomic Masses

Here are the most common elements in organic and inorganic compounds with their IUPAC standard atomic weights:

  • Hydrogen (H): 1.008 u
  • Carbon (C): 12.011 u
  • Nitrogen (N): 14.007 u
  • Oxygen (O): 15.999 u
  • Sodium (Na): 22.990 u
  • Magnesium (Mg): 24.305 u
  • Phosphorus (P): 30.974 u
  • Sulfur (S): 32.06 u
  • Chlorine (Cl): 35.45 u
  • Potassium (K): 39.098 u
  • Calcium (Ca): 40.078 u

Handling Subscripts and Brackets

Chemical formulas with brackets require careful counting. Multiply the atoms inside the bracket by the subscript outside.

Example: Calcium nitrate, Ca(NO₃)₂

  • Ca: 1 atom × 40.078 u = 40.078 u
  • N: 2 atoms (from 2 × NO₃) × 14.007 u = 28.014 u
  • O: 6 atoms (3 per NO₃, two groups) × 15.999 u = 95.994 u
  • RFM = 40.078 + 28.014 + 95.994 = 164.086 u

Accuracy and Rounding

Atomic masses are known to several decimal places, but RFM is typically reported to two decimal places for consistency and practicality. However, in precise analytical work, more digits may be retained. Always use atomic masses as given by IUPAC and avoid rounding during intermediate steps to prevent cumulative errors.

A common mistake is using whole numbers (e.g., C = 12, O = 16) — while this is acceptable for rough estimates, it reduces accuracy. For example, using whole numbers for water gives 18.00 u, but the correct value is 18.015 u.

Assumptions

  • The compound is pure and has the exact formula entered.
  • Standard atomic weights are used (natural isotopic abundance).
  • No isotopic enrichment or depletion.
  • The formula represents the empirical or molecular formula as appropriate.

Frequently Asked Questions

What is the difference between relative formula mass and relative molecular mass?
Relative formula mass applies to ionic compounds (e.g., NaCl), while relative molecular mass is for covalent molecules (e.g., CO₂). However, the calculation is identical, and the terms are often used interchangeably.

Do I use atomic number or atomic mass?
Always use atomic mass (also called atomic weight), not atomic number. The atomic number is the number of protons and does not reflect mass. For example, carbon has atomic number 6 but atomic mass 12.011 u.

Why is relative formula mass important in chemistry?
It allows conversion between mass and moles, which is essential for stoichiometric calculations in reactions, solution preparation, and yield predictions.

Can relative formula mass be measured directly?
No, it is a calculated value based on atomic masses. However, mass spectrometry can measure the actual mass of a molecule to high precision.

Should I include water in hydrates?
Yes. For hydrated compounds like CuSO₄·5H₂O, include all atoms. The five water molecules contribute 5 × (2×1.008 + 15.999) = 90.075 u to the total RFM.

Is relative formula mass the same as molar mass?
Numerically yes, but units differ. RFM is in atomic mass units (u) per formula unit, while molar mass is in grams per mole (g/mol). The number is the same: RFM of water is 18.015 u, molar mass is 18.015 g/mol.

Related

Formula used
in c | Carbon atoms | - | 1 | 0 | 100
in h | Hydrogen atoms | - | 4 | 0 | 200
in o | Oxygen atoms | - | 1 | 0 | 100
in n | Nitrogen atoms | - | 0 | 0 | 50
in s | Sulfur atoms | - | 0 | 0 | 20
in cl | Chlorine atoms | - | 0 | 0 | 20
out rfm | Relative formula mass | u | c*12.011 + h*1.008 + o*15.999 + n*14.007 + s*32.06 + cl*35.45 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →