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 H2O — 2 elements, 3 atoms.
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
Solve homework
Check molar-mass answers for textbook stoichiometry problems in seconds.
Prepare lab solutions
Convert between grams and moles to weigh out the exact mass for a target molarity.
Analyse drugs
Find the molar mass of an active pharmaceutical ingredient for dosing calculations.
Study composition
See which element carries the most mass and read the full mass-percent breakdown.
Handle hydrates
Parse waters of crystallization correctly, like in CuSO₄·5H₂O or MgSO₄·7H₂O.
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
Related Calculators
Pair the Molecular Weight Calculator with these math, science, and conversion tools.
- Scientific CalculatorAdvanced trig, log, exponent, root, factorial, and memory functions.
- Unit ConverterAll-in-one converter for 40+ measurement categories with natural-language input.
- Percentage CalculatorCalculate % of a number, percentage change, and reverse percentages.
- GDP CalculatorGDP via expenditure and income approaches, per capita, and real vs nominal.
- Ohm's Law CalculatorSolve voltage, current, resistance, and power with AC/DC and series/parallel circuit modes.
- Horsepower CalculatorHorsepower from torque & RPM, force-distance-time, watts, or vehicle trap-speed data.