How it works
Enter a neutral chemical formula. The calculator parses element symbols, whole-number subscripts, nested groups, and hydrate coefficients, then sums the atomic-weight contribution of every atom.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
1-
?formula=Formula (e.g., H2O, C6H12O6)Text · Optional · Default: H2O
Outputs
1-
resultResultText · Primary output
result contains the calculator’s complete rendered result area, including its visible result cards, tables, charts, and messages.
Formula
Molar mass = Σ(atomic weight × atom count)
Parentheses, square brackets, and curly brackets are expanded before the sum. Hydrates may use a middle dot or period, such as CuSO4·5H2O.
Inputs
- Formula: Case-sensitive chemical notation, such as
H2O,Ca(OH)2,Al2(SO4)3, orCuSO4·5H2O.
Outputs
- Molar mass in grams per mole.
- Element count after all groups and coefficients are expanded.
Limits
- Uses conventional average atomic weights, not isotope-specific masses.
- Enter a neutral formula without charge notation.
- Subscripts and coefficients must be positive whole numbers.
Examples
H2O→ approximately 18.015 g/molCa(OH)2→ approximately 74.092 g/molAl2(SO4)3→ approximately 342.131 g/molCuSO4·5H2O→ approximately 249.677 g/mol