Formula Parser · Instant Analysis

Chemical Formula Calculator

Enter any chemical formula to parse it into its constituent elements and compute the molecular weight. This chemical formula calculator handles standard molecular formulas, condensed formulas, parenthetical groups, bracket notation for coordination compounds, and nested structures up to 5 levels deep. Get instant element breakdowns, atom counts, and mass composition.

118
Elements recognized
5
Nesting levels
100%
Free forever
Molekulargewicht
Alle 118 Elemente · IUPAC 2021 Atomgewichte
Schnellbeispiele:
⚗️

Geben Sie oben eine Formel ein, um das Molekulargewicht zu berechnen

Real-Time Chemical Formula Analysis

Watch the formula get parsed and the molecular weight computed as you type.

The chemical formula calculator uses a recursive descent parser to analyze your input character by character. It identifies element symbols (one uppercase letter optionally followed by a lowercase letter), reads subscript numbers, and handles grouping symbols — parentheses (), brackets [], and braces {} — with proper nesting.

For complex formulas like K₄[Fe(CN)₆], the parser first resolves the innermost group (CN), multiplies by 6, adds Fe, then multiplies the entire bracket content by the outer context. The result: K:4, Fe:1, C:6, N:6 — producing a molecular weight of 368.35 g/mol.

Case sensitivity is critical: Co (cobalt, element 27) is different from CO (carbon monoxide, C + O). The parser strictly follows IUPAC element symbol conventions.

Formula Input

Element Symbols and Atomic Weights

Chemical formulas are built from element symbols — each with a unique atomic weight.

Chemical formulas use standardized element symbols: one or two letters, with the first always capitalized. Hydrogen is H, Carbon is C, Chlorine is Cl, Chromium is Cr. This convention prevents ambiguity — the parser distinguishes Co (cobalt) from CO (carbon + oxygen).

Each element symbol maps to a standard atomic weight from the IUPAC 2021 periodic table. These weights, combined with atom counts from the parsed formula, determine the total molecular weight of the compound.

Explore the element cards below to see common elements used in chemical formulas and their atomic weights.

Hydrogen · Nonmetal
1
H
Hydrogen
1.0080
Carbon · Nonmetal
6
C
Carbon
12.0110
Nitrogen · Nonmetal
7
N
Nitrogen
14.0070
Fluorine · Halogen
9
F
Fluorine
18.9984
Phosphorus · Nonmetal
15
P
Phosphorus
30.9738
Chlorine · Halogen
17
Cl
Chlorine
35.4530
Chromium · Transition Metal
24
Cr
Chromium
51.9961
Copper · Transition Metal
29
Cu
Copper
63.5460
Bromine · Halogen
35
Br
Bromine
79.9040
Iodine · Halogen
53
I
Iodine
126.9045
Mercury · Transition Metal
80
Hg
Mercury
200.5920
Bismuth · Post-Transition Metal
83
Bi
Bismuth
208.9804

How to Use the Chemical Formula Calculator

Enter, parse, and analyze any chemical formula in 3 steps.

Enter a Chemical Formula

Type the chemical formula exactly as it appears in chemical notation. Use uppercase for the first letter of each element symbol (Fe, not fe) and lowercase for the second letter if any (Mg, not MG). Subscripts are typed as regular numbers: H2O, C6H12O6, Ca(OH)2. The parser validates your formula in real time.

K₂Cr₂O₇
K × 2Cr × 2O × 7

Chemical Formula Examples

Click any compound to parse its formula and see the element breakdown.

Chemical Formula Calculator FAQ

Questions about chemical formula notation, parsing, and molecular weight calculation.

A chemical formula is a symbolic representation of a compound showing the types and numbers of atoms present.
The calculator uses a recursive descent parser that reads left-to-right, identifies element symbols (one uppercase + optional lowercase letter), reads subscript numbers, and handles parentheses/brackets by recursively parsing the inner content and multiplying atom counts by the outer subscript.
A molecular formula shows the actual number of each atom in one molecule — glucose is C₆H₁₂O₆.
Condensed formulas group atoms by functional groups: CH₃CH₂OH (ethanol), CH₃COOH (acetic acid), CH₃COCH₃ (acetone).
Yes.
For hydrates like CuSO₄·5H₂O, rewrite as a single formula: CuSO₄(H₂O)₅ or CuH₁₀SO₉.
Organic formulas typically list Carbon first, then Hydrogen, then other elements alphabetically (Hill system): C₆H₁₂O₆, C₈H₁₀N₄O₂.