General

Molecular Weight Calculator

Free molecular weight calculator. Find the molar mass of any formula, with brackets and hydrates, the share of each element, and convert grams to moles.

Share:X
Loading calculator interface...

How the Molecular Weight Calculator Works


Every chemical compound is made of atoms, and each kind of atom has its own weight. The molecular weight of a compound is the sum of the weights of all the atoms in its formula. It tells a chemist how many grams of the compound make up one mole, which is the unit that is used to measure amounts in a reaction. The Molecular Weight Calculator reads a chemical formula, adds up the atoms, and shows the total.

What you enter

  • A chemical formula, such as H2O, NaCl, C6H12O6, Ca(OH)2, (NH4)2SO4 or CuSO4·5H2O.
  • An amount (optional), in grams, milligrams, kilograms, moles or millimoles, to change it to the other units.

Write the symbols of the elements with a capital letter, followed by at most one small letter. This matters: Co is the element cobalt, and CO is carbon and oxygen. A number after a symbol says how many atoms there are. If there is no number, there is one atom.

How the weight is worked out

molecular weight = sum of (number of atoms x atomic weight) for every element

Brackets multiply everything inside them. In (NH4)2SO4, the group NH4 is counted twice. A hydrate is a compound that holds water. The dot and the number after it, as in CuSO4·5H2O, mean five molecules of water for each unit of CuSO4.

A worked example: water

ElementAtomsAtomic weightWeight
Hydrogen (H)21.0082.016
Oxygen (O)115.99915.999
Total318.015 g/mol

A worked example: glucose

Glucose is C6H12O6, which is 6 carbon atoms, 12 hydrogen atoms and 6 oxygen atoms.

ElementAtomsAtomic weightWeightShare
Carbon (C)612.01172.06640.00%
Hydrogen (H)121.00812.0966.71%
Oxygen (O)615.99995.99453.28%
Total24180.156 g/mol100%

Brackets and hydrates

FormulaHow it is countedMolecular weight
Ca(OH)21 Ca + 2 O + 2 H74.092 g/mol
(NH4)2SO42 N + 8 H + 1 S + 4 O132.134 g/mol
Al2(SO4)32 Al + 3 S + 12 O342.132 g/mol
CuSO4·5H2O1 Cu + 1 S + 4 O + 10 H + 5 O249.677 g/mol

For the ammonium sulfate, the calculation is 2 x 14.007 (nitrogen) + 8 x 1.008 (hydrogen) + 32.06 (sulfur) + 4 x 15.999 (oxygen) = 132.134. You may also use square brackets and curly braces, and brackets inside brackets, as in K4[Fe(CN)6].

Chart: what each compound is made of

The share of the weight that each element makes up. Each block is 2.5%. Blue is hydrogen, grey is carbon, red is oxygen, yellow is sulfur, purple is sodium and green is chlorine.

Water, H2O          ████████████████████████████████████████
Carbon dioxide, CO2 ████████████████████████████████████████
Table salt, NaCl    ████████████████████████████████████████
Glucose, C6H12O6    ████████████████████████████████████████
Ethanol, C2H5OH     ████████████████████████████████████████
Sulfuric acid, H2SO4 ████████████████████████████████████████

Water is nearly 89% oxygen by weight, even though there are twice as many hydrogen atoms. This is because an oxygen atom weighs about 16 times as much as a hydrogen atom.

From grams to moles

A mole is a fixed number of particles: 6.02214076 x 10^23. This is Avogadro's number. The molecular weight tells you what one mole weighs in grams:

moles = grams / molar mass
grams = moles x molar mass
molecules = moles x 6.022 x 10^23
AmountMolesMolecules
36.03 g of water2 mol1.204 x 10^24
58.44 g of table salt1 mol6.022 x 10^23
500 mg of water0.02776 mol1.671 x 10^22

Molar masses of some common substances

SubstanceFormulag/mol
WaterH2O18.015
Carbon dioxideCO244.009
Table saltNaCl58.44
Calcium carbonateCaCO3100.086
GlucoseC6H12O6180.156
Sulfuric acidH2SO498.072
Iron(III) oxide (rust)Fe2O3159.687
Sucrose (table sugar)C12H22O11342.297
Water     ██ 18
CO2       █████ 44
NaCl      ███████ 58
CaCO3     ████████████ 100
Glucose   █████████████████████ 180
Sucrose   ████████████████████████████████████████ 342

Molecular weight, molar mass and formula weight

These terms are used for almost the same thing. The molecular weight is the weight of one molecule, measured in atomic mass units. The molar mass is the weight of one mole, measured in grams per mole. The two have the same number. For ionic compounds such as table salt, there are no separate molecules, only a lattice of ions, so the term formula weight is used. The number is worked out in the same way.

Where the atomic weights come from

The atomic weight of an element is the average weight of its atoms as they occur in nature. Most elements have several isotopes, which are atoms with different numbers of neutrons, so the average is not a whole number. Chlorine, for example, is about 75% chlorine-35 and 25% chlorine-37, and its average is 35.45. The calculator uses the standard textbook values. For a few elements, the value can change a little between sources and samples. For elements with no stable isotope, such as technetium, the table shows the mass number of the longest-lived isotope.

Tips

  • Check the capital letters. They decide which elements you mean.
  • Count the atoms inside brackets carefully. The number after a bracket multiplies every atom inside it.
  • Include the water of a hydrate. The mass of a salt with water is much higher than the mass of the dry salt.
  • Keep enough digits. Do not round the molar mass too early in a longer calculation.
  • Check the units. Molar mass is in grams per mole, and a mole is not the same as a gram.

What this calculator does not include

  • Charges on ions, such as SO4 2-. Enter the formula without the charge. The weight of the electrons is very small.
  • Isotopes of one element. The calculator uses the average atomic weight.
  • Names of compounds. You must type the formula, not the name.
  • Structural formulas and abbreviations such as Me or Ph.

This tool gives the molar mass from standard atomic weights, for study and general use. For work that needs high accuracy, use the values of your source, or of the IUPAC table.

Frequently Asked Questions

Is the Molecular Weight Calculator free to use?+

Yes. The Molecular Weight Calculator, and every other tool on CalculatorBooth, is completely free to use with no sign-up or account required.

Is my data stored or shared?+

All computations are performed locally in your browser. No private inputs or parameters are stored or transmitted.

How accurate is this calculator?+

It's built and tested for accuracy, but the result is an estimate for planning purposes. It isn't a substitute for advice from a qualified financial, medical, or legal professional.

Related Calculators