Molecular Weight Calculator

Find the molecular weight of any compound by entering its chemical formula.

⚗️ Molecular Weight Calculator

Enter a chemical formula (e.g. H2O, NaCl, C6H12O6, CaCO3) to calculate its molecular weight.

Molecular Weight
g/mol
Formula Entered
Quick Reference - Common Elements
H - 1.008
C - 12.011
N - 14.007
O - 15.999
Na - 22.990
Mg - 24.305
Al - 26.982
S - 32.065
Cl - 35.453
K - 39.098
Ca - 40.078
Fe - 55.845
Cu - 63.546
Br - 79.904
Ag - 107.868
I - 126.904

⚗️ What is Molecular Weight?

Molecular weight - also called molar mass - is one of the most fundamental properties in chemistry. It is defined as the sum of the atomic masses of all atoms in a chemical formula, expressed in grams per mole (g/mol). In practice, knowing the molecular weight of a compound lets you convert between what you can physically measure (mass in grams, on a balance) and what matters chemically (moles, which count the number of molecules via Avogadro's number: 6.022 × 1023 entities per mole).

The concept of molar mass is indispensable in virtually every branch of chemistry. In analytical chemistry, it allows calculation of solution concentrations. In organic synthesis, it enables stoichiometric calculations to determine how much reactant to use and how much product to expect. In biochemistry, molecular weight determines how proteins and DNA fragments migrate in gel electrophoresis. In the pharmaceutical industry, it influences drug pharmacokinetics and dosing calculations.

Each element has a standard atomic weight - a weighted average of the masses of its naturally occurring isotopes. Carbon has two stable isotopes: carbon-12 (mass 12.000) and carbon-13 (mass 13.003). The standard atomic weight of carbon is 12.011, reflecting natural abundance of each isotope. This calculator uses IUPAC-recommended standard atomic weights for all 118 elements.

Molecular weight differs from empirical formula mass: molecular formula gives the exact number of atoms in one molecule, while empirical formula gives the simplest whole-number ratio. Glucose (C6H12O6) and formaldehyde (CH2O) share the same empirical formula but have very different molecular weights (180.16 vs 30.03 g/mol).

📐 Formula

MW = ∑ (ni × AMi)
MW = Molecular weight (g/mol)
ni = Number of atoms of element i in the formula
AMi = Standard atomic mass of element i (g/mol)
Example: Water (H2O) = (2 × 1.008) + (1 × 15.999) = 18.015 g/mol

📖 How to Use This Calculator

Steps

1
Enter the chemical formula - use standard notation: element symbol (capitalise first letter, lowercase second if applicable) followed by the atom count. Example: H2O, NaCl, C6H12O6, CaCO3.
2
Click Calculate - see the total molecular weight in g/mol and a breakdown by element showing each element's contribution to the total mass.
3
Use the result - apply the molecular weight for molarity calculations, stoichiometry, solution preparation, or percent composition.

💡 Example Calculations

Example 1 — Water (H2O)

Calculate the molecular weight of water

1
2 × H: 2 × 1.008 = 2.016 g/mol
2
1 × O: 1 × 15.999 = 15.999 g/mol
MW = 18.015 g/mol
Try this example →

Example 2 — Glucose (C6H12O6)

Calculate the molecular weight of glucose (to make a 1 M solution, dissolve this many grams per litre)

1
6 × C: 6 × 12.011 = 72.066 g/mol
2
12 × H: 12 × 1.008 = 12.096 g/mol
3
6 × O: 6 × 15.999 = 95.994 g/mol
MW = 180.156 g/mol
Try this example →

Example 3 — Sodium Chloride (NaCl)

Physiological saline: 0.9% (w/v) NaCl requires 9 g in 1 L = 0.154 mol/L

1
1 × Na: 1 × 22.990 = 22.990 g/mol
2
1 × Cl: 1 × 35.453 = 35.453 g/mol
MW = 58.443 g/mol
Try this example →

Frequently Asked Questions

What is molecular weight and why does it matter?+
Molecular weight (also called molar mass) is the sum of the atomic masses of all atoms in a molecule, expressed in grams per mole (g/mol). It is essential in chemistry because it is the conversion factor between the amount of a substance in grams (which you can weigh on a scale) and the number of moles (which relates directly to the number of molecules via Avogadro's number). Without knowing molecular weight, you cannot prepare solutions of a known molarity, balance stoichiometric calculations, or determine theoretical yields in reactions.
What is the difference between molecular weight and formula weight?+
Molecular weight technically refers to the mass of one molecule relative to 1/12 the mass of carbon-12, and is expressed in unified atomic mass units (u or Da). Formula weight is the same calculation applied to ionic compounds (like NaCl) that do not exist as discrete molecules but as lattice structures. In practice, both terms are used interchangeably and the value is numerically identical in g/mol. This calculator computes what is formally the formula weight for any chemical formula you enter.
How accurate are the atomic masses used in this calculator?+
The atomic masses used are the standard atomic weights recommended by IUPAC, accurate to at least 3 decimal places for common elements. For most laboratory and classroom purposes, these values give results accurate to 4 significant figures. Extremely high-precision applications (isotope ratio mass spectrometry, for example) require specific isotope masses rather than standard atomic weights.
Does this calculator handle parentheses or hydrates?+
This version of the calculator supports simple formulas without parentheses - for example H2O, NaCl, C6H12O6, CaCO3. For compounds with parentheses like Ca(OH)2 or hydrates like CuSO4·5H2O, expand the formula manually first: Ca(OH)2 becomes CaO2H2, and CuSO4·5H2O becomes CuSO4 plus 5×H2O = CuS1O9H10.
What elements are supported?+
This calculator supports the 29 most common elements encountered in chemistry: H, He, Li, Be, B, C, N, O, F, Ne, Na, Mg, Al, Si, P, S, Cl, Ar, K, Ca, Fe, Cu, Zn, Br, Ag, I, Au, Hg, and more. If you enter an unrecognised element symbol, the calculator will display an error. For full periodic table coverage, look up the atomic mass and sum manually.
What is the difference between molecular weight and molar mass?+
Molecular weight (MW) is the mass of a single molecule expressed in atomic mass units (amu or Da). Molar mass is the mass of one mole (6.022 x 10^23 molecules) of a substance, expressed in g/mol. Numerically, they are equal: water (H2O) has MW = 18.015 amu and molar mass = 18.015 g/mol. The distinction is that molecular weight is used for individual molecules while molar mass is used for macroscopic quantities in lab calculations.
How do you calculate the molecular weight of a compound?+
Sum the atomic weights of all atoms in the molecule. Atomic weights are found on the periodic table. Example: molecular weight of glucose (C6H12O6): Carbon = 6 x 12.011 = 72.066. Hydrogen = 12 x 1.008 = 12.096. Oxygen = 6 x 15.999 = 95.994. Total MW = 72.066 + 12.096 + 95.994 = 180.156 g/mol. This is why a glucose solution with 180.156 g dissolved in 1 litre of solution has a molarity of exactly 1M.
What is Avogadro's number and how does it relate to molar mass?+
Avogadro's number (Nₐ = 6.02214076 × 10²³) is the number of particles (atoms, molecules, or ions) in one mole. Molar mass bridges the atomic scale and the macroscopic laboratory scale: it is the mass in grams that contains exactly Nₐ particles. If a molecule has a molecular weight of 18.015 amu, then 18.015 grams of that substance contains 6.022 × 10²³ molecules. This allows chemists to count atoms by weighing substances - a fundamental operation in all quantitative chemistry.
How do you calculate molecular weight from an empirical formula?+
An empirical formula gives the simplest whole-number ratio of elements. To find molecular weight, calculate the empirical formula weight (sum of atomic masses x subscripts). Then divide the actual molecular weight by the empirical formula weight to find n, and multiply all subscripts by n to get the molecular formula. Example: empirical CH2O (30 g/mol), actual MW = 180 g/mol, so n = 6, giving C6H12O6 (glucose).