The molar mass of a substance is the mass of one mole of it — 6.022 × 10²³ molecules, ions or formula units — expressed in grams per mole (g/mol). Numerically it equals the molecular (or formula) mass in daltons: water weighs 18.015 u per molecule and 18.015 g per mole. It is the bridge between what you weigh on a balance and what reacts in a flask, so almost every stoichiometry, solution or yield calculation starts with it.
This molar mass calculator reads the formula you type and adds up the atomic weights for you. It understands brackets — Ca(OH)2, Al2(SO4)3, K4[Fe(CN)6] — hydrates such as CuSO4·5H2O (a dot or a full stop both work), subscripts pasted from a document (H₂SO₄) and ionic charges such as SO4^2- or NH4+, which it ignores. The atomic weights are the current IUPAC/CIAAW standard values, using the abridged conventional figures for elements whose weight varies in nature (H 1.008, C 12.011, O 15.999, Cl 35.45).
Besides M, you get the mass percent of every element in a table and a chart, the total number of atoms in the formula, the mass of a single molecule, and optional conversions from a sample mass to moles, or from moles to grams.
How to use this calculator
- Type the chemical formula. Respect capital letters: each element symbol starts with one (NaCl, not nacl; Co is cobalt, CO is carbon monoxide).
- For a hydrate, write the water after a dot: CuSO4·5H2O or CuSO4.5H2O. Use brackets for repeated groups: Mg(NO3)2.
- Optionally enter a mass to convert it to moles, or an amount in moles to get the mass.
- Read the molar mass in g/mol, the composition table and the step showing how each element contributes.
The formula
The molar mass is the sum, over every element in the formula, of the number of atoms times the standard atomic weight :
The mass percent of element (percent composition) is its share of that total:
Moles and mass are linked by and . The mass of a single molecule is , with .
Worked example
Glucose, C6H12O6. = 180.156 g/mol. Carbon makes up 40 % of the mass, hydrogen 6.71 % and oxygen 53.28 %. A 25 g sample is 25 / 180.156 = 0.1388 mol.
A hydrate, CuSO4·5H2O. Copper(II) sulfate pentahydrate has = 249.68 g/mol, of which the five water molecules account for 36.08 %. Weighing anhydrous CuSO4 instead (159.6 g/mol) would put 56 % more copper sulfate in a solution than the recipe intended.
Calcium phosphate, Ca3(PO4)2. The bracket multiplies P and O by 2: = 310.17 g/mol, with 38.76 % calcium. Half a mole weighs 155.1 g.
Where the atomic weights come from
Most elements are mixtures of isotopes, so their atomic weight is an average weighted by natural abundance. The IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW) reviews these averages every two years. For about a dozen elements — hydrogen, carbon, nitrogen, oxygen, chlorine, sulfur and others — the abundance varies enough between sources that CIAAW gives an interval rather than a single value; for everyday work IUPAC publishes an abridged conventional value for each, which this calculator uses.
Radioactive elements with no stable isotope (technetium, promethium, the transuranium elements) have no standard atomic weight; the mass number of the longest-lived isotope is used, as on most periodic tables. Results are shown to three decimals, which matches the precision of the input data.
Molar mass, molecular weight and formula mass
| Term | Unit | Meaning |
|---|---|---|
| Molar mass | g/mol | mass of one mole of the substance |
| Molecular mass | u or Da | mass of one molecule |
| Relative molecular mass ("molecular weight") | none | molecular mass ÷ 1 u |
| Formula mass | u | the same for ionic solids, per formula unit |
All four give the same number for a given compound; only the unit and the wording change. Once you have M, the moles calculator converts grams, particles and gas volumes, and the molarity calculator tells you how much to weigh for a solution.
Frequently asked questions
How do I calculate the molar mass of a compound by hand?
Count the atoms of each element (multiply everything inside brackets by the subscript after them), multiply each count by the atomic weight from the periodic table, and add the products. For H2SO4: 2 × 1.008 + 32.06 + 4 × 15.999 = 98.072 g/mol.
How do I enter a hydrate?
Write the salt, a dot and the number of water molecules: CuSO4·5H2O, CaCl2·2H2O or Na2CO3.10H2O. The water of crystallisation is part of what you weigh, so it must be in the molar mass when you prepare a solution from the hydrate.
Does the charge of an ion change its molar mass?
Not measurably. An electron weighs about 0.00055 g/mol, much less than the uncertainty of atomic weights, so the sulfate ion SO4²⁻ and a neutral SO4 group both have M = 96.06 g/mol. The calculator strips the charge and tells you it did.
Why is my result slightly different from my textbook?
Older tables use O = 15.9994, H = 1.00794 or Cl = 35.453; the current conventional values are 15.999, 1.008 and 35.45. The difference shows up in the second decimal for large molecules (Ca3(PO4)2 gives 310.17 here and 310.18 with older values) and does not matter for lab work.
What is the percent composition used for?
It tells you how much of a sample is a given element: the fraction of nitrogen in a fertiliser, of iron in a supplement, or of water in a hydrate. Comparing measured percentages with calculated ones is also how chemists confirm an empirical formula.
Sources
- CIAAW — Standard atomic weights (IUPAC Commission on Isotopic Abundances and Atomic Weights)
- Prohaska et al. (2022), Standard atomic weights of the elements 2021, Pure Appl. Chem. 94
- OpenStax Chemistry 2e — 3.1 Formula Mass and the Mole Concept
- OpenStax Chemistry 2e — 3.2 Determining Empirical and Molecular Formulas (percent composition)
Last updated: