Molecular Weight Calculator (Molar Mass)

Calculate molar mass from formulas such as H2O, CO2, NaCl, glucose, hydrates, and formulas with parentheses or brackets. Protein, DNA, and RNA sequence modes are available as secondary tools. Private by design: everything runs locally in your browser.

Input & Actions

Result

Awaiting input…

Tip: Press Ctrl/Cmd + K to focus the input. Press Ctrl/Cmd + Enter to re-run the last calculation.

Advertisement

Methodology and Data Sources

Atomic-weight source: average standard atomic weights aligned with IUPAC conventional values, with additional cross-checking against NIST chemistry references. Results are rounded for display and ignore stated atomic-weight uncertainty.

Mass type: chemical formula mode reports average molecular weight in Da/u and molar mass in g/mol. Protein, DNA, and RNA modes use average residue/base weights with one terminal water added for intact polymer ends. Monoisotopic sequence mass is not used in this version.

Supported syntax: element symbols, integer subscripts, nested parentheses, square brackets, braces, leading multipliers, hydrate dots such as CuSO4.5H2O or CuSO4·5H2O, and common names in the library. Charges, isotopic labels, dot decimals, and reaction equations are not supported.

Sources: IUPAC Periodic Table and NIST Chemistry WebBook. Last reviewed: June 24, 2026.

Worked Molecular Weight Examples

Water: H2O

Atom counts: H = 2, O = 1. Calculation: 2 x 1.0079 + 1 x 15.9994 = 18.0152 g/mol.

Glucose: C6H12O6

Atom counts: C = 6, H = 12, O = 6. Calculation: 6 x 12.0107 + 12 x 1.0079 + 6 x 15.9994 = 180.1554 g/mol.

Aluminum sulfate: Al2(SO4)3

The group (SO4)3 expands to S = 3 and O = 12. Atom counts: Al = 2, S = 3, O = 12. Calculation: 2 x 26.9815 + 3 x 32.065 + 12 x 15.9994 = 342.1508 g/mol.

Copper sulfate pentahydrate: CuSO4.5H2O

The hydrate part 5H2O adds H = 10 and O = 5 to CuSO4. Atom counts: Cu = 1, S = 1, O = 9, H = 10. Calculation: 63.546 + 32.065 + 9 x 15.9994 + 10 x 1.0079 = 249.6846 g/mol.

Reference Notes

Molecular weight vs molar mass

Molecular weight is the mass of one molecule in Da or u. Molar mass is the mass of one mole in g/mol. The numerical value is the same for the same formula.

Molecular mass vs formula mass

Formula mass is often used for ionic compounds such as NaCl. The calculation is still the sum of each element count multiplied by atomic weight.

Why g/mol and Da match

The dalton is defined from atomic-scale mass, while g/mol scales the same count by Avogadro's number. That makes the displayed number equivalent.

Average vs monoisotopic mass

Average mass uses natural isotope abundance and is common for formula molar mass. Monoisotopic mass uses the lightest common isotopes and is common in mass spectrometry.

Case sensitivity

Element symbols are case-sensitive: Co is cobalt, while CO is carbon monoxide. Use Na, not NA, for sodium.

How hydrates are calculated

A hydrate dot adds another formula unit. CuSO4.5H2O means one CuSO4 plus five waters.

Frequently Asked Questions

What is the difference between molecular weight and molar mass?

Molecular weight is the mass of one molecule in Da or u. Molar mass is the mass of one mole in g/mol. For the same formula, the numerical value is the same.

Is formula weight different from molecular mass?

Formula weight is commonly used for ionic compounds or empirical formulas. Molecular mass is used for discrete molecules. The calculator sums the atomic weights in the formula either way.

Why does capitalization matter?

Element symbols are case-sensitive. Co is cobalt, while CO is carbon monoxide. Na is sodium; NA is not valid.

Are hydrates supported?

Yes. Hydrate dot notation such as CuSO4.5H2O and CuSO4·5H2O is supported.

Are brackets supported?

Yes. Parentheses, square brackets, and braces are supported, including nested groups such as K4[Fe(CN)6] and [Co(NH3)6]Cl3.

How do I calculate glucose molecular weight?

Enter C6H12O6 or choose glucose from the library. The calculator counts 6 carbon, 12 hydrogen, and 6 oxygen atoms and sums the atomic-weight subtotals.

Why may results differ from PubChem or an SDS?

Sources may use different rounding, hydrate states, salts, isotopic labels, or monoisotopic mass. This page uses average atomic weights and ignores uncertainty.

Does the calculator use average or monoisotopic mass?

Chemical formula mode uses average standard atomic weights. Protein, DNA, and RNA modes use average residue weights.

Do charges affect mass?

Formal charges are ignored. Charge annotations do not change formula mass unless atoms or electrons are explicitly added or removed.

How are protein, DNA, and RNA sequence masses calculated?

The sequence modes sum average residue or base weights, add one terminal water for intact polymer ends, and report length, composition, assumptions, and ambiguity-code handling.

Explore more tools