🔬 Molar Mass Calculator

Parse a chemical formula including brackets and nesting, and compute its molar mass using the atomic weights of all 118 elements.

📐 计算公式
Chemical formula molar mass (sum over the atomic-weight table): molar mass = Σ(atomic weight × count) in g/mol; total atoms = Σ counts. The parser supports nested brackets, hydrate dot segments (CuSO₄·5H₂O, where "." and "·" are equivalent) and omitted subscript 1, and rejects zero subscripts, zero coefficients, empty brackets and empty hydrate segments. The first segment may not carry a formula coefficient (2H2O is rejected; in a later hydrate segment such as 5H2O the 5 multiplies that segment). Validation: an empty formula clears the result; unknown elements, unrecognized characters or mismatched brackets return a specific error. There is no fixed grading; the per-element detail and atom count are shown together.
输入化学式自动解析元素并计算分子量,支持括号与嵌套,内置全部 118 种元素原子量。
常用:

📋 使用说明

语法规则

  • 元素符号首字母大写,如 O、Na、Fe
  • 数字表示该元素(或括号组)的原子个数,省略时默认为 1
  • 括号 () 可嵌套,如 Fe2(SO4)3 = 2Fe + 3S + 12O
  • 支持水合物写法,如 CuSO4.5H2O(用点号连接)