Molecular Weight Calculator
Molar mass: 18.015 g/mol
- Formula
- H2O
- Molar mass
- 18.015 g/mol
- Total atoms
- 3
Element composition
- H (Hydrogen)
- 2 × 1.008 = 2.016 g/mol (11.19%)
- O (Oxygen)
- 1 × 15.999 = 15.999 g/mol (88.81%)
Element composition by mass
- H (Hydrogen)2.0211.2%
- O (Oxygen)1688.8%
What this calculator does
The Molecular Weight Calculator reads a simple chemical formula and returns its molar mass in grams per mole. It also lists each element in the formula, the number of atoms of that element, its atomic weight, its mass subtotal, and its percentage of the total mass.
The calculation uses abridged standard atomic weights published by IUPAC, with uncertainty ignored. Molecular weight, molar mass, and relative molecular mass are often used interchangeably, although they have slightly different formal definitions. For practical stoichiometry, the value in grams per mole is what matters.
How to use this calculator
- Enter a chemical formula such as H2O, NaCl, or C6H12O6. Element symbols are case-sensitive: the first letter is uppercase and the second letter, when present, is lowercase.
- Alternatively, choose a common chemical from the selector to fill the formula.
- Click Calculate.
- Review the molar mass and the element composition table.
The default formula is H2O, water. Its molar mass is 18.015 g/mol, made up of 2 hydrogen atoms at 1.008 g/mol each and 1 oxygen atom at 15.999 g/mol. Sodium chloride, NaCl, gives 58.44 g/mol, and glucose, C6H12O6, gives 180.156 g/mol.
Formulas
For a formula containing elements E₁, E₂, and so on, the molar mass is the sum of each element's atomic weight multiplied by its atom count:
molar mass = Σ (atomic weight × atom count)
For water:
H: 2 × 1.008 = 2.016
O: 1 × 15.999 = 15.999
Total = 18.015 g/mol
The mass percentage of an element is its subtotal divided by the total molar mass, multiplied by 100.
What the results mean
The headline result is the molar mass in grams per mole. The composition table shows how much of that mass comes from each element. For H2O, hydrogen contributes about 11.19% of the mass and oxygen contributes about 88.81%, even though hydrogen accounts for two of the three atoms. This difference occurs because oxygen atoms are much heavier than hydrogen atoms.
The total atom count is also shown. It is the sum of all atom counts in the formula and is useful for checking that the formula was parsed as intended.
Assumptions and limitations
- Only simple formulas are supported. Parentheses, brackets, dots, and hydrates such as Ca(OH)2 or CuSO4·5H2O are rejected rather than guessed.
- Formula parsing is case-sensitive. "Co" is cobalt, while "CO" is carbon monoxide.
- Abridged standard atomic weights are used. Results may differ slightly from isotope-specific masses or full uncertainty budgets.
- The calculator does not determine molecular structure, bond order, charge, or whether a formula is stable.
- Counts must be positive whole numbers without leading zeros; counts above 10,000 are rejected.
- Unknown symbols produce an error instead of a partial result.
- The result is a molar mass in grams per mole, not a molecular mass in daltons for a specific isotope.
Frequently asked questions
How do I calculate the molecular weight of water?
Add the atomic weights of two hydrogen atoms and one oxygen atom: 2 × 1.008 + 15.999 = 18.015 g/mol.
Why is the formula case-sensitive?
Chemical symbols use capitalization to distinguish elements. Co is cobalt, CO is carbon monoxide, and co is not a valid element symbol. The calculator rejects lowercase element starts so that ambiguous input is not silently misread.
Can I enter Ca(OH)2?
Not in this version. Parentheses, brackets, and hydrate dots are not supported. For a formula with parentheses, expand the counts manually or use a calculator that supports group notation.
Why do the mass percentages not always add up to exactly 100%?
Each percentage is rounded for display, so the visible values can total slightly above or below 100% even though the full-precision calculation is consistent.
Reference tables
Worked example: water (H₂O)
| Atom | Count | Atomic Weight (g/mol) | Mass Subtotal (g/mol) |
|---|---|---|---|
| H | 2 | 1.008 | 2.016 |
| O | 1 | 15.999 | 15.999 |
| Total | 3 | — | 18.015 |
Common elements
Atomic weights are abridged standard atomic weights. Density and phase refer to the element at room temperature and pressure; values vary with allotrope and conditions.
| Atomic Number | Symbol | Name | Atomic Weight (g/mol) | Density (g/cm³) | Phase at Room Temp. |
|---|---|---|---|---|---|
| 1 | H | Hydrogen | 1.008 | 0.00009 | Gas |
| 6 | C | Carbon | 12.011 | 2.267 | Solid |
| 7 | N | Nitrogen | 14.007 | 0.00125 | Gas |
| 8 | O | Oxygen | 15.999 | 0.00143 | Gas |
| 11 | Na | Sodium | 22.990 | 0.971 | Solid |
| 12 | Mg | Magnesium | 24.305 | 1.738 | Solid |
| 13 | Al | Aluminum | 26.982 | 2.70 | Solid |
| 14 | Si | Silicon | 28.085 | 2.329 | Solid |
| 15 | P | Phosphorus | 30.974 | 1.823 | Solid |
| 16 | S | Sulfur | 32.06 | 2.07 | Solid |
| 17 | Cl | Chlorine | 35.45 | 0.00321 | Gas |
| 19 | K | Potassium | 39.098 | 0.862 | Solid |
| 20 | Ca | Calcium | 40.078 | 1.55 | Solid |
| 26 | Fe | Iron | 55.845 | 7.874 | Solid |
| 29 | Cu | Copper | 63.546 | 8.96 | Solid |
| 30 | Zn | Zinc | 65.38 | 7.134 | Solid |
| 47 | Ag | Silver | 107.868 | 10.49 | Solid |
| 79 | Au | Gold | 196.967 | 19.32 | Solid |
Source
Reference: Calculator.net — Molecular Weight Calculator. Atomic weights are abridged standard atomic weights published by IUPAC.
Disclaimer
This calculator is intended for education and routine chemistry calculations. It does not replace a validated chemical database, a laboratory information system, or professional judgment about chemical identity and safety.