Skip to content

Molar Mass Calculator

Calculate molar mass of chemical compounds from molecular formula.

By CalcGenius Editorial TeamLast reviewed August 28, 20253 min read
Molar Mass Inputs
📊
Enter your values and click Calculate

About

The Molar Mass Calculator parses a chemical formula like H₂O, NaCl, or C₆H₁₂O₆ and computes the mass of one mole of the compound in grams per mole (g/mol). Type any formula or pick a common compound from the dropdown; the calculator looks up atomic masses from a built-in periodic table and sums them.

Molar mass is the cornerstone of stoichiometry. Lab balances measure mass in grams; chemical reactions proceed in moles. The bridge is molar mass: n = mass/M converts grams to moles; mass = n × M does the reverse. Every solution preparation, every yield calculation, every titration depends on this conversion — so a reliable molar mass calculator is essential lab software.

The calculator handles arbitrary element combinations using IUPAC 2021 atomic masses: H = 1.008, C = 12.011, N = 14.007, O = 15.999, Na = 22.990, S = 32.06, Cl = 35.45, K = 39.098, Ca = 40.078, Fe = 55.845, Cu = 63.546, and many more. Element symbols are case-sensitive (Na is sodium, NA is invalid). Counts default to 1 when omitted (NaCl = Na₁Cl₁).

The calculator does not yet support parentheses (e.g., Ca(OH)₂) or hydrates (e.g., CuSO₄·5H₂O). For these, expand the formula manually: Ca(OH)₂ = CaO₂H₂, CuSO₄·5H₂O = CuSO₄ + 5 H₂O = CuS O₉ H₁₀. The simpler formula notation covers the vast majority of common compounds.

Molar masses are weighted averages over natural isotopic abundances. For example, chlorine's standard atomic mass 35.45 g/mol is a weighted average of ³⁵Cl (34.97, 75.78% abundant) and ³⁷Cl (36.97, 24.22%). This is fine for almost all stoichiometry — only when you need exact isotopic calculations (mass spectrometry, nuclear chemistry) should you switch to single-isotope masses.

How to Use

  1. 1
    Type a chemical formula
    Enter a formula like H2O, NaCl, C6H12O6, or H2SO4. Element symbols are case-sensitive (Na is sodium, NA is invalid). Counts default to 1 when omitted.
  2. 2
    Or pick a common compound
    Use the Quick-pick dropdown to load water, table salt, glucose, sulfuric acid, hydrochloric acid, sodium hydroxide, ammonia, methane, ethanol, caffeine, or aspirin.
  3. 3
    Read the molar mass in g/mol
    The hero block shows the molar mass (sum of all atomic masses × counts). Below it, the element breakdown lists each element, its count, its atomic mass, and its contribution to the total.
  4. 4
    Use it for stoichiometry
    With molar mass M in g/mol, you can convert any mass to moles (n = mass/M) or any moles to mass (mass = n × M). This is the foundation of all solution preparation and reaction yield calculations.
  5. 5
    Sanity-check against known values
    H₂O = 18.015, NaCl = 58.44, CO₂ = 44.01, glucose = 180.16, H₂SO₄ = 98.08. If your formula gives a wildly different value, check for typos in element symbols (Mg vs Mn vs Mo).

Formula

For a compound with formula X₁aX₂b…Xₙk, the molar mass is M = Σ (aᵢ × atomic_mass(Xᵢ)). The atomic masses are looked up from the periodic table and are expressed in g/mol. The result has units g/mol and represents the mass of exactly one mole (6.022 × 10²³ formula units) of the compound.

Worked Example

Glucose C₆H₁₂O₆: 6 × 12.011 (C) + 12 × 1.008 (H) + 6 × 15.999 (O) = 72.066 + 12.096 + 95.994 = 180.156 g/mol. So one mole of glucose weighs 180.156 g and contains 6.022 × 10²³ glucose molecules. To weigh out 0.05 mol of glucose for a 250 mL solution of 0.2 M, you need 0.05 × 180.156 = 9.008 g.

Tips

  • Element symbols are case-sensitive: Na (sodium) vs NA (invalid) vs N (nitrogen) + A (invalid). Always capitalize the first letter only.
  • Counts default to 1 when omitted — NaCl is the same as Na1Cl1.
  • Common typos: Mg (magnesium) vs Mn (manganese) vs Mo (molybdenum) — check these carefully.
  • For hydrates like CuSO₄·5H₂O, write as CuSO4H10O5 (5 water = 10 H + 5 O added to CuSO₄).
  • If a formula returns an error, double-check element symbols against the periodic table — common pitfalls are Mn vs Mg, K vs P, B vs Br.

Common Mistakes

Warning
Common mistakes: (1) Confusing atomic mass with mass number (rounded integer on some periodic tables). Use precise atomic masses for accurate molar mass. (2) Forgetting to multiply by the count — NaCl is Na + Cl, but NaCl₂ would be Na + 2 Cl. (3) Case-sensitivity bugs: writing "nacl" instead of "NaCl". (4) Confusing molecular mass (u) with molar mass (g/mol) — they are numerically equal but have different units and contexts.

Frequently Asked Questions

What is molar mass?
Molar mass is the mass of one mole (6.022 × 10²³ entities) of a substance, measured in grams per mole (g/mol). It is the sum of the atomic masses of all atoms in the formula. For water (H₂O): 2 × 1.008 (H) + 15.999 (O) = 18.015 g/mol. One mole of water weighs 18.015 grams and contains Avogadro's number of molecules. Molar mass converts between mass and moles — the bridge between lab measurement and stoichiometry.
How is molar mass calculated from a formula?
Parse the formula into elements and their counts, look up each element's atomic mass from the periodic table, and sum (count × atomic mass) across all elements. For H₂SO₄: 2 × 1.008 + 32.06 + 4 × 15.999 = 98.079 g/mol. For glucose (C₆H₁₂O₆): 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol. This calculator handles arbitrary formulas with element symbols and integer counts; it does not yet handle parentheses or hydrates.
What is the difference between atomic mass and molar mass?
Atomic mass is the mass of a single atom, measured in atomic mass units (1 u ≈ 1.66 × 10⁻²⁴ g) or in g/mol when scaled to one mole. Numerically they are identical: hydrogen has atomic mass 1.008 u and molar mass 1.008 g/mol. Molar mass usually refers to a compound (sum of atomic masses); atomic mass refers to an element. The same number, different context. The periodic table reports both — they're numerically equal.
Why is molar mass important for stoichiometry?
Lab balances measure mass (grams); chemical reactions proceed in moles. Molar mass converts grams to moles: n = mass / molar_mass. Without this conversion you cannot predict reaction yields, balance equations, prepare solutions of known molarity, or interpret analytical results. For example, to make 250 mL of 0.1 M NaCl, you need 0.025 mol × 58.44 g/mol = 1.461 g — the molar mass lets you weigh the correct amount.
What is the molar mass of common substances?
Water (H₂O) = 18.015 g/mol. Sodium chloride (NaCl) = 58.44 g/mol. Carbon dioxide (CO₂) = 44.01 g/mol. Glucose (C₆H₁₂O₆) = 180.16 g/mol. Ethanol (C₂H₅OH) = 46.07 g/mol. Sulfuric acid (H₂SO₄) = 98.08 g/mol. Methane (CH₄) = 16.04 g/mol. Caffeine (C₈H₁₀N₄O₂) = 194.19 g/mol. These benchmarks let you sanity-check the calculator.
How are isotopic masses handled?
Standard atomic masses in the periodic table are weighted averages over the natural isotopic abundance of each element. For example, chlorine's standard atomic mass is 35.45 g/mol — a weighted average of ³⁵Cl (34.97 g/mol, 75.78% abundance) and ³⁷Cl (36.97 g/mol, 24.22%). For calculations involving a specific isotope (e.g., ³⁵Cl₂), you would use the isotope's mass, not the standard average. This calculator uses standard atomic masses only.

Molar mass basics

Molar mass (M) is the mass of one mole of a substance, in grams per mole (g/mol). One mole is 6.022 × 10²³ entities (Avogadro's number). For a compound, M is the sum of (atomic mass × atom count) across all elements in the formula. For water H₂O: 2 × 1.008 + 15.999 = 18.015 g/mol. So one mole of water (18.015 g) contains Avogadro's number of H₂O molecules, and the mass of each molecule is 18.015 u / N_A ≈ 2.99 × 10⁻²³ g.

Atomic mass units

Atomic mass is reported in atomic mass units (u or Da), where 1 u = 1/N_A g ≈ 1.6605 × 10⁻²⁴ g. By definition, the carbon-12 atom has mass exactly 12 u. Atomic masses in the periodic table are averages over natural isotopic abundance. Numerically, the atomic mass in u equals the molar mass in g/mol — 1 atom of carbon weighs 12 u, and 1 mole of carbon atoms weighs 12 g. This numerical equality is the genius of the mole concept.

Periodic table reference

Every element's atomic mass is shown on the periodic table, typically below the symbol. The masses are weighted averages over natural isotopic abundances, so they are not whole numbers. This calculator uses IUPAC 2021 values: H = 1.008, C = 12.011, N = 14.007, O = 15.999, Na = 22.990, Mg = 24.305, S = 32.06, Cl = 35.45, K = 39.098, Ca = 40.078, Fe = 55.845, Cu = 63.546, Br = 79.904, Ag = 107.87, I = 126.90, Au = 196.97, Pb = 207.2, U = 238.03 — and many more, for elements up to Z ~ 92.

Why molar mass matters (stoichiometry)

Stoichiometry — predicting reaction yields and preparing solutions — requires converting between mass (what you can weigh) and moles (what reactions actually use). The bridge is molar mass: n = mass/M and mass = n × M. To make 100 mL of 0.5 M NaCl, you need 0.05 mol × 58.44 g/mol = 2.922 g of NaCl. To get 0.1 mol of CO₂ from methane combustion, you produce 0.1 × 44.01 = 4.401 g of CO₂. Without molar mass, lab chemistry would be impossible.

Common compounds and their molar masses — benchmarks for sanity-checking the calculator.
CompoundFormulaCompositionCalculationMolar Mass
Water (H₂O)H2O2 H + 1 O2 × 1.008 + 15.99918.015 g/mol
Table salt (NaCl)NaCl1 Na + 1 Cl22.990 + 35.4558.44 g/mol
Carbon dioxide (CO₂)CO21 C + 2 O12.011 + 2 × 15.99944.009 g/mol
Glucose (C₆H₁₂O₆)C6H12O66 C + 12 H + 6 O6 × 12.011 + 12 × 1.008 + 6 × 15.999180.16 g/mol
Ethanol (C₂H₅OH)C2H5OH2 C + 6 H + 1 O2 × 12.011 + 6 × 1.008 + 15.99946.07 g/mol
Sulfuric acid (H₂SO₄)H2SO42 H + 1 S + 4 O2 × 1.008 + 32.06 + 4 × 15.99998.079 g/mol
Caffeine (C₈H₁₀N₄O₂)C8H10N4O28 C + 10 H + 4 N + 2 O8 × 12.011 + 10 × 1.008 + 4 × 14.007 + 2 × 15.999194.19 g/mol
Info
For polyatomic ions (SO₄²⁻, NO₃⁻, NH₄⁺), the molar mass is the sum of atoms in the ion — the charge does not change the mass. SO₄²⁻ has the same molar mass as neutral SO₄: 32.06 + 4 × 15.999 = 96.06 g/mol.
Pro tip
The numerical equality of atomic mass in u and molar mass in g/mol is the genius of the mole concept. One atom of carbon = 12 u; one mole of carbon = 12 g. So 1 u = 1/N_A g ≈ 1.66 × 10⁻²⁴ g. This is why you can read molar mass straight off the periodic table without any conversion.

Authoritative References

Try our other free calculators

CalcGenius has 1,200+ free, ad-free, browser-based calculators for finance, health, math, science, and everyday life. No sign-up required.

Molar Mass Calculator — SI Unit Formula & Vector Breakdown