Enter any chemical formula to find its molar mass, with a full element-by-element breakdown.
Enter a chemical formula and click Calculate
This free molecular weight calculator parses any chemical formula — from something as simple as H₂O to a complex formula with nested parentheses like Al₂(SO₄)₃ — and instantly computes its molar mass, with a full element-by-element breakdown showing exactly how each atom's contribution adds up.
Type a chemical formula using standard notation, and the calculator parses it character by character: identifying element symbols (one capital letter, optionally followed by a lowercase letter), reading any subscript numbers that follow, and correctly expanding parentheses groups by multiplying everything inside by the subscript that follows the closing parenthesis. Each element's count is then multiplied by its standard atomic weight from a built-in periodic table, and all the contributions are summed into the final molar mass in grams per mole.
Chemistry students calculating molar mass for stoichiometry and molarity problems, lab technicians preparing solutions who need a compound's molar mass, and anyone curious about the composition of a chemical formula. It's a formula-parsing calculation tool, not a chemical database — always verify unusual or hydrate formulas against a reliable reference.
The parsing and summation logic this calculator uses
Every element symbol starts with exactly one capital letter, optionally followed by one lowercase letter — the calculator reads formulas the same way a chemist does.
A number immediately following an element or a closing parenthesis multiplies that element's (or group's) atom count; no number means a count of exactly 1.
Groups in parentheses, like (SO4) in Al2(SO4)3, are resolved first and then scaled by their trailing subscript before being merged into the total atom count.
From typing a formula to reading the element breakdown
Type a formula like H2O, C6H12O6, or Ca(OH)2, using standard capitalization for element symbols.
The calculator parses every element and subscript in the formula, including nested parentheses.
See the total molar mass in g/mol, plus each element's individual atom count and mass contribution.
A simple formula and a formula with nested parentheses
A selection of frequently used elements from the built-in periodic table (standard atomic weights, g/mol)
| Element | Symbol | Atomic Weight |
|---|---|---|
| Hydrogen | H | 1.008 |
| Carbon | C | 12.011 |
| Nitrogen | N | 14.007 |
| Oxygen | O | 15.999 |
| Sodium | Na | 22.990 |
| Magnesium | Mg | 24.305 |
| Aluminum | Al | 26.982 |
| Sulfur | S | 32.06 |
| Chlorine | Cl | 35.45 |
| Potassium | K | 39.098 |
| Calcium | Ca | 40.078 |
| Iron | Fe | 55.845 |
| Copper | Cu | 63.546 |
| Zinc | Zn | 65.38 |
| Silver | Ag | 107.87 |
| Gold | Au | 196.97 |
This is a short reference list — the calculator itself includes standard atomic weights for all 118 known elements, so any valid formula can be calculated regardless of which elements it contains.
Where finding a compound's molar mass comes up
Solve molar mass problems and verify answers for any chemical formula.
Get the exact molar mass needed for a molarity or dilution calculation.
Find molar masses to convert between grams and moles in a reaction.
Quickly compare molar masses across different salts, hydrates, or isomers.
Double-check a molecular weight calculation before submitting coursework.
What this molecular weight calculator does well, and where it has boundaries
Get an accurate molar mass calculation
Summary: This molecular weight calculator parses any chemical formula, including nested parentheses, and computes its molar mass with a full element-by-element breakdown using a built-in 118-element periodic table — free, instant, and entirely client-side. Pair it with the Molarity Calculator for solution concentration work.
Common questions about calculating molecular weight
Official chemistry standards references to complement this calculator
Other measurement and chemistry tools