Molar mass calculator — g/mol and mass percent from a chemical formula

Type a chemical formula, including brackets and hydrates, and the calculator gives the molar mass in g/mol with a table of each element's atoms, mass and mass percent, based on IUPAC standard atomic weights.

Live demo · real result from this tool
Use correct capitals (Co is cobalt, CO is carbon monoxide). Hydrates: ·, * or . before the water.
Molar mass249.677 g/mol
Atoms per formula unit
21
Elements
4

By element

SymbolElementAtomsAtomic weightMass (g/mol)Mass %
CuCopper163.54663.54625.45%
SSulfur132.0632.06012.84%
OOxygen915.999143.99157.67%
HHydrogen101.008010.0804.04%

Uses IUPAC CIAAW abridged standard atomic weights (five significant figures), the same values as the periodic table. Results are shown to three decimal places; the last digit is limited by the precision of the atomic weights.

Processed on your device — nothing is uploaded.

How to use the molar mass calculator

  1. Type the formula into Chemical formula, with correct capitals: NaCl, C6H12O6, Ca(OH)2.
  2. Use round, square or curly brackets for groups, such as K4[Fe(CN)6]. Subscript digits such as C₆H₁₂O₆ also work.
  3. For a hydrate, put ·, * or . before the water: CuSO4·5H2O.
  4. Read the Molar mass at the top, then the table: atoms, atomic weight, mass and mass percent for each element.

What it does and when to use it

Molar mass links what you weigh on a balance to the number of particles in a reaction. You need it to turn grams into moles, make a solution of a set concentration, find percent composition, or check a percentage yield. Adding up atomic weights by hand is slow and easy to get wrong with brackets and hydrates.

Look up a single element in the periodic table. To get the mole ratios for a reaction, balance it first with the chemical equation balancer. Constants such as the Avogadro constant are in the physical constants table.

How it works

The formula is read from left to right. Each element symbol is a capital letter with an optional lowercase letter, followed by an optional count. A group in brackets is multiplied by the number after it, and groups can be nested. A number at the very start of the formula, or after a hydrate dot, multiplies the part that follows.

Molar mass = Σ (atoms of each element × its atomic weight). Mass percent = element mass ÷ molar mass × 100. The total is shown to three decimal places, keeping trailing zeros (58.440 for NaCl), but the last digit is limited by the precision of the atomic weights. Everything runs in your browser.

Worked examples

Calcium hydroxide, Ca(OH)2. 40.078 + 2 × 15.999 + 2 × 1.0080 = 74.092 g/mol. By mass it is 54.09% calcium, 43.19% oxygen and 2.72% hydrogen.

Potassium ferrocyanide, K4[Fe(CN)6]. The (CN)6 group gives 6 carbon and 6 nitrogen atoms, 17 atoms in all. The molar mass is 368.345 g/mol, and nitrogen supplies 84.042 g/mol, or 22.82%.

Plutonium dioxide, PuO2. Plutonium is taken as [244], giving 275.998 g/mol, with a warning that Pu has no standard atomic weight.

Limits and tips

  • Charges and state symbols such as (aq) are not accepted here; type the neutral formula.
  • Isotopes such as deuterium (D) or ¹³C are not supported.
  • For a mixture, work out each compound separately.
  • Round your final answer to the number of significant figures your course expects.

Frequently asked questions

Where do the atomic weights come from?
From the IUPAC CIAAW table of abridged standard atomic weights (2024), which gives values to five significant figures, for example H 1.0080, O 15.999 and Cu 63.546. They are the same values as the site's periodic table.
How do I enter a hydrate?
Put a middle dot (·), an asterisk or a full stop before the water, as in CuSO4·5H2O or CuSO4*5H2O. The number in front of H2O multiplies the water, so copper(II) sulfate pentahydrate gives 249.677 g/mol.
Why does it say my formula has an error?
Capitals matter. Co is cobalt, but CO is carbon plus oxygen, and "co2" is rejected because element symbols start with a capital letter. The message gives the position of the problem character.
What about elements with no stable isotopes?
Elements such as plutonium have no standard atomic weight. The calculator uses the mass number of the longest-lived isotope, shown in brackets as [244], and warns that the result is approximate.
Is molar mass the same as molecular weight?
They have the same number. Molar mass is in grams per mole (g/mol); relative molecular mass has no unit. Use the molar mass to convert between grams and moles, moles = mass ÷ molar mass.

Sources

  1. Abridged Standard Atomic Weights — IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), accessed 2026-10-08

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close