Molecular Weight Calculator
Molecular Weight18.015 g/mol
H x22.016 g/mol
O x115.999 g/mol
This molecular weight calculator parses a chemical formula and adds up the atomic weights of every atom it contains to give the molar mass in grams per mole. Type a formula such as H2O or C6H12O6 and it returns the total weight plus a per-element breakdown. It is a quick aid for stoichiometry, solution preparation, and lab bench calculations.
Formula
MW = Σ (atomic_weight × count)
- MW
- Molecular weight (molar mass) in grams per mole (g/mol)
- atomic_weight
- Standard atomic weight of each element from the periodic table
- count
- Number of atoms of that element in the formula (subscript)
How it works
- Enter a chemical formula using element symbols and counts, for example NaCl or C6H12O6 (capitalisation matters: Co is cobalt, CO is carbon plus oxygen).
- The parser reads each element symbol and its subscript, treating a missing subscript as one atom.
- Each element's standard atomic weight is multiplied by its count, and all contributions are summed to give the total molar mass in g/mol.
Worked example
Find the molecular weight of glucose, C6H12O6.
- Carbon: 6 × 12.011 = 72.066.
- Hydrogen: 12 × 1.008 = 12.096.
- Oxygen: 6 × 15.999 = 95.994.
- Sum: 72.066 + 12.096 + 95.994 = 180.156.
Molecular weight of C6H12O6 ≈ 180.156 g/mol.
Frequently asked questions
- What is the difference between molecular weight and molar mass?
- They are numerically the same value here. Molecular weight is a relative, unitless figure, while molar mass carries the unit grams per mole (g/mol); this calculator reports the number you can use directly as molar mass.
- How should I write the chemical formula?
- Use proper element symbols with an uppercase first letter and optional lowercase second letter, followed by a count for multiple atoms (for example H2O or CaCl2). Capitalisation is significant, so Co means cobalt while Co with a separate O is read differently.
- Does this calculator handle parentheses or hydrates?
- No. The parser reads a flat sequence of element symbols and counts, so expand groups yourself — write Ca(OH)2 as CaO2H2 — and it does not interpret dot notation for hydrates.
- Why does my formula return an "unknown element" error?
- The symbol you entered is not in the periodic table data, usually because of a typo or wrong capitalisation. Check that each element symbol is spelled and capitalised correctly.