Skip to main content
Skip to calculator
Advertisement

Last updated: July 3, 2026

Molecular Weight Calculator

Quick Answer

Molecular weight is calculated by summing each element's atom count multiplied by its atomic weight. The result is numerically equal to molar mass in g/mol and can be used for n = mass / MW and mass = n × MW conversions.

Molecular weight equals the sum of each atom count times its atomic weight. For water, two hydrogens and one oxygen give 18.015 grams per mole.

Key Takeaways

  • Molecular weight equals the sum of atom count times atomic weight for every element in a formula.
  • The numerical value in amu per molecule is the same as molar mass in g/mol.
  • Use n = mass / MW to convert grams of a compound into moles.
  • Use mass = moles × MW to plan how many grams to weigh.
  • Correct subscripts, parentheses, hydrates, and isotope choices are essential for accurate results.
Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

MW = Σ(n_i × A_i); moles = mass / MW; mass = moles × MW

Where:

  • MW=Molecular weight or molar mass of the compound(g/mol)
  • n_i=Number of atoms of element i in the formula(atoms)
  • A_i=Atomic weight of element i(g/mol)
  • n=Amount of substance(mol)
  • m=Sample mass(g)
Molecular Weight from Elemental ContributionsAtom counts from a chemical formula are multiplied by atomic weights. The contributions are added to obtain molecular weight in grams per mole, which converts mass to moles.Molecular Weight = Sum of Atom ContributionsHydrogen2 × 1.008= 2.016 g/molOxygen1 × 15.999= 15.999 g/molFormula unitH₂O3 atoms total+MW = Σ(nᵢ × Aᵢ)2.016 + 15.999 = 18.015 g/molmoles = mass ÷ MWmass = moles × MW
Molecular Weight Calculator — atom counts multiplied by atomic weights, summed to g/mol

Worked Examples

Water (H2O)

Two hydrogen atoms and one oxygen atom give the molecular weight of water.

  1. 1Hydrogen contribution: 2 × 1.008 = 2.016 g/mol.
  2. 2Oxygen contribution: 1 × 15.999 = 15.999 g/mol.
  3. 3Add contributions: 2.016 + 15.999 = 18.015 g/mol.
  4. 4For 36.03 g water: n = 36.03 ÷ 18.015 = 2 mol.
Final Answer: 18.015 g/mol

Glucose (C6H12O6)

Compute the formula mass of glucose from carbon, hydrogen, and oxygen.

  1. 1Carbon contribution: 6 × 12.011 = 72.066 g/mol.
  2. 2Hydrogen contribution: 12 × 1.008 = 12.096 g/mol.
  3. 3Oxygen contribution: 6 × 15.999 = 95.994 g/mol.
  4. 4Total molecular weight = 72.066 + 12.096 + 95.994 = 180.156 g/mol.
Final Answer: 180.156 g/mol

Carbon dioxide (CO2)

One carbon atom and two oxygen atoms make carbon dioxide.

  1. 1Carbon contribution: 1 × 12.011 = 12.011 g/mol.
  2. 2Oxygen contribution: 2 × 15.999 = 31.998 g/mol.
  3. 3Add contributions: 12.011 + 31.998 = 44.009 g/mol.
  4. 4A 44.009 g sample is therefore 1 mol of CO2.
Final Answer: 44.009 g/mol

Introduction

Molecular weight, commonly used interchangeably with molar mass for formula-based calculations, is the sum of each element's atom count multiplied by its atomic weight. This molecular weight calculator handles compounds such as water, glucose, and carbon dioxide, then connects the result to mole calculations. If you need composition by mass, use the percent composition calculator; if you are scaling a reaction, pair it with the molar ratio calculator. The method follows standard atomic-weight conventions from IUPAC and NIST.

What is molecular weight?

Molecular weight is the relative mass of one molecule or formula unit. For routine stoichiometry, the same numerical value is used as molar mass in grams per mole. A molecule of water has a molecular weight of about 18.015 atomic mass units, and one mole of water has a mass of about 18.015 grams.

  • Use atom counts from the chemical formula.

  • Use standard atomic weights for natural isotopic abundance unless isotope-specific masses are required.

  • The result is numerically g/mol for molar mass and amu per molecule for molecular weight.

Molecular weight formula

The working equation is MW = Σ(n_i × A_i). For every element i, multiply the number of atoms in the formula by that element's atomic weight, then add all contributions. The calculator accepts up to six element rows, which is enough for most classroom and laboratory formulas.

Hydrates and salts with waters of crystallization must include those water atoms in the entered composition.

Connecting molecular weight to grams and moles

Once molecular weight is known, gram-to-mole conversion is direct: n = mass / MW. Conversely, mass = n × MW. These relationships power preparation calculations for standards, buffers, and reaction mixtures. For solution concentration after weighing a solute, continue with the molarity calculator.

Common molecular weights

The table lists benchmark values useful for checking your entries.

CompoundFormulaCalculationMolecular weight (g/mol)
WaterH2O2×1.008 + 15.99918.015
Carbon dioxideCO212.011 + 2×15.99944.009
GlucoseC6H12O66×12.011 + 12×1.008 + 6×15.999180.156
Sodium chlorideNaCl22.990 + 35.4558.44
Sulfuric acidH2SO42×1.008 + 32.06 + 4×15.99998.072

Choosing atomic weights

Standard atomic weights are interval or conventional values reflecting natural isotope abundances. For isotope-enriched materials, exact molecular masses differ, so replace standard atomic weights with isotope masses. Authoritative values are maintained in the IUPAC CIAAW tables and summarized in the NIST Chemistry WebBook.

Common mistakes to avoid

The most common errors are omitting subscripts, forgetting parentheses, and using rounded atomic weights inconsistently. For example, Ca(OH)2 has two oxygen atoms and two hydrogen atoms because the subscript 2 applies to the whole hydroxide group. Keep enough significant figures in intermediate steps and round only the final answer.

If a formula contains parentheses, first distribute the outside subscript to every atom inside the group.

Quick Reference Card

Molecular Weight — Quick Reference

Quick referenceMolecular Weight Calculator

MW = Σ(atom count × atomic weight)

Valid range: Greater than 0 g/mol for any real compound; most small molecules are 2–500 g/mol

Common Values

H2O18.015 g/mol
CO244.009 g/mol
NaCl58.44 g/mol
H2SO498.072 g/mol
Glucose C6H12O6180.156 g/mol

Watch Out

  • Do not ignore subscripts after parentheses.
  • Include waters of hydration when calculating hydrate formulas.
  • Use isotope masses for labeled compounds instead of standard atomic weights.
  • Round only the final result to avoid accumulating error.

Pro Tips

  • List each element once with its total atom count.
  • Check total atoms before trusting the final mass.
  • Keep at least three decimal places for common atomic weights.
  • Use molecular weight before molarity or percent-composition calculations.

FAQs

Is molecular weight the same as molar mass?

They have the same numerical value for a specified formula. Molecular weight is often expressed in atomic mass units per molecule, while molar mass is expressed in grams per mole.

How do I calculate molecular weight from a formula?

Multiply each element's atom count by its atomic weight and add the results. For H2O, calculate 2 × 1.008 plus 1 × 15.999 to get 18.015 g/mol.

What atomic weights should I enter?

Use standard atomic weights from a periodic table for ordinary natural-abundance samples. Use isotope masses when the compound is isotope-labeled or when exact mass is required.

How do I handle parentheses in formulas?

Multiply every atom inside the parentheses by the outside subscript. In Mg(OH)2, oxygen count is 2 and hydrogen count is 2.

Can this convert grams to moles?

Yes. Enter the molecular-weight rows plus a sample mass, and the calculator returns moles using n = mass / MW.

Why does my answer differ slightly from a textbook?

Textbooks may round atomic weights differently. Small differences in carbon, hydrogen, oxygen, or chlorine atomic weights can shift the final value in the last decimal places.