Chemistry · INTERACTIVE LAB
Molar mass calculator: formula and worked examples
Calculate molar mass from a chemical formula, with atom counts and worked examples for water, carbon dioxide and salts.
Before you start
Try H2O, CO2, NaCl, Ca(OH)2 or Al2(SO4)3. Parentheses and integer subscripts are supported.
- 01Inputs
- 02Model
- 03Check
What this model can do
Common elements listed in the tool only; approximate atomic masses. No isotopes, charges, hydrates, reaction balancing or leading coefficients.
How to calculate molar mass from a chemical formula
Add each element’s atomic molar mass multiplied by its atom count in the formula. The result is in g/mol. A subscript after parentheses multiplies every atom inside that group.
M = Σ (atom count × atomic molar mass)
| Case | Inputs or expansion | Explained result |
|---|---|---|
| C | 1 × 12.011 | 12.011 g/mol |
| H2O | 2 × 1.008 + 15.999 | 18.015 g/mol |
| CO2 | 12.011 + 2 × 15.999 | 44.009 g/mol |
| NaCl | 22.990 + 35.45 | 58.440 g/mol |
| Ca(OH)2 | 40.078 + 2 × 15.999 + 2 × 1.008 | 74.092 g/mol |
For carbon, C gives about 12.011 g/mol; CO2 also contains two oxygen atoms and has a different molar mass. Case matters: Co is cobalt, whereas CO is carbon monoxide. Type H2O with the digit 2, without spaces or a leading coefficient. Values are approximate: use your exercise’s supplied atomic masses if they differ.
How do mass and molar mass differ?
Sample mass m is measured in g. Molar mass M relates that mass to amount of substance n: n = m / M. For example, 36.030 g of water corresponds to 36.030 / 18.015 = 2 mol in this model. The tool expands a formula; it does not balance reactions or handle isotopes or hydrates.
CIAAW · Reference atomic weights; tool values rounded for exercises