Molecular Weight Calculator (Molar Mass)

Calculate molecular weight, molar mass, elemental composition, and chemical properties instantly using advanced chemistry analysis tools.

Molecular Weight

Enter any formula and read its molecular weight, total atom count, and live atomic breakdown. Handles subscripts, parentheses, ions, and hydrates.

Parsed H2O2 elements, 3 atoms.

Try:

Press Calculate to reveal the molar mass, elemental breakdown, and periodic-table visualization.

What Is Molecular Weight?

Molecular weight (also called molecular mass) is the sum of the atomic masses of every atom in a molecule. It is measured in atomic mass units (amu or u), also known as daltons. To find it, you add up the standard atomic weight of each element multiplied by how many times that element appears in the chemical formula. Water (H₂O), for example, has a molecular weight of 2 × 1.008 + 1 × 15.999 = 18.015 u.

Molar mass is numerically the same value, but it carries the unit grams per mole (g/mol). It tells you the mass of exactly one mole — that is, 6.022 × 10²³ particles — of a substance. So water's molar mass is 18.015 g/mol, meaning one mole of water weighs 18.015 grams. This calculator reports both at once, because the number is identical and only the context (a single molecule vs. a mole of them) changes.

How the Calculation Works

1. Parse the formula

The engine reads your formula left to right, recognising element symbols (one capital letter plus optional lowercase letters), subscripts, parentheses, brackets, and hydrate dots like CuSO₄·5H₂O. Nested groups multiply correctly.

2. Look up atomic masses

Each element's standard atomic weight is pulled from the IUPAC periodic table — these are weighted averages of an element's natural isotopes, which is why most are not whole numbers.

3. Multiply and sum

Every element's atomic mass is multiplied by its atom count, and the products are added together to give the molecular weight / molar mass.

4. Derive everything else

From the totals the tool computes mass percent, atom percent, the empirical formula, monoisotopic exact mass, and grams ↔ moles conversions.

6 Ways to Use This Calculator

01

Solve homework

Check molar-mass answers for textbook stoichiometry problems in seconds.

02

Prepare lab solutions

Convert between grams and moles to weigh out the exact mass for a target molarity.

03

Analyse drugs

Find the molar mass of an active pharmaceutical ingredient for dosing calculations.

04

Study composition

See which element carries the most mass and read the full mass-percent breakdown.

05

Handle hydrates

Parse waters of crystallization correctly, like in CuSO₄·5H₂O or MgSO₄·7H₂O.

06

Explore the elements

Watch the periodic table light up to learn which families your compound draws from.

Molecular Weight vs. Molar Mass vs. Atomic Mass

Atomic mass is the mass of a single atom of one element, measured in u. The periodic-table value is the standard atomic weight: the average mass across an element's natural isotopes, weighted by abundance.

Molecular weight applies that idea to a whole molecule — the summed atomic masses of all its atoms, still in u. Some chemists prefer the term formula mass for ionic compounds like NaCl that don't form discrete molecules.

Molar mass is the same number expressed in g/mol. The bridge between a single particle (u) and a measurable mass in the lab (g/mol) is Avogadro's number, 6.022 × 10²³ particles per mole. That is why 1 u per molecule equals 1 g/mol of substance.

Best Practices for Accurate Results

  • Capitalise element symbols correctly — Co is cobalt, but CO is carbon monoxide. The parser is case-sensitive on purpose.
  • Use parentheses for repeating groups: write Ca(OH)₂, not CaO₂H₂, so the meaning stays clear even though the mass is identical.
  • Enter hydrates with a dot — CuSO4·5H2O. You can also type a period or asterisk; the tool normalises them.
  • Drop the charge for ions — the parser ignores a trailing 2+ or 2- so SO4 and SO4²⁻ give the same mass.
  • Remember that molar mass uses average atomic weights; use the exact (monoisotopic) mass only when interpreting high-resolution mass spectra.

Why Molar Mass Matters

Molar mass is the linchpin of stoichiometry — the quantitative bookkeeping of chemical reactions. Balanced equations relate substances in moles, but balances in the lab read out grams. Molar mass is the conversion factor that lets a chemist move between the two, so it underpins everything from titrations and yield calculations to industrial batch sizing and pharmaceutical dosing.

Elemental composition matters just as much. Knowing that oxygen makes up 53% of glucose's mass, or that nitrogen is 47% of urea, drives fertilizer labelling, nutrition facts, environmental monitoring, and quality control across chemistry, biology, food science, and engineering.

Where Chemistry Gets Tricky

Isotopes & exact mass

Most elements are mixtures of isotopes. The periodic table lists the average, but a mass spectrometer sees individual isotopes — that's why the monoisotopic 'exact mass' differs slightly from the average molar mass.

Hydrates

Salts like CuSO₄·5H₂O lock water into their crystal lattice. The waters add real mass that disappears on heating, so anhydrous and hydrated forms have very different molar masses.

Empirical vs molecular

Glucose (C₆H₁₂O₆) and formaldehyde (CH₂O) share the empirical formula CH₂O, yet are completely different substances. Empirical formula gives the simplest ratio; molecular formula gives the real count.

Ionic compounds

Salts don't form discrete molecules, so chemists speak of 'formula mass' rather than 'molecular weight' — the math is the same, the language differs.

Core Chemistry Formulas

Molar mass = Σ (atomic mass × atom count)

Add each element's atomic weight times how many atoms appear.

Moles = mass (g) ÷ molar mass (g/mol)

Convert a weighed mass into moles of substance.

Mass = moles × molar mass

Convert moles back into a mass you can weigh out.

Mass % of element = (element mass ÷ molar mass) × 100

The percent composition by mass for each element.

Particles = moles × 6.022 × 10²³

Avogadro's number links moles to the actual number of molecules.

Common Chemistry Mistakes

Confusing case

Typing 'co' or 'CO' for cobalt. Cobalt is Co; CO is carbon monoxide. Always match the periodic-table capitalisation.

Ignoring subscripts on groups

Forgetting that the 2 in Ca(OH)₂ multiplies both O and H, giving two oxygens and two hydrogens.

Skipping the water of hydration

Calculating CuSO₄ instead of CuSO₄·5H₂O understates the mass by 90 g/mol.

Rounding too early

Rounding atomic masses to whole numbers before summing introduces error — keep the decimals until the end.

How We Calculate

Every result on this page is computed in your browser using IUPAC standard atomic weights for all 118 elements. The formula parser is a stack-based recursive engine that fully supports nested parentheses, polyatomic groups, ionic charges, and hydrate notation. Monoisotopic exact masses use the most abundant isotope for common elements and fall back to the average weight (clearly flagged) for rarer ones.

Nothing is uploaded — all chemistry runs locally, instantly, and privately. Atomic-weight data is sourced from the IUPAC Commission on Isotopic Abundances and Atomic Weights and the NIST atomic-weights tables.

Frequently Asked Questions

Molecular weight, also called molecular mass, is the total mass of a molecule found by adding up the atomic masses of every atom in its chemical formula. It is measured in atomic mass units (amu or u), also known as daltons. For water (H₂O) the molecular weight is 2 × 1.008 (hydrogen) + 1 × 15.999 (oxygen) = 18.015 u. Because the atomic masses on the periodic table are weighted averages of an element's natural isotopes, molecular weights are usually not whole numbers.

Molar mass is the mass of one mole of a substance — that is, 6.022 × 10²³ particles — and is expressed in grams per mole (g/mol). It is numerically identical to the molecular weight; only the unit and context change. Water's molecular weight is 18.015 u per molecule, and its molar mass is 18.015 g/mol, meaning one mole of water weighs 18.015 grams. Molar mass is what you use in the lab to weigh out a specific number of moles.

Multiply each element's standard atomic weight by the number of atoms of that element in the formula, then add the products together. For glucose (C₆H₁₂O₆): carbon = 6 × 12.011 = 72.066, hydrogen = 12 × 1.008 = 12.096, oxygen = 6 × 15.999 = 95.994. The total is 180.156 g/mol. This calculator parses the formula automatically — including parentheses, ionic charges, and hydrates — so you simply type the formula and read the answer.

Atomic mass is the mass of a single atom of an element, measured in atomic mass units (u), where one u is defined as 1/12 the mass of a carbon-12 atom. The value shown on the periodic table is the standard atomic weight: the average mass of an element's atoms weighted by the natural abundance of its isotopes. Chlorine's 35.45 u, for instance, reflects a mix of roughly 76% chlorine-35 and 24% chlorine-37.

They are the same number with different units and scope. Molecular weight is the mass of one molecule in atomic mass units (u), while molar mass is the mass of one mole of those molecules in grams per mole (g/mol). The link between them is Avogadro's number, 6.022 × 10²³. So a molecule of CO₂ weighs 44.01 u, and one mole of CO₂ weighs 44.01 g. 'Formula mass' is the preferred term for ionic compounds like NaCl that don't form discrete molecules.

A mole is the chemist's counting unit, like a dozen but vastly larger: it is exactly 6.02214076 × 10²³ particles (Avogadro's number). One mole of any substance contains that many atoms, molecules, or ions. The mole bridges the invisible world of atoms and the measurable world of grams — and molar mass is the conversion factor that connects a mass you can weigh to a number of moles you can react.

Molar masses are computed from IUPAC standard atomic weights for all 118 elements, so results are accurate to the precision of those published values — typically four to six significant figures. The monoisotopic 'exact mass' uses the most abundant isotope masses for common elements and falls back to the average weight (clearly flagged) for rarer elements. For most homework, lab prep, and analysis this precision is more than enough; verify critical values against a primary reference.

Hydrates are compounds, usually salts, that incorporate a fixed number of water molecules into their crystal structure. They are written with a centred dot, such as copper(II) sulfate pentahydrate, CuSO₄·5H₂O, which carries five waters per formula unit. Those waters add real mass — CuSO₄·5H₂O is 249.69 g/mol versus 159.61 g/mol for anhydrous CuSO₄ — and are driven off on heating. This calculator parses the dot notation and counts the water correctly.

Elemental composition (or percent composition) describes how much each element contributes to a compound's total mass, expressed as a mass percentage. You calculate it by dividing each element's total mass in the formula by the molar mass and multiplying by 100. In water, hydrogen is about 11.2% and oxygen about 88.8% by mass. Composition is essential for empirical-formula determination, fertilizer labelling, nutrition facts, and quality control.

A chemical formula uses element symbols and subscripts to show which elements are present and in what ratio. The capital-and-lowercase symbol identifies the element (Na for sodium, Cl for chlorine), and a subscript number gives how many atoms of the preceding element or group there are — H₂O means two hydrogens and one oxygen. Parentheses group repeating units, so Ca(OH)₂ means one calcium plus two hydroxide groups (two oxygens and two hydrogens). A trailing charge, like SO₄²⁻, marks an ion.