Skip to content
Chemistry

Molecular Weight Calculator

Enter any chemical formula - from simple compounds like H2O to complex hydrates like CuSO4*5H2O - and get the molar mass in g/mol along with the full elemental composition and percent-by-mass breakdown. Use parentheses for polyatomic groups, a dot or asterisk for hydrates, and choose from 20 common compound presets to get started quickly.

Your details

Pick a preset to auto-fill the formula, or choose "Enter formula below" to type your own.
Type the molecular formula using element symbols. Use numbers for subscripts (H2O, not H₂O). Parentheses for groups: Al2(SO4)3. Hydrates: CuSO4*5H2O or CuSO4.5H2O.
Optional: enter the number of moles to calculate the mass of that sample.
mol
Molar mass
18.016g/mol

Mass of one mole of the compound (numerically equal to molecular weight in Da)

Mass of sample18.016g
Atoms per molecule3
Number of elements2
Elemental compositionH: 2 atoms, 2.016 g/mol (11.19%) | O: 1 atom, 16.000 g/mol (88.81%)
Total atoms3
Distinct elements2
045.0490.08035
Moles (mol)

Molar mass of H2O: 18.0160 g/mol

  • O makes up the largest share of the mass at 88.8% by weight.
  • Each formula unit contains 3 atoms across 2 elements.
  • This is a light molecule: one mole weighs less than 50 g, comparable to a small bottle of water.

Next stepUse the molar mass with Avogadro's number (6.022 × 10²³ mol⁻¹) to convert between moles and the number of individual molecules.

What is molecular weight and molar mass?

Molecular weight (or molecular mass) is the mass of a single molecule expressed in unified atomic mass units (u), where 1 u equals exactly 1/12 the mass of a carbon-12 atom. Molar mass is the mass of one mole (6.022 x 10^23 molecules) of a substance expressed in grams per mole (g/mol). The two values are numerically identical: water has a molecular weight of 18.015 u and a molar mass of 18.015 g/mol. Chemists use molar mass more often in practice because it connects the microscopic world of atoms to measurable laboratory quantities - if you need 1 mole of water you weigh out 18.015 grams.

How to write a chemical formula for this calculator

Use the standard IUPAC element symbols (one uppercase letter, optionally followed by one lowercase letter). Write subscript numbers directly after the symbol - H2O not H subscript 2. For polyatomic groups that repeat, use parentheses: Al2(SO4)3 means two aluminium atoms and three SO4 groups. For hydrates (compounds with water of crystallisation), use a dot, asterisk, or middle dot as the separator: CuSO4*5H2O or CuSO4.5H2O both work. Formulas are case-sensitive - Na is sodium, but NA is not recognised. If the calculator returns no result, check that each element symbol begins with an uppercase letter.

Step-by-step: how molar mass is calculated

The calculation follows three steps. First, parse the formula to find how many atoms of each element are present - for H2SO4 that is 2 hydrogen, 1 sulfur, and 4 oxygen. Second, multiply each element's count by its standard atomic weight from the IUPAC periodic table: 2 x 1.008 + 1 x 32.07 + 4 x 16.00 = 2.016 + 32.07 + 64.00 = 98.086 g/mol. Third, sum all contributions. This calculator uses the IUPAC 2021 standard atomic weights, which are the internationally agreed values used in research and industry.

Elemental composition and percent by mass

The percent composition of each element is its contribution to the molar mass divided by the total molar mass, multiplied by 100. For water (H2O, molar mass 18.015 g/mol): hydrogen is 2 x 1.008 / 18.015 x 100 = 11.19%, oxygen is 16.00 / 18.015 x 100 = 88.81%. This information is important in analytical chemistry for verifying a substance's identity (by comparing the calculated composition with values from elemental analysis instruments) and in stoichiometry for working out how much of each element a reaction produces or consumes. The composition panel in this calculator shows every element's atom count, mass contribution in g/mol, and percent by mass.

Common compounds and their molar masses

CompoundFormulaMolar mass (g/mol)Common use
WaterH2O18.015Solvent, reagent
Carbon dioxideCO244.010Gas, dry ice
Sodium chlorideNaCl58.443Table salt
AmmoniaNH317.031Fertiliser, refrigerant
Sulfuric acidH2SO498.079Industrial acid
Hydrochloric acidHCl36.461Laboratory acid
Sodium hydroxideNaOH39.997Base, soap making
GlucoseC6H12O6180.156Energy metabolism
SucroseC12H22O11342.297Table sugar
EthanolC2H5OH46.069Solvent, beverages
MethaneCH416.043Natural gas
Calcium carbonateCaCO3100.087Limestone, antacids
AspirinC9H8O4180.159Analgesic
Copper sulfateCuSO4*5H2O249.685Agriculture, lab reagent
Aluminum sulfateAl2(SO4)3342.151Water treatment

Reference molar masses calculated from IUPAC 2021 standard atomic weights.

Frequently asked questions

What is the difference between molecular weight and molar mass?

Molecular weight is the mass of one molecule in unified atomic mass units (u or Da). Molar mass is the mass of one mole of molecules in grams per mole (g/mol). The numbers are equal: water is 18.015 u per molecule and 18.015 g/mol per mole. In everyday chemistry, "molar mass" is the more practical term because it connects directly to the grams you weigh on a balance.

How do I enter a formula with parentheses or brackets?

Use standard chemical notation. For groups that repeat, wrap them in parentheses followed by the count: Al2(SO4)3 for aluminium sulfate. Square brackets work the same way. For hydrates, separate the base formula from the water of crystallisation with a dot or asterisk: CuSO4*5H2O or CuSO4.5H2O.

What atomic weights does this calculator use?

The calculator uses IUPAC 2021 standard atomic weights, the internationally agreed values published by the International Union of Pure and Applied Chemistry. These are weighted averages over the naturally occurring isotopic abundances of each element.

How do I convert molar mass to molecules?

Multiply the number of moles by Avogadro's number (6.022 x 10^23 mol^-1). If you have 0.5 mol of water (molar mass 18.015 g/mol), the mass is 0.5 x 18.015 = 9.008 g, and the number of molecules is 0.5 x 6.022 x 10^23 = 3.011 x 10^23 molecules.

Can I calculate the molar mass of a polymer or large molecule?

Yes, as long as you know the molecular formula. For a polymer repeat unit such as polyethylene (CH2)n, enter the formula for the repeat unit (CH2) then multiply the result by the degree of polymerisation. This calculator handles any formula that can be expressed with standard element symbols and integer atom counts.

What is elemental percent composition and why does it matter?

Percent composition is each element's share of the molar mass expressed as a percentage. Chemists use it to verify a compound's identity by comparing the calculated values with results from combustion analysis or other elemental analysis techniques. A discrepancy between theoretical and measured composition suggests an impure sample or an incorrect formula.

Sources

Written by Dr. Sofia Marchetti, PhD Chemist · Milan, Italy

Physical chemist and laboratory educator bringing rigorous solution science to accessible, accurate online tools.

Search 3,500+ calculators

Loading search…