🔬 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(用點號連線)