Molar Mass Calculator

Updated July 2026

Enter a chemical formula such as H2O, C6H12O6 or Ca(OH)2 to compute its molar mass (molecular weight) in grams per mole — with a per-element breakdown showing count, atomic mass, subtotal and mass percent. Everything runs privately in your browser.

Molar mass is the sum of the standard atomic weights of every atom in the formula, in g/mol. Multiply each element's atomic mass by how many of those atoms appear, then add the totals. For example, H2O = 2×1.008 + 1×15.999 ≈ 18.02 g/mol.
Use element symbols, subscript counts and parentheses, e.g. Ca(OH)2 or CuSO4·5H2O.
Picks a formula to try instantly.
Molar mass
Formula
Distinct elements

How this molar mass calculator works

The molar mass of a substance is the mass of one mole of it, measured in grams per mole (g/mol). Because a mole always contains the same number of particles, the molar mass is simply the sum of the standard atomic weights of every atom written in the chemical formula. That same number is what chemists call the molecular weight or formula weight.

This tool reads your formula left to right. Each element symbol (one capital letter, optionally followed by lowercase letters) may be followed by a subscript count. A group in parentheses applies its trailing number to every atom inside, and groups can be nested. A centre dot (· or .) marks a hydrate, so the number before a fragment like 5H2O multiplies that whole fragment. The calculator then multiplies each element's atomic weight by its total count and adds the contributions.

Worked example: water is H2O. Hydrogen contributes 2 × 1.008 = 2.016 g/mol and oxygen contributes 1 × 15.999 = 15.999 g/mol. Adding them gives 18.015 g/mol, usually rounded to 18.02 g/mol. Hydrogen's mass percent is 2.016 ÷ 18.015 × 100 ≈ 11.19%.

Reference note: atomic masses use IUPAC standard atomic weights (conventional values), which represent natural isotopic abundance. Results are accurate to a few decimal places and are intended for education, not for analytical or regulatory work.

Frequently asked questions

What is molar mass?
Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). Numerically it equals the sum of the standard atomic weights of all the atoms in the chemical formula, so it is the molecular or formula weight of the substance.
How is molar mass calculated?
Multiply the standard atomic weight of each element by the number of atoms of that element in the formula, then add all the contributions. For water, H2O, that is 2 × 1.008 for hydrogen plus 1 × 15.999 for oxygen, giving about 18.02 g/mol.
What is the difference between molar mass and molecular weight?
They are numerically the same value. Molecular weight (or formula weight) is a relative, dimensionless number, while molar mass carries the unit grams per mole (g/mol). For everyday calculations you can treat them as identical.
How do I enter a formula with parentheses?
Write the group in parentheses followed by its multiplier, like Ca(OH)2 or Al2(SO4)3. The number after the closing parenthesis multiplies every atom inside the group. You can also nest groups and use a centre dot for hydrates, for example CuSO4·5H2O.
What units does molar mass use?
Molar mass is reported in grams per mole (g/mol). Atomic masses come from the IUPAC standard atomic weights, expressed in unified atomic mass units (u), and a value in u is numerically equal to the molar mass in g/mol.
How do I find the mass percent of an element?
Divide the total mass contributed by that element by the molar mass of the whole compound, then multiply by 100. This calculator shows the mass percent for every element automatically in the breakdown table.
⚡ Molar Mass Calculator — by larely ↗

Related tools

LCM and GCD Calculator

Find the least common multiple and greatest common divisor of any numbers.

Scientific Notation Converter

Convert numbers to and from scientific, E and engineering notation.

Slope Calculator

Find the slope, angle, distance and equation of a line from two points.

Speed, Distance & Time Calculator

Solve for speed, distance or time from the other two, in any units.

Density Calculator

Solve density = mass / volume for any of the three, with unit conversion.

Square Root Calculator

Find and simplify square roots, with perfect-square and radical form.

Exponent Calculator

Raise any base to any power, including negative and fractional exponents.

Prime Number Checker

Check if a number is prime and get its prime factorization.

Circle Calculator

Find a circle's radius, diameter, circumference and area from any one value.

Permutation & Combination Calculator

Calculate combinations and permutations for n and r.

Logarithm Calculator

Compute log of any base, plus log10, ln and log2, with change of base.

Factorial Calculator

Calculate n! exactly for any non-negative integer, including huge values.

Browse all 251 free tools →