Skip to content
FigureSure
Sign in

Molecular Weight Calculator

Type any chemical formula, including brackets, complex ions and hydrates such as CuSO₄·5H₂O, to get its molar mass in g/mol and the mass percentage of each element, using IUPAC standard atomic weights.
  • Updated
  • Formula shown

Chemical formula

Case matters (Co is cobalt, CO is carbon monoxide). Use ( ) [ ] { } for groups and · . or * for hydrates, e.g. Ca(OH)2, K4[Fe(CN)6], CuSO4·5H2O. Charges such as SO4^2- are ignored.

Results

Molar mass of C₆H₁₂O₆
180.156g/mol
Molecular weight 180.156 (relative, no unit) = 180.156 Da per molecule
Hill formula
Carbon first, then hydrogen, then the rest alphabetically
C₆H₁₂O₆
Atoms per formula unit
3 elements
24
Mass of one formula unit
Molar mass ÷ Avogadro constant (6.02214076 × 10²³ mol⁻¹)
2.992 × 10⁻²²g
Moles in 1 gram
0.005551mol

Molar mass of C₆H₁₂O₆ = 180.156 g/mol

Share of the molar mass by element
C
40%
H
6.71%
O
53.28%
Element-by-element breakdown
ElementSymbolAtomsAtomic weightMass (g/mol)Mass %
CarbonC612.01172.06640.002%
HydrogenH121.00812.0966.714%
OxygenO615.99995.99453.284%

Atomic weights are the IUPAC (CIAAW) standard atomic weights, using the conventional values for elements such as H, C, N, O and Cl whose weights vary in nature.

How to use the molecular weight calculator

  1. Type the formula with correct capital letters: NaCl, not NACL or nacl. Co is cobalt, while CO is carbon monoxide.
  2. Use brackets for repeated groups, as in Ca(OH)₂ or K₄[Fe(CN)₆], and a dot, middle dot or asterisk before water of crystallization: CuSO4.5H2O works.
  3. Ions are fine: write the charge with a caret (SO4^2-) or at the end (NH4+, Fe3+). The charge is ignored because electrons weigh almost nothing.
  4. Read the molar mass, the Hill formula and the table of each element's atoms, mass and percentage.

Molar mass formula

M = Σ (nᵢ × Arᵢ)
mass %ᵢ = nᵢ × Arᵢ ÷ M × 100

The molar mass M of a compound is the sum, over every element i in the formula, of the number of atoms nᵢ times that element's standard atomic weight Arᵢ. Atomic weights have no unit, but numerically they equal the mass in grams of one mole of atoms, so the result is in grams per mole. The same number is the molecular weight (a pure ratio) and the mass of one molecule in daltons. For ionic solids such as NaCl, which have no separate molecules, chemists call it the formula weight; the arithmetic is identical.

Worked examples

  • Calcium hydroxide, Ca(OH)₂: one calcium (40.078), two oxygens (2 × 15.999) and two hydrogens (2 × 1.008) give 40.078 + 31.998 + 2.016 = 74.092 g/mol. Calcium makes up 54.09% of the mass.
  • Copper(II) sulfate pentahydrate, CuSO₄·5H₂O: the anhydrous salt is 159.602 g/mol and the five waters add 90.075, for 249.677 g/mol in all. Water is 36.1% of the crystals' mass, which matters when you weigh out the blue hydrate to make a solution of a given strength.

Molar masses of common compounds

Calculated with this calculator's engine and the atomic weights described below, rounded to three decimal places.

CompoundFormulaMolar mass (g/mol)
WaterH₂O18.015
Oxygen gasO₂31.998
Nitrogen gasN₂28.014
MethaneCH₄16.043
AmmoniaNH₃17.031
Carbon dioxideCO₂44.009
Hydrochloric acid (HCl)HCl36.458
Sodium hydroxideNaOH39.997
EthanolC₂H₅OH46.069
Sodium chlorideNaCl58.44
Calcium hydroxideCa(OH)₂74.092
Sodium bicarbonateNaHCO₃84.006
Sulfuric acidH₂SO₄98.072
Calcium carbonateCaCO₃100.086
Ammonium sulfate(NH₄)₂SO₄132.134
Potassium permanganateKMnO₄158.032
Iron(III) oxideFe₂O₃159.687
GlucoseC₆H₁₂O₆180.156
Copper(II) sulfate pentahydrateCuSO₄·5H₂O249.677
SucroseC₁₂H₂₂O₁₁342.297

Where the atomic weights come from

The calculator uses the standard atomic weights published by the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), from its current table based on the "Atomic Weights 2021" report with the 2024 revisions for gadolinium, lutetium and zirconium. For 14 elements the isotope mix varies naturally, so IUPAC gives an interval rather than a single number; for those, the calculator uses IUPAC's conventional values, which are intended for everyday calculations:

ElementSymbolConventional atomic weight
HydrogenH1.008
LithiumLi6.94
BoronB10.81
CarbonC12.011
NitrogenN14.007
OxygenO15.999
MagnesiumMg24.305
SiliconSi28.085
SulfurS32.06
ChlorineCl35.45
ArgonAr39.95
BromineBr79.904
ThalliumTl204.38
LeadPb207.2

Radioactive elements such as technetium, polonium and plutonium have no standard atomic weight. For them the calculator uses the mass number of the longest-lived known isotope (shown in square brackets), as most periodic tables do, and flags the result as approximate.

Tips and common mistakes

  • Capitals matter. "CO" is carbon monoxide (28.010 g/mol); "Co" is cobalt (58.933 g/mol).
  • Don't forget the water. Many lab chemicals are sold as hydrates; using the anhydrous molar mass for a hydrate gives a solution that is too weak.
  • Subscripts multiply everything inside the bracket. In (NH₄)₂SO₄ there are 2 nitrogens and 8 hydrogens.
  • Isotope labels such as D₂O or ¹³C are not supported; enter the ordinary formula and adjust by hand.

With the molar mass in hand, the molarity calculator tells you how many grams to dissolve for a solution of a given concentration. To relate a mass to a volume of a material, see the density calculator.

Frequently asked questions

How do you calculate molecular weight?

Multiply each element’s atomic weight by the number of its atoms in the formula and add the results. For water, H₂O: 2 × 1.008 + 15.999 = 18.015 g/mol. For glucose, C₆H₁₂O₆, the total is 180.156 g/mol.

What is the molar mass of NaCl?

Sodium chloride is 22.98976928 + 35.45 = 58.44 g/mol. Sodium makes up about 39.34% of the mass and chlorine about 60.66%.

How do I enter a hydrate such as CuSO4·5H2O?

Type a middle dot, a period or an asterisk before the water: CuSO4·5H2O, CuSO4.5H2O and CuSO4*5H2O all work. The number after the dot multiplies the water. Copper(II) sulfate pentahydrate is 249.677 g/mol, of which about 36.1% is water.

Is molecular weight the same as molar mass?

They have the same number. Molar mass is in grams per mole, while molecular weight (relative molecular mass) is a pure ratio with no unit. Calcium hydroxide, Ca(OH)₂, has a molar mass of 74.092 g/mol and a molecular weight of 74.092.

Which atomic weights does the calculator use?

IUPAC CIAAW standard atomic weights, based on the Atomic Weights 2021 report with the 2024 updates. For the 14 elements whose weights vary in nature, such as hydrogen (1.008), carbon (12.011) and chlorine (35.45), it uses the IUPAC conventional values.

Was this calculator helpful?