Molecular Weight Calculator

Compute molecular weight from any chemical formula.

Science Any formula g/mol Mass <-> mol
Rate this calculator · 3.0 (1)

Molecular Weight Calculator

Formula parser - g/mol - mass/moles/N

Instructions — Molecular Weight Calculator

Type any chemical formula. The parser supports nested parentheses, like Ca(OH)2 or (NH4)2SO4.

  1. Enter the formula with proper case: element symbols start uppercase (H, C, Na, Cu). Numbers after a symbol are subscripts.
  2. Optional quantity: type a number and pick the unit (grams, moles, or particles). The calculator converts to the other two units using molecular weight and Avogadro's constant N_A = 6.022 × 10^23.

For hydrates, expand the formula: CuSO4·5H2O becomes CuSO4(H2O)5 in this parser.

Formulas

Molecular weight (numerically identical to molar mass):

$$ M = \sum_{i} A_i \cdot n_i $$

where A_i is the standard atomic weight and n_i is the count of element i.

Moles from mass:

$$ n = \frac{m}{M} $$

Particles from moles (Avogadro's constant N_A = 6.02214076 × 10^23 mol^-1):

$$ N = n \cdot N_A $$

Particles from mass:

$$ N = \frac{m \cdot N_A}{M} $$

One mole of any substance contains N_A particles, whatever the chemical identity.

Reference

Common molecules:

SubstanceFormulaMW (g/mol)
WaterH2O18.015
Carbon dioxideCO244.009
MethaneCH416.043
GlucoseC6H12O6180.156
SucroseC12H22O11342.30
AspirinC9H8O4180.158
CaffeineC8H10N4O2194.19
CholesterolC27H46O386.65
Penicillin GC16H18N2O4S334.39
Hemoglobin (approx)--~64,500

Article — Molecular Weight Calculator

Molecular Weight Calculator: Atomic Sum and Mass-Mole-Particle Conversions

Molecular weight is the mass of one mole of a substance in grams per mole, or equivalently the mass of a single molecule in daltons. It equals the sum of atomic weights of every atom in the molecule. Water is 18.015 g/mol, aspirin 180.16 g/mol, caffeine 194.19 g/mol. The calculator parses any chemical formula and returns molecular weight plus the conversions between grams, moles, and number of particles.

Molecular weight is the single number you reach for most often in chemistry. Solution preparation, dosing, combustion engineering, biochemistry binding studies, every quantitative calculation begins with a molecular-weight lookup.

What molecular weight measures

Atomic weights have been tabulated since the early 1800s. Molecular weight is the natural extension: add up the atomic weights of every atom in the molecule, with proper multiplicities. The result tells you how much one mole (6.02 × 10^23 molecules) of that substance weighs.

A useful mental check: hydrogen weighs about 1 unit, oxygen 16, carbon 12. Water (H2O) is 1 + 1 + 16 = 18. CO2 is 12 + 16 + 16 = 44. Round atomic weights make excellent approximations; the calculator uses the more precise IUPAC 2021 values.

How to calculate molecular weight

Worked examples
H2O 2(1.008) + 15.999 = 18.015
NaCl 22.990 + 35.45 = 58.44
C6H12O6 6(12.011) + 12(1.008) + 6(15.999) = 180.156
Ca(OH)2 40.078 + 2(15.999) + 2(1.008) = 74.09

The parser handles nested parentheses. (NH4)2SO4 expands to 2 nitrogens + 8 hydrogens + 1 sulfur + 4 oxygens: 2(14.007) + 8(1.008) + 32.06 + 4(15.999) = 132.14 g/mol. Hydrates use a center dot; rewrite as a single formula: CuSO4·5H2O becomes CuSO4(H2O)5 = 249.69 g/mol.

Molecular weight versus molar mass

In practice the two terms mean the same thing. Strictly, molecular weight (relative molecular mass M_r) is a unitless ratio of average molecule mass to 1/12 of a carbon-12 atom, while molar mass (M) is in grams per mole. Numerically they are identical: water has M_r = 18.015 and M = 18.015 g/mol.

Biochemists often use daltons (Da) instead of g/mol; 1 Da = 1 g/mol. A 50 kDa protein has a molar mass of 50,000 g/mol. Pick whichever notation matches your audience.

Did you know

The atomic-mass unit (u or Da) was defined relative to oxygen-16 until 1961. Physicists and chemists used slightly different conventions, with the chemists' value 0.027% larger. Adoption of carbon-12 as the new standard unified the two systems and changed every entry in the periodic table by about 0.003 percent.

Molecular weight and Avogadro's number

Avogadro's constant N_A = 6.02214076 × 10^23 mol^-1, defined as an exact value since the 2019 SI redefinition. One mole contains N_A particles, and one mole of a substance weighs its molecular weight in grams. The three conversions follow:

FromToFormula
gramsmolesn = m / M
molesparticlesN = n · N_A
gramsparticlesN = m N_A / M
particlesgramsm = N M / N_A

Examples: 18.015 g of water = 1 mol = 6.022 × 10^23 water molecules. One molecule of water weighs 18.015 / 6.022 × 10^23 = 2.99 × 10^-23 g.

Molecular weight of proteins and polymers

For biomolecules and polymers, atom counting is impractical. Mass spectrometry measures molecular weight directly by ionizing the molecule and timing its flight through a magnetic field. Typical proteins are 10-100 kDa; hemoglobin (4 subunits, each about 16 kDa) is 64.5 kDa; large molecular machines like ribosomes reach 2.5 MDa.

Polymers have a distribution of molecular weights, not a single value. The number-average M_n and weight-average M_w report different statistical means. Their ratio (polydispersity index, M_w / M_n) measures the breadth of the distribution. A monodisperse sample has PDI = 1; commercial polyethylene runs 2-10.

Common molecular weights

  • H2O: 18.015 g/mol
  • CO2: 44.01 g/mol
  • O2: 32.00 g/mol
  • NaCl: 58.44 g/mol
  • Glucose (C6H12O6): 180.16 g/mol
  • Sucrose (C12H22O11): 342.30 g/mol
  • Aspirin (C9H8O4): 180.16 g/mol
  • Caffeine (C8H10N4O2): 194.19 g/mol
  • Cholesterol (C27H46O): 386.65 g/mol
  • Penicillin G: 334.39 g/mol
  • Insulin (51 amino acids): 5807 g/mol
  • Hemoglobin (4 subunits): ~64,500 g/mol

Where molecular weight matters

Pharmacology. Drug dosing typically uses mg of compound, but receptor binding is described in nM molar concentration at the receptor. Translating one to the other (and back) requires molecular weight at every step. A 100 mg aspirin tablet contains 100 / 180.16 = 0.555 mmol of acetylsalicylic acid; in a 5-L blood volume, that gives a peak plasma concentration around 100 micromolar, well above the receptor affinity. Every pharmacokinetics calculation starts here.

Combustion. Burning 1 g of methane (CH4, MW 16.04) produces 1 / 16.04 mol = 0.0623 mol of CO2 (MW 44.01) = 2.74 g of CO2. The 2.74:1 ratio is what climate accounting tracks. Burning 1 kg of gasoline (about C8H18, MW 114.23) produces 3.09 kg of CO2 by the same logic. Vehicle emission standards convert between fuel mass and CO2 mass using molecular weight.

Forensic toxicology. Identifying unknown compounds in seized samples relies on mass-spec molecular weight matching against database entries. A few seconds of analysis time on an LC-MS instrument can reduce candidate compounds from millions to a short list, simply by matching the measured molecular weight to a few decimal places against PubChem entries.

Polymer chemistry. Polyethylene's tensile strength, melting point, and processability all depend on molecular weight. Ultra-high molecular weight polyethylene (UHMWPE) used in bulletproof vests has molecular weights of 3 to 6 million g/mol. Low-density polyethylene used in plastic bags is 50,000 to 250,000 g/mol. The chemistry is the same; the molecular weight is the entire engineering distinction.

Molecular weight mistakes

Don't forget the subscript

The 12 in C6H12O6 is not optional. Skipping a subscript (treating C6H12O6 as C+H+O) gives 29 g/mol instead of 180.16, a factor of 6 error. Every digit matters; double-check by counting atoms before computing.

Other regular slips: confusing atomic with molecular weight for diatomic elements (oxygen atom is 16 g/mol, O2 is 32), forgetting parentheses in Ca(OH)2 (should be 74, not 57), using integer rather than tabulated atomic weights (Cl = 35.45, not 35), and ignoring water of crystallization in hydrates.

Tip

Standard atomic weights are weighted averages over natural isotope abundances. For most chemistry the average is exactly what you want. For mass spectrometry, isotope-resolved peaks require the monoisotopic mass (using the most abundant isotope of each element), which differs from the average atomic mass by about 0.5 g/mol for typical organic molecules.

FAQ

Molecular weight (also called molar mass or relative molecular mass M_r) is the mass of one mole of a molecule, expressed in g/mol. It equals the sum of the atomic weights of every atom in the molecule. Water (H2O) is 18.015 g/mol; aspirin (C9H8O4) is 180.16 g/mol.
In modern usage, yes. Strictly, molecular weight (M_r) is a dimensionless ratio relative to 1/12 of carbon-12, while molar mass (M) is in g/mol; numerically they are equal. Most textbooks and software use the two terms interchangeably.
Look up the atomic weight of each element, multiply by the number of atoms of that element in the formula, and sum. For glucose C6H12O6: 6(12.011) + 12(1.008) + 6(15.999) = 180.156 g/mol.
Avogadro's constant N_A = 6.02214076 × 10^23 mol^-1 (exact since 2019). One mole of any substance contains N_A particles and weighs the molecular weight in grams. So 180.16 g of glucose contains 6.022 × 10^23 glucose molecules.
For large biomolecules, atom counting is impractical; instead, mass spectrometry gives the molecular weight directly. Typical proteins range from 10,000 to 100,000 g/mol (10 to 100 kDa). Hemoglobin is about 64,500 g/mol; ribosomes are 2.5 million g/mol.
g/mol is standard for chemistry. Biochemists also use daltons (Da), where 1 Da = 1 g/mol. Proteins are often reported in kilodaltons (kDa = 1000 g/mol). The number is the same; only the label differs.
Yes for individual molecules, but tabulated molecular weights use the natural isotope average. H2O is 18.015 g/mol for normal water; heavy water D2O (deuterium oxide) is 20.03 g/mol. The calculator uses standard atomic weights for natural-abundance mixtures.
Synthetic polymers like ultra-high molecular weight polyethylene (UHMWPE) reach 3-6 million g/mol. The largest single-molecule structures (DNA chromosomes) reach billions of g/mol. Atomic-weight tables only cover individual elements; complex molecules are derived from those.