Skip to content

Molecular Mass Calculator

Case matters: Co is cobalt, CO is carbon monoxide. Brackets and a hydrate dot (· or .) are allowed.

Molar mass (g/mol) —
Milligrams per millimole
—
Kilograms per mole
—
Atoms per formula unit
—
Distinct elements
—
Largest mass share
—

Molecular mass is the sum of the atomic weights of every atom in the formula. For water, H2O, that is 2 × 1.008 + 15.999 = 18.015 g/mol. Enter any formula, including brackets and hydrates, and the calculator multiplies each element's count by its IUPAC standard atomic weight and adds the results.

About this tool

Weighing out a reagent, converting grams to moles or checking a stoichiometry answer all start from the molar mass of a compound. This calculator reads a formula as you type it, expands brackets such as (PO4)2 and hydrate parts such as ·5H2O, and adds up the contributions element by element. Next to the total you get the atom count, the mass in kilograms per mole, and a table with each element's atomic weight, its share of the mass, and the working line by line. Atomic weights are the IUPAC conventional values to four or five significant figures, so the last decimal can differ slightly from older textbook tables. The parser does not read charges, isotopes like D or 13C, or condensed organic names, so write ions and labelled compounds out as plain element formulas.

How to use it

  1. Type the formula

    Use element symbols with the right capitalisation and digits for counts, e.g. Al2(SO4)3.

  2. Add hydrate water

    Separate waters of crystallisation with · or a full stop, with the multiplier in front: MgSO4·7H2O.

  3. Read the total and table

    The molar mass appears in g/mol, with each element's atoms, mass and percentage listed below it.

Examples

Water, H2O

Chemical formula
H2O

Result Molar mass (g/mol): 18.015
Milligrams per millimole: 18.015
Kilograms per mole: 0.018015
Atoms per formula unit: 3
Distinct elements: 2
Largest mass share: O (88.81% by mass)

  1. H: 2 × 1.008 = 2.016 g/mol
  2. O: 1 × 15.999 = 15.999 g/mol
  3. Sum = 2.016 + 15.999 = 18.015 g/mol

Two hydrogens at 1.008 and one oxygen at 15.999 give 18.015 g/mol; oxygen carries almost 89% of the mass.

Glucose, C6H12O6

Chemical formula
C6H12O6

Result Molar mass (g/mol): 180.156
Milligrams per millimole: 180.156
Kilograms per mole: 0.180156
Atoms per formula unit: 24
Distinct elements: 3
Largest mass share: O (53.28% by mass)

  1. C: 6 × 12.011 = 72.066 g/mol
  2. H: 12 × 1.008 = 12.096 g/mol
  3. O: 6 × 15.999 = 95.994 g/mol
  4. Sum = 72.066 + 12.096 + 95.994 = 180.156 g/mol

The figure used to make a 1 M glucose solution: 180.156 g in one litre.

Blue vitriol, CuSO4·5H2O

Chemical formula
CuSO4·5H2O

Result Molar mass (g/mol): 249.677
Milligrams per millimole: 249.677
Kilograms per mole: 0.249677
Atoms per formula unit: 21
Distinct elements: 4
Largest mass share: O (57.67% by mass)

  1. Cu: 1 × 63.546 = 63.546 g/mol
  2. S: 1 × 32.06 = 32.06 g/mol
  3. O: 9 × 15.999 = 143.991 g/mol
  4. H: 10 × 1.008 = 10.08 g/mol
  5. Sum = 63.546 + 32.06 + 143.991 + 10.08 = 249.677 g/mol

The five waters of crystallisation add 90.075 g/mol, more than a third of the total.

How it is calculated

M = Σ (nᵢ × Aᵣ,ᵢ)

M
molar mass of the compound in g/mol
nᵢ
number of atoms of element i in one formula unit
Aᵣ,ᵢ
standard atomic weight of element i (IUPAC CIAAW)

The formula is parsed left to right. A digit after a symbol counts that atom; a digit after a closing bracket multiplies everything inside it; a leading number after a hydrate dot multiplies that whole part. Counts are merged per element, multiplied by the atomic weight, and summed. Because relative molecular mass is dimensionless and molar mass is in g/mol, the same number serves both; dividing by 1000 gives kg/mol.

When not to use it

  • Isotope-labelled compounds need isotopic masses, not standard atomic weights.
  • Mass spectrometry peaks use monoisotopic mass, which this total does not give.
  • Polymers with a variable chain length have no single formula to enter.

Common mistakes

  • Writing CO when you mean Co changes cobalt into carbon monoxide.
  • Forgetting the hydrate water makes CuSO4·5H2O about 36% too light.
  • Typing a charge such as SO4 2- adds a stray 2 to the oxygen count.

Frequently asked questions

Are molecular mass and molar mass the same number?

Numerically yes. Relative molecular mass is a dimensionless ratio to one twelfth of a carbon-12 atom, while molar mass carries units of g/mol. Water is 18.015 on both scales.

Which atomic weights does the calculator use?

The IUPAC Commission on Isotopic Abundances and Atomic Weights conventional values, such as 1.008 for hydrogen, 12.011 for carbon and 35.45 for chlorine. Elements with natural isotope variation have intervals; the single conventional value is used here.

How do I enter a formula with nested brackets?

Round and square brackets can be nested, for example K4[Fe(CN)6]. The count after each closing bracket multiplies every atom inside it, including inner groups, giving 4 K, 1 Fe, 6 C and 6 N.

Why does my textbook give a slightly different value?

Older tables used weights such as 1.00794 for hydrogen or 35.453 for chlorine. The difference usually appears only in the second or third decimal place and rarely matters for lab work.

Can it handle ionic compounds and salts?

Yes, ionic compounds are entered as their formula units, such as NaCl or Ca3(PO4)2. The mass of the electrons gained or lost by an ion is negligible, so charges are simply left out.

What does the mass percentage column show?

Each element's contribution divided by the total, times 100. For glucose, oxygen supplies 95.994 of 180.156 g/mol, about 53.28% of the mass, which is the percent composition used in elemental analysis.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 11). Molecular Mass Calculator. Tools Directory. Retrieved October 26, 2026, from https://tools.milunir.com/chemistry/chemistry-reference/molecular-mass-calculator/

MLA

Tools Directory Editorial Team. “Molecular Mass Calculator.” Tools Directory, 11 Oct. 2026, https://tools.milunir.com/chemistry/chemistry-reference/molecular-mass-calculator/. Accessed 26 Oct. 2026.

Chicago

Tools Directory Editorial Team. “Molecular Mass Calculator.” Tools Directory. Last modified October 11, 2026. Accessed October 26, 2026. https://tools.milunir.com/chemistry/chemistry-reference/molecular-mass-calculator/.

Link<a href="https://tools.milunir.com/chemistry/chemistry-reference/molecular-mass-calculator/">Molecular Mass Calculator – Tools Directory</a>