How molecular weight and molar mass are calculated
The molecular weight (also called relative molecular mass or molar mass) of a chemical compound is the sum of the standard atomic weights of all the atoms present in its chemical formula, measured in grams per mole (g/mol).
Atomic weights are based on the standard IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW) values. For example, water (H2O) contains two hydrogen atoms (2 × 1.008 g/mol) and one oxygen atom (1 × 15.999 g/mol), giving a molar mass of 18.015 g/mol.
The elemental composition breakdown represents the mass fraction of each element: Mass % = (n_atoms × Atomic_Weight) / Molecular_Weight × 100%. In water, hydrogen accounts for 11.19% of the mass while oxygen makes up 88.81%.
Worked example: Glucose (C6H12O6)
Glucose has the chemical formula C6H12O6, containing 6 carbon atoms, 12 hydrogen atoms, and 6 oxygen atoms (24 total atoms).
Carbon contribution: 6 × 12.011 g/mol = 72.066 g/mol (40.00% by mass).
Hydrogen contribution: 12 × 1.008 g/mol = 12.096 g/mol (6.71% by mass).
Oxygen contribution: 6 × 15.999 g/mol = 95.994 g/mol (53.28% by mass).
Total molecular weight = 72.066 + 12.096 + 95.994 = 180.156 g/mol.
Supported formula notation
Standard chemical symbols with case sensitivity, such as NaCl, H2SO4, or KMnO4 (always capitalise the first letter of each element symbol).
Parentheses and brackets for polyatomic groups, such as Ca(OH)2, (NH4)2SO4, and Fe2(SO4)3.
Hydrate notation with an asterisk or dot, such as CuSO4*5H2O (copper sulfate pentahydrate) or MgSO4*7H2O.
Inputs for the molecular weight calculator
Chemical formula
Enter the formula of the molecule, salt, or hydrate using standard chemical symbols and numerical subscripts (e.g. H2O, C6H12O6, Ca(OH)2, or CuSO4*5H2O).
CALCULATOR QUESTIONS
Molar mass & chemical formula calculator questions
What is the difference between molecular weight and molar mass?
Molecular weight is dimensionless (relative molecular mass, Mr), whereas molar mass is the mass of one mole of a substance expressed in grams per mole (g/mol). In practice, their numerical values are identical.
How do I calculate mass percent of an element in a compound?
Multiply the number of atoms of that element by its atomic weight, divide by the total molecular weight of the compound, and multiply by 100%.
Can I enter formulas with parentheses like Ca(OH)2?
Yes. The calculator fully parses parentheses and brackets, distributing the trailing multiplier to every element inside the group.
How do I enter hydrate crystals like copper sulfate pentahydrate?
Use an asterisk followed by the number of water molecules, for example 'CuSO4*5H2O'.
