Skip to content

Molar Mass Calculator

Enter a chemical formula to calculate its molar mass in g/mol. The calculator counts atoms, applies the 2024 CIAAW atomic-weight values, and shows how much each element contributes to the total.

Free chemistry calculator

Molar mass and molecular weight calculator

Enter a chemical formula to calculate its molecular weight and molar mass in grams per mole. The result shows every element's contribution.

Use correctly capitalized element symbols. Parentheses, square brackets, nested groups, and hydrate dots are supported.

Try an example

H2O

Molar mass

18.015 g/mol

Element breakdown

Element contributions for H2O
ElementCountWeight usedContributionMass %
HHydrogen21.00802.016 g/mol11.19%
OOxygen115.99915.999 g/mol88.81%

Element-by-element sum

2 × 1.0080+1 × 15.999=18.015 g/mol

The calculator sums the listed values without intermediate rounding. Displayed values are rounded to at most 5 decimal places.

Atomic-weight data

Standard values are central values from CIAAW Abridged Standard Atomic Weights 2024. Natural isotope variation can change a real sample's molar mass.

Open the CIAAW 2024 standard atomic-weight table

Elements without a standard atomic weight use a representative mass number from CIAAW's radioactive-elements table. Brackets mark these estimates.

Open the CIAAW radioactive-elements table

Molar mass and molecular weight are related, but not identical

Molar mass is the mass of one mole of a substance and uses units of grams per mole. Relative molecular mass, often called molecular weight, is a ratio and has no unit.

The two values are numerically the same when both use the same atomic-weight data. Keep the unit attached only to molar mass. For salts and other substances without discrete molecules, "relative formula mass" is more precise than "molecular weight."

TermMeaningUnit
Molar mass, MMass of one moleg/mol
Relative molecular mass, MrMolecular mass relative to 1/12 of a carbon-12 atomNone
Relative formula massThe same relative sum for an ionic or formula unitNone

Formula syntax accepted by the calculator

NotationExampleHow it is read
Element subscriptH2O2 H atoms and 1 O atom
ParenthesesCa(OH)2Multiply both O and H by 2
Square brackets and nestingK4[Fe(CN)6]Multiply the CN group by 6 inside the bracketed group
Hydrate dotCuSO4·5H2OAdd 5 water units to one CuSO4 unit

Element symbols are case-sensitive. Co is cobalt, while CO means one carbon and one oxygen. You may use either · or a plain period for a hydrate. This calculator reads a single formula; use the balancing equations calculator when you need reaction coefficients.

How molar mass is calculated

For each element, multiply its atom count by the atomic weight used by the calculator. Then add the contributions without rounding intermediate values:

M = Σ(atom count × atomic weight)

Worked example: water, H2O

Water contains 2 hydrogen atoms and 1 oxygen atom:

M(H2O) = 2 × 1.0080 + 1 × 15.999 = 18.015 g/mol

The corresponding relative molecular mass is 18.015 with no unit.

Worked example: copper sulfate pentahydrate, CuSO4·5H2O

The hydrate coefficient adds 5 water units. The complete count is Cu1 S1 O9 H10:

M = 1 × 63.546 + 1 × 32.06 + 9 × 15.999 + 10 × 1.0080

M = 249.677 g/mol

For solution preparation after you know the formula mass, use the dilution calculator for C1V1 = C2V2 calculations.

Atomic-weight source and accuracy

The calculator uses central values from CIAAW Abridged Standard Atomic Weights 2024 (opens in a new tab). CIAAW notes that standard atomic weights can vary with the isotopic composition of normal materials. A natural sample can therefore differ slightly from the displayed value.

Radioactive elements without a standard atomic weight use a representative mass number from the CIAAW radioactive-elements table (opens in a new tab). The result table marks those values with square brackets. They are estimates for a selected isotope, not standard atomic weights.

Use the result for teaching, stoichiometry checks, and routine calculations. It is not a substitute for an isotope-specific mass, a certificate of analysis, or an experimental measurement.

Common formula and interpretation traps

  • Do not change capitalization. NaCl is valid; NACL is not.
  • Put a subscript after the element or closed group it multiplies. A zero or negative subscript is invalid.
  • Keep the hydrate coefficient after the dot. In CuSO4·5H2O, the 5 multiplies the whole water unit.
  • Do not attach g/mol to relative molecular mass or molecular weight. Those relative values are dimensionless.
  • Do not use a formula-mass calculation to balance a reaction. Use the equation balancer first.

FAQ

How do I calculate molar mass from a chemical formula?

Count each element in the formula, multiply each count by that element's atomic weight, and add the contributions. The final molar mass uses g/mol.

Is molecular weight the same as molar mass?

They are usually numerically equal when calculated from the same atomic weights, but they describe different quantities. Relative molecular mass or molecular weight has no unit; molar mass uses g/mol.

Does the calculator support parentheses, brackets, and hydrates?

Yes. It expands nested parentheses and square brackets, and it accepts hydrate separators written as · or . with coefficients such as the 5 in CuSO4·5H2O.

Why can the result differ from a textbook or laboratory value?

Textbooks may use rounded atomic weights or an older table. Natural isotope composition can also shift an actual sample's molar mass. This calculator uses CIAAW's 2024 abridged central values and does not model a specific sample.

How are radioactive elements handled?

An element with no standard atomic weight uses a representative mass number from CIAAW's radioactive-elements table. The calculator marks that number with brackets and treats the result as an estimate.

Related Guides