Molecular Weight Calculator

Molecular Weight Calculator

Popular AI Skill PRO

Enter Calculation

Use element symbols with optional counts, e.g. H2O, AgS2O3, Na3AsO16H24. Parentheses and hydrate dots are not supported.

Formula

MW=∑ini·Aifrom Molecular Formula\text{MW} = \sum_{i} n_i \cdot A_i \quad \text{from } \text{Molecular Formula}
Usage stats

Advertisement

Results

Molecular Weight
18.0153
g/mol
# Element Symbol Atomic Wt (g/mol) Count Contribution (g/mol)
1 Hydrogen H 1.00794 2 2.0159
8 Oxygen O 15.9994 1 15.9994

Report an error on this page

What is the Molecular Weight Calculator?

This tool computes the molecular weight (also called formula weight or molar mass) of a chemical compound directly from its molecular formula. Enter a formula such as H2O, AgS2O3, or Na3AsO16H24 and it returns the total mass in grams per mole (g/mol), along with a breakdown showing each element's atomic number, name, standard atomic weight, atom count, and contribution to the total.

How to use it

Type a formula as a flat list of element symbols with optional counts. Each symbol is one uppercase letter optionally followed by one lowercase letter (the IUPAC atomic symbol), optionally followed by an integer count. Omitting the count means one atom, so CO2 is one carbon and two oxygens. Case matters: CO means carbon plus oxygen, while Co means cobalt. This baseline version does not support parentheses, brackets, or hydrate dot notation (for example Ca(OH)2 or CuSO4·5H2O must be expanded manually).

The formula explained

The calculator parses the string with the pattern ([A-Z][a-z]?)(\d*), looks up each element's standard atomic weight from a periodic table covering elements 1 to 118, multiplies that weight by the atom count, and sums every contribution: $$\text{MW} = \sum_{i} n_i \cdot A_i \quad \text{from } \text{Molecular Formula}$$ Atomic weights are already in g/mol (equivalently unified atomic mass units per molecule), so no unit conversion is needed.

Advertisement
Diagram showing molecular weight as the sum of each element's atomic weight times its atom count
Molecular weight is the sum of each element's atomic weight multiplied by how many atoms appear.

Worked example

For silver thiosulfate AgS2O3: Ag \(= 1 \times 107.8682 = 107.8682\); S \(= 2 \times 32.065 = 64.130\); O \(= 3 \times 15.9994 = 47.9982\). Total $$= 107.8682 + 64.130 + 47.9982 = 219.9964 \text{ g/mol}.$$ For water H2O: $$2 \times 1.00794 + 15.9994 = 18.01528 \text{ g/mol}.$$

Per-element contribution breakdown bar for a water molecule
Each element's contribution to the total weight, shown as a proportional breakdown.

Standard Atomic Weights of Common Elements

The calculator sums the atomic weight of each element multiplied by its count in the formula. The table lists conventional standard atomic weights (IUPAC-based, in g/mol) for common elements. Newer IUPAC revisions or other data sources may differ in the last decimal places, so small differences from other tables are normal.

Atomic number Symbol Name Standard atomic weight (g/mol)
1 H Hydrogen 1.00794
6 C Carbon 12.0107
7 N Nitrogen 14.0067
8 O Oxygen 15.9994
11 Na Sodium 22.98977
12 Mg Magnesium 24.3050
13 Al Aluminium 26.98154
14 Si Silicon 28.0855
15 P Phosphorus 30.97376
16 S Sulfur 32.065
17 Cl Chlorine 35.453
19 K Potassium 39.0983
20 Ca Calcium 40.078
26 Fe Iron 55.845
29 Cu Copper 63.546
30 Zn Zinc 65.38
47 Ag Silver 107.8682
79 Au Gold 196.96655

Example: for water, \(\text{H}_2\text{O}\), the weight is \(2 \times 1.00794 + 1 \times 15.9994 = 18.01528\) g/mol.

Advertisement

Key Terms: Molecular Weight, Formula Weight, Molar Mass

  • Atomic weight: the average mass of an element's atoms, weighted by the natural abundance of its isotopes, relative to 1/12 of the mass of a carbon-12 atom. It is dimensionless in principle but is usually quoted in u or g/mol.
  • Atomic mass unit (u, or Da): exactly 1/12 of the mass of one carbon-12 atom, about 1.66054 × 10-27 kg. The dalton (Da) is another name for the same unit.
  • Molecular weight: the sum of the atomic weights of all atoms in one molecule, as given by its molecular formula (for example, 18.015 for H2O). It is expressed in u or Da, or as a relative (dimensionless) number.
  • Formula weight: the sum of atomic weights for the simplest formula unit of a substance. It is the proper term for ionic and network compounds such as NaCl or CaCO3, which have no discrete molecules.
  • Mole: the SI amount of substance containing exactly 6.02214076 × 1023 elementary entities (the Avogadro constant).
  • Molar mass: the mass of one mole of a substance, in g/mol. Numerically it equals the molecular or formula weight in u, so 18.015 u for water corresponds to 18.015 g/mol.

In practice, the three terms (molecular weight, formula weight, molar mass) give the same number. They differ in units and in the kind of entity they describe, and this calculator reports the result in g/mol.

FAQ

What units is the result in? Grams per mole (g/mol), the standard unit for molar mass.

Can I enter parentheses or hydrates? Not in this version. Expand groups by hand, e.g. write Ca(OH)2 as CaO2H2.

Why does my formula show an error? Likely an unrecognized symbol, a lowercase-led token, or stray characters. Symbols must be exactly uppercase plus an optional lowercase letter from the periodic table.

Last updated:

Most popular in Chemistry

View all Chemistry calculators