Molecular Weight Calculator

: Calculate the molar mass of any chemical formula with nested brackets, hydrates and charges, see the percent composition by element, and convert grams to moles or moles to grams
Formula
Case-sensitive: Co is cobalt, CO is carbon and oxygen. Brackets, hydrates (CuSO4·5H2O), charges (SO4^2-) and names such as water or glucose work too.
Optional. Grams give moles, moles give grams. Or type the unit: 250 mg, 0.5 mol.
For the molar mass and the table's masses; mass percents always show 2.
Atomic weights: CIAAW abridged standard atomic weights, 2024 table (IUPAC CIAAW, from the Atomic Weights 2021 report with the 2024 revisions), five significant figures; [n] is the mass number of the longest-lived isotope of an element with no standard atomic weight. D = 2.0141 and T = 3.0160 (hydrogen-2 and hydrogen-3). Avogadro constant 6.02214076 × 10²³ per mol. Charges are ignored.
Result
Molar mass
18.015 g/mol
The same number is the molecular weight: 18.015 u (Da) for one molecule.
Hill formula
H2O
No carbon, so every element A to Z.
Atoms per formula unit
3
Mass of one molecule
2.991 × 10⁻²³ g
The molar mass ÷ the Avogadro constant; for a salt such as NaCl, one formula unit.
Composition by element: H2O, 18.015 g/mol in all
ElementAtomsAtomic weightMass (g/mol)Mass percent
H, hydrogen21.00802.01611.19%
O, oxygen115.99915.99988.81%

This molecular weight calculator works out the molar mass of a chemical formula in g/mol, the same number as the molecular weight in u, with the percent composition by element and the Hill formula. Add an amount to convert grams to moles or moles to grams, with the number of molecules and atoms. It reads nested brackets, hydrates, charges and about 50 common names, and runs in your browser.

  1. Type the Formula with capitals as in the periodic table: H2O, NaCl, Ca(OH)2, CuSO4·5H2O. A common name such as water, glucose or baking soda works too.
  2. Read the molar mass in g/mol, the Hill formula, the atoms per formula unit, and the table below it: each element's atoms, atomic weight, mass and mass percent.
  3. To convert, type an Amount and pick its unit: g, mg or kg give moles, mol or mmol give grams. A unit typed in the field wins: 250 mg, 0.5 mol.
  4. Pick Decimals (2 to 5) for the molar mass and the table's masses.

10 g of table salt, the result rows as the tool shows them.

Input
Formula: NaCl
Amount: 10 g
Output
Molar mass: 58.440 g/mol
Hill formula: ClNa
Atoms per formula unit: 2
Mass of one molecule: 9.704 × 10⁻²³ g
Moles: 0.1711 mol
Molecules (formula units): 1.030 × 10²³
Atoms: 2.061 × 10²³

What is the molar mass of water?

18.015 g/mol: two hydrogens at 1.0080 and one oxygen at 15.999. Hydrogen is 11.19% of its mass and oxygen 88.81%.

Is molecular weight the same as molar mass?

Yes, the same number: the molecular weight is the mass of one molecule in u (Da) and the molar mass is the mass of one mole in g/mol. Glucose, C6H12O6, is 180.156 u per molecule and 180.156 g/mol.

How do you convert grams to moles?

Divide the grams by the molar mass. 10 g of NaCl ÷ 58.44 g/mol = 0.1711 mol. Type the formula, then the grams in Amount, and the tool shows the moles, molecules and atoms.

How do I find the molar mass of a hydrate?

Add the water's mass to the salt's. Type it with a dot, such as CuSO4·5H2O or CuSO4.5H2O: copper sulfate pentahydrate is 249.68 g/mol, of which the five waters are 90.08.

Why does CO2 work but co2 gives an error?

Symbols are case-sensitive: CO is carbon and oxygen, Co is cobalt. In lower case co2 could be either, so the tool lists both instead of guessing. A lower-case formula with only one reading, such as nacl or h2so4, is read with a note.

Runs entirely in your browser. Nothing is uploaded.