Skip to content
CalculatorAtlas

Molar Mass Calculator

Tested

Molar mass and mass percent composition of a chemical formula.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

Molar mass is the sum of atomic weights times atom counts: M = Σ (atomic weight × atoms). H₂O is 2 × 1.008 + 15.999 = 18.015 g/mol, which is 11.19% hydrogen and 88.81% oxygen by mass.

Enter a chemical formula such as H2O or Ca(OH)2. The calculator returns the molar mass and the composition by mass.

Related tools: Mass Percent Calculator: Mass percent of a component in a mixture or compound. Average Atomic Mass Calculator: Weighted average of isotope masses. pH Calculator: pH, pOH and ion concentrations at 25 °C.

How to use the Molar Mass Calculator

  1. Type chemical formula, for example Ca(OH)2 or CuSO4·5H2O.
  2. Press Calculate to see the result, and use Reset to start again.
Inputs of the Molar Mass Calculator
InputWhat to enterAllowed values
Chemical formulaText, such as Ca(OH)2 or CuSO4·5H2O—

Formula and method

Formula

M = Σ (atomic weight × atoms)

IEEE-754 double precision; shown to the decimals indicated.

Supports parentheses, brackets and hydrates written with · or . (for example CuSO4·5H2O). Atomic weights are IUPAC standard values rounded to five significant figures for the 55 most common elements.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Chemical formula = H2O.

Results of example 1
ResultValue
Molar mass18.015 g/mol
Composition by massH 11.19%, O 88.81%

Example 2

Inputs: Chemical formula = C6H12O6.

Results of example 2
ResultValue
Molar mass180.156 g/mol
Composition by massC 40%, H 6.71%, O 53.28%

Example 3

Inputs: Chemical formula = Ca(OH)2.

Results of example 3
ResultValue
Molar mass74.092 g/mol
Composition by massCa 54.09%, H 2.72%, O 43.19%

The first line is the headline result (molar mass). Below it the molar Mass Calculator lists composition by mass, which describe the same case from other angles. IEEE-754 double precision; shown to the decimals indicated.

Reading a formula

Subscripts after an element multiply it, and parentheses group atoms: Ca(OH)₂ has 1 Ca, 2 O and 2 H, for 74.09 g/mol. Elements outside the table are rejected rather than guessed.

Why it matters

Molar mass converts grams to moles in stoichiometry: 36 g of water is 36 ÷ 18.015 = 1.998 mol. Composition by mass helps identify compounds and calculate percent composition.

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Chemical formula: left empty shows "Enter chemical formula." beside that field and no result.

Choosing between the Molar Mass Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Molar Mass Calculator and similar calculators
CalculatorYou enterIt returns
[Mass Percent Calculator](/science/mass-percent-calculator/)mass of component and total massMass percent
[Average Atomic Mass Calculator](/science/average-atomic-mass/)isotope masses and abundancesAverage atomic mass
[pH Calculator](/science/ph/)start from and valuepH
[Mole Calculator](/science/mole/)start from and molar massAmount
[Percent Yield Calculator](/science/percent-yield/)actual yield and theoretical yieldPercent yield

Background: chemistry calculations

Most basic chemistry calculations chain three relations: moles n = mass ÷ molar mass, molarity M = n ÷ volume in litres, and dilution C₁V₁ = C₂V₂. Keep units consistent: grams with g/mol, litres with mol/L.

Molar masses come from standard atomic weights, which differ slightly between tables and with the isotopic make-up of a real sample.

Assumptions and limitations

  • Elements outside the table are rejected rather than guessed

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for chemical formula to confirm this.

Frequently asked questions

What is the molar mass of CO₂?

CO₂ is 12.011 + 2 × 15.999 = 44.01 g/mol.

What is the molar mass of NaCl?

NaCl is 22.990 + 35.45 = 58.44 g/mol, so 58.44 g of salt is exactly one mole.

How do hydrates work?

Add the water as a separate group.

What does the Molar Mass Calculator calculate?

Molar mass and mass percent composition of a chemical formula. It returns Molar mass and Composition by mass.

What formula does the Molar Mass Calculator use?

M = Σ (atomic weight × atoms). Supports parentheses, brackets and hydrates written with · or .

What do I need to enter in the molar Mass Calculator?

You enter Chemical formula.

How is the result rounded or limited?

IEEE-754 double precision; shown to the decimals indicated. Elements outside the table are rejected rather than guessed.

What is an example of a molar Mass result?

With chemical formula H2O, the molar mass is 18.015 g/mol.

Where does the method come from?

The method follows: IUPAC Commission on Isotopic Abundances and Atomic Weights, Standard Atomic Weights (abridged, 2013–2021).

Sources

  • IUPAC Commission on Isotopic Abundances and Atomic Weights, Standard Atomic Weights (abridged, 2013–2021)

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.