Skip to main content
Skip to calculator
Advertisement

Last updated: July 2, 2026

Molar Mass Calculator

Quick Answer

Molar mass is the mass of one mole of a compound, found by summing each element's atomic weight multiplied by the number of times that element appears in the formula. This calculator accepts formulas such as H2O, Ca(OH)2, (NH4)2SO4, and K4[Fe(CN)6], expands grouped atoms correctly, and reports the molar mass in g/mol together with a readable formula breakdown.

To find molar mass, count each element in the chemical formula, multiply by its atomic weight, and add the contributions together. For example, water has a molar mass of 18.015 grams per mole.

Key Takeaways

  • Molar mass is found by summing each element's atomic weight multiplied by its atom count in the formula.
  • Grouped units in parentheses or brackets multiply every atom inside the group.
  • The calculator uses conventional IUPAC 2021 atomic weights for the first 118 elements.
  • A correct molar mass lets you convert accurately between grams, moles, and molarity.
  • Carry precision through the calculation and round only the final answer for reporting.
Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

M = Σ(nᵢ × Aᵢ)

Where:

  • M=Molar mass(g/mol)
  • nᵢ=Number of atoms of element i
  • Aᵢ=Standard atomic weight of element i(g/mol)
Molar Mass Calculation: Ca(OH)₂Illustration of the molar mass formula M equals the sum of each element count times its atomic mass, using calcium hydroxide as the worked example.Molar Mass Calculation: Ca(OH)₂ElementCountAtomic mass (g/mol)Subtotal (g/mol)Ca140.0840.08O216.0032.00H21.0082.02Total Molar Mass= 74.09 g/molM = Σ(nᵢ × Aᵢ)Based on IUPAC 2021 conventional atomic weightsEach element's atomic mass contribution is added to get the formula's total molar mass.
Ca(OH)₂ shows how atom counts and atomic masses combine into a single molar-mass value.

Worked Examples

Water (H2O)

Water contains two hydrogen atoms and one oxygen atom.

  1. 1Identify the atom counts: H₂O contains 2 hydrogen atoms and 1 oxygen atom.
  2. 2Multiply each atomic weight by its count: H contributes 1.008 × 2 = 2.016 g/mol and O contributes 15.999 × 1 = 15.999 g/mol.
  3. 3Add the contributions: 2.016 + 15.999 = 18.015 g/mol.
  4. 4Count the total atoms: 2 + 1 = 3 atoms.
Final Answer: 18.015 g/mol

Sodium chloride (NaCl)

Table salt contains one sodium atom and one chlorine atom.

  1. 1Read the formula directly: NaCl has 1 sodium atom and 1 chlorine atom.
  2. 2Compute contributions: Na = 22.990 × 1 and Cl = 35.45 × 1.
  3. 3Sum the atomic contributions to obtain the molar mass.
  4. 4The total atom count is 2 atoms per formula unit.
Final Answer: 58.44 g/mol

Calcium hydroxide (Ca(OH)2)

A grouped formula shows how parentheses multiply the hydroxide unit.

  1. 1Read the grouped unit: (OH)₂ means the O and H inside the parentheses are each present twice.
  2. 2Expand the counts to Ca₁O₂H₂.
  3. 3Find each subtotal: Ca = 40.078 × 1, O = 15.999 × 2, H = 1.008 × 2.
  4. 4Add the contributions to obtain 74.092 g/mol, with 5 atoms total.
Final Answer: 74.092 g/mol

Introduction

Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). In practice, it is the bridge between the microscopic world of atoms and molecules and the macroscopic quantities measured on a balance. By summing the standard atomic weights of every atom in a chemical formula, chemists can convert between grams, moles, molarity, percent composition, and reaction stoichiometry. This calculator parses real chemical formulas — including grouped ions such as Ca(OH)₂ and bracketed coordination compounds such as K₄[Fe(CN)₆] — and then applies the IUPAC relation M = Σ(nᵢ × Aᵢ) using modern atomic-weight data.

What is molar mass?

Molar mass is the mass of exactly one mole of a substance. One mole contains Avogadro's number of formula units, so the numerical value of an element's atomic mass in u becomes the same numerical value in g/mol for a mole of that element. For compounds, the molar mass is found by adding the contribution of each element in the chemical formula. This is why the molar mass of water is 2 × 1.008 + 15.999 = 18.015 g/mol. Once you know molar mass, it becomes easy to move into concentration tools like the molarity calculator or amount-of-substance tools like the mole calculator.

How the formula works

The calculation follows M = Σ(nᵢ × Aᵢ), where *nᵢ* is the number of atoms of element *i* and *Aᵢ* is its standard atomic weight. Missing subscripts are interpreted as 1, so NaCl contains one sodium and one chlorine atom. Parentheses and brackets multiply every atom inside them, which is why Ca(OH)₂ becomes Ca₁O₂H₂ and K₄Fe(CN)₆] becomes K₄Fe₁C₆N₆. The standard terminology is described in the [IUPAC Gold Book and the latest conventional atomic weights are maintained by the CIAAW atomic-weights tables.

Step-by-step method for any formula

A reliable manual workflow is: identify each element symbol, expand any grouped sections, count the total atoms of each element, multiply by the relevant atomic weight, and sum the subtotals. The calculator automates that process and also reports a readable breakdown so you can audit the result. If you then want to convert a weighed sample into moles, pair the answer with the grams to moles calculator. If you want composition by mass, continue to the percent composition calculator.

  • Read element symbols carefully: C and Cl are different elements.

  • Apply subscripts after grouped units to every atom inside the group.

  • Keep full precision during the calculation and round only at the end.

  • Check that the final unit is g/mol, not grams or moles alone.

Why atomic-weight accuracy matters

For many classroom problems, rounding to two decimal places is enough, but precise work in analytical chemistry, pharmaceutical formulation, and quantitative synthesis benefits from carrying extra digits until the final answer. Small molar-mass errors propagate into stock-solution preparation, gravimetric standards, and yield calculations. The data used here align with the 2021 IUPAC atomic-weight recommendations summarized in *Pure and Applied Chemistry* and related reference material. For element-specific lookups, an atomic mass calculator or primary sources such as NIST's atomic compositions database are useful cross-checks.

Common uses of molar mass

Molar mass is central to reaction stoichiometry, reagent preparation, gas calculations, biochemistry assays, and environmental analysis. It lets you convert a weighed mass into moles, predict how much reactant is required, and compute concentrations in solutions. It also underpins companion tools such as the molecular weight calculator, which many learners use interchangeably, even though molar mass emphasizes g/mol while molecular weight is often reported as a relative mass. In lab notebooks, it is standard practice to record both the formula and the molar mass for every critical reagent.

Common mistakes to avoid

The most common errors are using the wrong element symbol, forgetting to multiply grouped atoms, mixing up atomic mass with atomic number, or rounding too early. Hydrated salts, charged ions, and coordination compounds need the same careful symbol-by-symbol treatment as simple formulas. If your answer seems unreasonable, compare it with a quick estimate using common atomic masses such as H ≈ 1, C ≈ 12, N ≈ 14, O ≈ 16, Na ≈ 23, and Cl ≈ 35.5. A simple estimate should be close to the exact calculator output, even when you later use it in the molarity calculator or grams to moles calculator.

Quick Reference Card

Molar Mass — Quick Reference

Quick referenceMolar Mass Calculator

M = Σ(nᵢ × Aᵢ)

Valid range: From the lightest species such as H2 to very large ionic and coordination compounds; the formula must use valid element symbols.

Common Values

WaterH2O = 18.015 g/mol
Sodium chlorideNaCl = 58.44 g/mol
Calcium hydroxideCa(OH)2 = 74.092 g/mol
GlucoseC6H12O6 = 180.156 g/mol
Ammonium sulfate(NH4)2SO4 = 132.134 g/mol

Watch Out

  • Use the correct element symbols: Co is cobalt, while CO would mean carbon and oxygen.
  • Apply multipliers after parentheses or brackets to every atom in the grouped section.
  • Do not confuse atomic number with atomic weight when adding contributions.
  • Avoid rounding intermediate subtotals too early if you need a precise final answer.

Pro Tips

  • Estimate first with H≈1, C≈12, N≈14, O≈16 to catch major entry mistakes quickly.
  • Use the formula breakdown output to audit how every element contributes to the total.
  • Convert grams to moles by dividing the sample mass by the molar mass you calculate here.
  • For solution work, pair the result with a molarity calculator to move directly into mol/L calculations.

FAQs

What is the difference between molar mass and molecular weight?

The terms are often used interchangeably in introductory chemistry, but molar mass specifically refers to the mass of one mole of a substance and is reported in g/mol. Molecular weight is often used as a relative mass concept without explicit units. For most practical calculations on a balance, molar mass is the quantity you want.

How do I calculate molar mass from a chemical formula?

Count how many atoms of each element appear in the formula, multiply each count by that element's standard atomic weight, and then add all contributions together. Parentheses and brackets multiply everything inside the grouped unit.

Why does H2O have a molar mass of 18.015 g/mol?

Water contains two hydrogen atoms and one oxygen atom. Using IUPAC weights, the calculation is 2 × 1.008 + 15.999 = 18.015 g/mol.

Can this calculator handle parentheses and brackets?

Yes. It supports grouped formulas such as Ca(OH)2, (NH4)2SO4, and bracket notation such as K4[Fe(CN)6]. Each multiplier is applied to every atom inside the group.

What if I enter an invalid or unknown element symbol?

The calculator returns a graceful error message instead of failing. This helps you spot typos such as using an element symbol that does not exist or entering malformed grouping characters.

Why is molar mass important for molarity calculations?

Molarity is moles of solute per litre of solution. If you measure a sample in grams, you must divide by the molar mass first to convert grams into moles. That is why molar mass is the first step in many solution-preparation workflows.