Free Online Calculator

Molecular Weight Calculator

Get the molar mass and elemental composition of any chemical formula, including hydrates and brackets.

Last updated: Free, no sign-up Private — runs in your browser

Quick answer: how to find molecular weight

Add up the atomic masses of every atom in the formula. Water, H₂O, is 2 × 1.008 + 15.999 = 18.015 g/mol; glucose, C₆H₁₂O₆, is 180.156 g/mol; table salt, NaCl, is 58.44 g/mol.

Overview of the Molecular Weight Calculator

The Molecular Weight Calculator finds the molar mass (formula weight) of a compound from its chemical formula. It understands element symbols, subscripts, round and square brackets such as Ca(OH)₂ and K₄[Fe(CN)₆], and hydrates written with a dot such as CuSO₄·5H₂O. The output includes a table of each element's count, atomic mass, mass contribution and mass percent.

Add a sample mass in grams to get the number of moles and the number of formula units. Chemists and students use molar mass to prepare solutions, balance reactions and convert between mass and moles — try the Molarity Calculator next.

How We Calculate Molar Mass

The formula is parsed into atom counts, which are multiplied by standard atomic masses.

  1. Read element symbols (a capital letter, optionally followed by a lowercase letter) and the number after each.
  2. Handle brackets by multiplying everything inside by the number after the closing bracket.
  3. Treat a dot or middle-dot (·) as a hydrate: the coefficient before the next part multiplies that whole part.
  4. Molar mass = Σ (count × atomic mass), in g/mol.
  5. Mass % of an element = (count × atomic mass) ÷ molar mass × 100. Moles = grams ÷ molar mass; molecules = moles × 6.02214076 × 10²³.
M = Σ nᵢ · Aᵢ   mass % = (n · A) ÷ M × 100
moles = mass ÷ M   molecules = moles × NA
Worked examples (calculated with this tool)
CompoundFormulaMolar mass (g/mol)
WaterH2O18.015
Carbon dioxideCO244.009
Sodium chlorideNaCl58.44
GlucoseC6H12O6180.156
Sulfuric acidH2SO498.072
Calcium hydroxideCa(OH)274.092
Aluminium sulfateAl2(SO4)3342.132
Copper(II) sulfate pentahydrateCuSO4·5H2O249.677
EthanolC2H5OH46.069

Atomic Masses of Common Elements

Atomic masses are standard (conventional) atomic weights. For radioactive elements without a stable isotope, the mass number of the longest-lived isotope is used.

Atomic masses of common elements
ElementSymbolAtomic mass (g/mol)
HydrogenH1.008
CarbonC12.011
NitrogenN14.007
OxygenO15.999
SodiumNa22.990
MagnesiumMg24.305
AluminiumAl26.982
PhosphorusP30.974
SulfurS32.06
ChlorineCl35.45
PotassiumK39.098
CalciumCa40.078
IronFe55.845
CopperCu63.546
ZincZn65.38
SilverAg107.87
GoldAu196.97

Writing Formulas Correctly

  • Capitalisation matters: Co is cobalt, CO is carbon monoxide.
  • Use brackets for groups: Ca(OH)2 means one calcium, two oxygen and two hydrogen.
  • Write hydrates with a dot: CuSO4·5H2O or CuSO4.5H2O.
  • Charges and states such as (aq) are not part of the molar mass and should be left out.

Molecular Weight Calculator — Frequently Asked Questions

How do I calculate molecular weight?

Add the atomic masses of all the atoms in the formula. H₂O is 2 × 1.008 + 15.999 = 18.015 g/mol.

What is the difference between molecular weight and molar mass?

They have the same numerical value. Molecular weight is dimensionless (relative to carbon-12); molar mass has units of g/mol.

What is the molecular weight of glucose?

180.156 g/mol for C₆H₁₂O₆.

How do I handle brackets in a formula?

Multiply everything inside the brackets by the number after them: Ca(OH)₂ has 2 O and 2 H.

How do I enter a hydrate?

Use a dot or middle-dot: CuSO4·5H2O. The 5 multiplies the water part.

How do I convert grams to moles?

Divide grams by the molar mass. 18.0156 g of glucose is 0.1 mol.

How many molecules are in a mole?

6.02214076 × 10²³ — Avogadro's number.

What is mass percent composition?

The share of the compound's mass contributed by each element, shown in the table.

Why is my formula rejected?

Check capitalisation, unknown symbols and brackets. Element symbols must start with a capital letter.

Is my data stored?

No. Everything runs in your browser.

More Free Calculators You May Need

Need a custom calculator or tool on your website?

Our team designs and develops fast, SEO-ready websites and web tools. Tell us what you need.

Call Us WhatsApp

Get a Free Quote

Tell us a bit about your project — we'll get back to you shortly.

5 + 7 =
Call WhatsApp