Molecular Weight Calculator

One molecule of water weighs 18.015 atomic mass units, and one mole of water weighs 18.015 grams. Those are not two different answers that happen to agree. They are the same number wearing two units, and that is the whole point of this free molecular weight calculator: type a formula, and it gives you the molecular weight in u and the molar mass in g/mol side by side, so the identity is visible in every result instead of being something you have to take on trust. At the defaults, H2O, the answer is 18.015 u and 18.015 g/mol, from 2 hydrogen atoms at 1.008 each and 1 oxygen atom at 15.999. The breakdown table shows where every unit of that total comes from: hydrogen contributes 2.016 u, which is 11.2 percent of the mass, and oxygen contributes 15.999 u, which is 88.8 percent. Change the formula to CO2 and the same working gives 44.009 u and 44.009 g/mol, with carbon at 27.3 percent and oxygen at 72.7 percent.

Chemical Formula

Type a formula with element symbols, numbers and brackets, for example H2O, CO2, Ca(OH)2 or Fe2(SO4)3. A number after an element or a bracket multiplies it, and a number on its own is not allowed, so do not type 2H2O. Hydrates and charges are not supported: leave out dots, plus and minus signs.

H2O 18.015 u = 18.015 g/mol H x2 O x1 O 88.8% oxygen is 88.8% of the mass; hydrogen is 11.2% of the mass. H2O has 2 elements and 3 atoms in total.
Molecular weight result
FormulaH2O
Molecular Weight18.015 u
Molar Mass18.015 g/mol
Total Atoms3
Calculation2 x 1.008 + 1 x 15.999
Element breakdown
ElementAtomsAtomic Weight (u)Contribution (u)Share
H21.0082.01611.2%
O115.99915.99988.8%
One molecule of H2O weighs 18.015 u, which is a molar mass of 18.015 g/mol: 2 hydrogen atoms contribute 2.016 u and 1 oxygen atom contributes 15.999 u.
This is the average molecular weight, worked out from the IUPAC 2021 conventional standard atomic weights. The monoisotopic weight, from the lightest isotope of each element, is a different number: water is 18.011 u that way, and mass spectrometers use it. For ionic compounds such as sodium chloride the correct term is formula weight, not molecular weight, but the number is worked out the same way.
CompoundFormulaMolecular Weight (u)Composition
WaterH2O18.0152 H + 1 O
Carbon dioxideCO244.0091 C + 2 O
Sodium chlorideNaCl58.4401 Na + 1 Cl
GlucoseC6H12O6180.1566 C + 12 H + 6 O
MethaneCH416.0431 C + 4 H
AmmoniaNH317.0311 N + 3 H
Sulfuric acidH2SO498.0722 H + 1 S + 4 O
Calcium carbonateCaCO3100.0861 Ca + 1 C + 3 O
EthanolC2H5OH46.0692 C + 6 H + 1 O
BenzeneC6H678.1146 C + 6 H

Molecular weights use the IUPAC 2021 conventional standard atomic weights. The row matching the formula you entered is highlighted. At the defaults, H2O, the water row is highlighted at 18.015 u. Sodium chloride and calcium carbonate are ionic, so their numbers are properly formula weights, not molecular weights, but the arithmetic is the same.

Powered by Techraxy

Creator & Reviewer

Faiq Ur Rahman

Founder & CEO, Techraxy

Faiq Ur Rahman is a web designer, digital product developer, and Founder of Techraxy, a growing platform of online calculators and utility tools. He specializes in building structured, user-friendly tools focused on finance, health, conversions, productivity, and everyday problem-solving. He is passionate about developing practical digital solutions that make complex tasks simpler for users worldwide.

Share:

Rate this Tool

User Ratings:

0
0 out of 5 stars (based on 0 reviews)
Excellent
Very good
Average
Poor
Terrible

ADVERTISEMENT

ADVERTISEMENT

What is a Molecular Weight Calculator?

A molecular weight calculator is a tool that adds up the atomic weights of every atom in a chemical formula to give the mass of one molecule, in atomic mass units (u, also called daltons, Da). The formula is simple: molecular weight equals the sum over each element of its atom count times its standard atomic weight. For water that is 2 times 1.008 plus 1 times 15.999, which is 18.015 u. The fact this calculator is built around is that molecular weight and molar mass are the same number. Molecular weight is the mass of one molecule in u, molar mass is the mass of one mole of the same substance in g/mol, and the numbers are identical: water is 18.015 u per molecule and 18.015 g/mol per mole. Use the molecular weight when you are talking about one molecule, and the molar mass when you are weighing out a mole of the substance in the lab. The same number in grams per mole is the molar mass, and our Molar Mass Calculator gives it in grams per mole with the same breakdown, so the two calculators agree with each other by design. Two cautions belong in the definition, because they decide whether the number you get is the number you wanted. First, this calculator gives the average molecular weight, worked out from the IUPAC 2021 conventional standard atomic weights, which average each element over its natural isotopes. The monoisotopic weight is different: it uses only the lightest isotope of each element, so water is 18.011 u monoisotopic against 18.015 u average, and a mass spectrometer reports the monoisotopic value. Second, the term molecular weight only fits substances that form molecules. For ionic compounds such as sodium chloride and calcium carbonate, which exist as crystals with no discrete molecules, the correct term is formula weight, not molecular weight. The calculator still computes the number the same way, 58.440 for NaCl and 100.086 for CaCO3, and says so wherever those compounds appear.

How to Use the Molecular Weight Calculator

Type a chemical formula in the box, using element symbols, numbers and brackets, for example H2O, CO2, Ca(OH)2 or Fe2(SO4)3. A number after an element or a bracket multiplies it, so Ca(OH)2 means one calcium, two oxygens and two hydrogens. The calculator updates as you type, and the Calculate button runs it again at any time. Read the results in order. The first row repeats the formula the calculator parsed, so you can check it read what you typed. The molecular weight row gives the mass of one molecule in u, and the molar mass row gives the same number in g/mol, so you can see the identity directly. Total atoms counts every atom in the formula, 3 for H2O and 24 for glucose, C6H12O6. The calculation row shows the working, for example 2 x 1.008 + 1 x 15.999 for water. The element breakdown table lists each element with its atom count, its atomic weight, its contribution to the total and its share of the mass. The diagram draws the molecule as coloured balls, one per element, sized by that element’s share of the molecular weight, so the dominant element is visibly the biggest ball. Below it, a composition bar splits the total into the same shares, with a sentence naming each share. Changing the formula moves the balls, the bonds between them and the bar, and the headline under the formula states the identity outright: 18.015 u equals 18.015 g/mol for water. The Compare Compounds tab puts ten familiar compounds side by side, from methane at 16.043 u to glucose at 180.156 u, with the formula and the composition of each. The row for the formula you entered is highlighted, so you can see where your compound sits among the familiar ones. Sodium chloride and calcium carbonate are in the table with a note that their numbers are properly formula weights. If the formula cannot be parsed, the calculator shows one message asking for a formula using element symbols, numbers and brackets, dashes out all the result fields, and empties the highlight. That happens for an empty box, a leading number such as 2H2O, an unbalanced bracket such as Ca(OH2, an unknown element such as Xx, a lowercase start such as h2o, a zero count such as H0, a charge such as H2O+, and a hydrate such as CuSO4.5H2O, because hydrates and charges are not supported. The Compare Compounds tab stays populated while an error is showing, with no row highlighted. Reset restores H2O and its results.

Molecular Weight Calculator Formula

The formula is molecular weight equals the sum over each element of its atom count times its standard atomic weight, written as MW equals the sum of n times A, where n is the number of atoms of an element in the formula and A is that element’s standard atomic weight in u. The molar mass is the same sum, read in g/mol instead of u. Written out for the defaults, water, H2O: 2 times 1.008 is 2.016, 1 times 15.999 is 15.999, and 2.016 plus 15.999 is 18.015. So the molecular weight is 18.015 u and the molar mass is 18.015 g/mol. The atomic weights come from the IUPAC 2021 conventional standard atomic weights, the single representative values IUPAC publishes for everyday work. Several elements have interval atomic weights in nature, because their isotope mix varies by source, and the conventional value is the one used here: hydrogen 1.008, carbon 12.011, nitrogen 14.007, oxygen 15.999, sulfur 32.06 and chlorine 35.45.

Worked Example

Take carbon dioxide, CO2. It has 1 carbon atom at 12.011 u and 2 oxygen atoms at 15.999 u each. The working is 1 times 12.011 plus 2 times 15.999, which is 12.011 plus 31.998, which is 44.009. So the molecular weight is 44.009 u and the molar mass is 44.009 g/mol, for a molecule of 3 atoms in total. The shares follow from the same numbers. Carbon contributes 12.011 out of 44.009, which is 27.3 percent, and oxygen contributes 31.998 out of 44.009, which is 72.7 percent. The two shares add to 100.0 percent, which is a useful check on any breakdown: if the shares do not add to 100, something has gone wrong with the arithmetic. The same steps check a larger molecule. Glucose, C6H12O6, is 6 times 12.011 plus 12 times 1.008 plus 6 times 15.999, which is 72.066 plus 12.096 plus 95.994, which is 180.156. Its molecular weight is 180.156 u, its molar mass is 180.156 g/mol, and it has 24 atoms in total.

Benefits of Using a Molecular Weight Calculator

The first benefit is getting one number that serves two jobs. A student working out a reaction needs the molar mass in g/mol to convert grams to moles, while a chemist reading a mass spectrum needs the molecular weight in u for one molecule. Because the numbers are identical, either job starts from the same result, and this calculator shows both rows together so there is never a doubt about which number to carry forward. The second benefit is seeing the composition, not just the total. The breakdown table turns 98.072 u for sulfuric acid, H2SO4, into its parts: hydrogen 2.016 u at 2.1 percent, sulfur 32.06 u at 32.7 percent, and oxygen 63.996 u at 65.3 percent. That is the information a stoichiometry question actually asks for, and it is also the fastest way to spot a mistyped formula, because a wrong subscript shows up at once as a wrong share. The third benefit is learning the right term for the substance in front of you. Calling the 58.440 of sodium chloride a molecular weight is the common slip, because table salt has no molecules to weigh. The calculator labels it a formula weight in the compare note and in the article, while still giving the number, so the habit forms alongside the answer rather than as a correction after it. The fourth benefit is knowing which mass a mass spectrometer wants. The average molecular weight on a reagent label and the monoisotopic weight on a spectrum are different numbers, and for water they differ by 0.004 u, 18.015 against 18.011. That gap grows with the size of the molecule, so confusing the two is a real source of error in identification work. The calculator states plainly that it gives the average weight, and the tip under the results gives the monoisotopic water value for comparison.

Frequently Asked Questions

Is molecular weight the same as molar mass?

Yes, as numbers they are identical. Molecular weight is the mass of one molecule in atomic mass units (u), and molar mass is the mass of one mole of the same substance in grams per mole (g/mol). Water is 18.015 u per molecule and 18.015 g/mol per mole. The difference is units and context, not value: use molecular weight when you mean one molecule, and molar mass when you mean a mole of them. This calculator shows both rows for every formula so the identity is visible in the result itself.

What is the difference between average and monoisotopic molecular weight?

Average molecular weight uses the standard atomic weights, which average each element over its natural isotopes, and it is the number on reagent labels and the number this calculator gives. Monoisotopic weight uses only the lightest isotope of each element, hydrogen 1.007825, carbon 12.000000, nitrogen 14.003074 and oxygen 15.994915, and it is the number a high resolution mass spectrometer reports. For water the average is 18.015 u and the monoisotopic is 18.011 u. Use the average for weighing and stoichiometry, and the monoisotopic for matching a mass spectrum.

Why does sodium chloride have a formula weight instead of a molecular weight?

Because sodium chloride is ionic and forms a crystal, not discrete molecules. A crystal of table salt is one continuous lattice of sodium and chloride ions, so there is no single NaCl molecule to weigh. The correct term for the mass of one formula unit, 58.440, is formula weight. The arithmetic is the same as for a molecule, one sodium at 22.990 plus one chlorine at 35.45, and the same applies to calcium carbonate at 100.086. This calculator computes the number either way and labels ionic compounds correctly in the compare note.

What can I type, and what is not supported?

You can type element symbols with correct capitalisation, numbers after elements and brackets, and nested brackets, for example H2O, CO2, Ca(OH)2, Fe2(SO4)3 and (NH4)2SO4. A number after a bracket multiplies everything inside it. What is not supported is a leading number such as 2H2O, a lowercase start such as h2o, a zero count such as H0, charges such as H2O+, and hydrates such as CuSO4.5H2O, because dots, plus and minus signs are rejected. Any of those shows one message asking for a formula using element symbols, numbers and brackets, and dashes out the results.

Why do different tables give slightly different molecular weights?

Because several elements have interval atomic weights in nature: hydrogen, boron, carbon, nitrogen, oxygen, silicon, sulfur, chlorine and thallium vary in isotope mix by source, so IUPAC publishes a conventional single value for everyday work and different tables round it differently. Gold is 196.967 in the full IUPAC table and 196.97 on most periodic tables, which is the value used here. These differences move a molecular weight by at most a few thousandths of a unit, and they never change which compound is heavier or the order of the compare table.

Calculator Sources

Wikipedia — Molecular mass, with the mass of a molecule as the sum of its atomic masses, and the distinction between average molecular mass and monoisotopic mass.

Wikipedia — Molar mass, with molar mass, molecular mass and formula mass as synonyms in numerical value, differing only in units, daltons against g/mol.

LibreTexts — Atoms and the Mole, with a table giving ethanol as 46.069 u and 46.069 g/mol, formula mass for ionic compounds, and sodium chloride at 58.44.

NIST — Atomic Weights and Isotopic Compositions, the reference data behind the standard atomic weights and the isotope abundances they average over.

CIAAW — Standard Atomic Weights, from the IUPAC Commission on Isotopic Abundances and Atomic Weights, the source of the conventional values used in this calculator.

Disclaimer

This calculator gives the average molecular weight from the IUPAC 2021 conventional standard atomic weights, and it is for study, homework and general reference only. It is not the monoisotopic weight, so do not use it to identify a compound from a mass spectrum: for that you need the lightest isotope masses, which give a different number, 18.011 u for water instead of 18.015 u. Atomic weights are conventional values for elements whose isotope mix varies in nature, so a table that rounds differently gives a slightly different total, and a course that specifies different atomic weights takes priority for coursework. For ionic compounds the number is a formula weight, not a molecular weight, even though the arithmetic is the same. Do not use this calculator to prepare a solution for analytical or medical work without checking the value against your lab’s own reference data.

Last updated: 1 December 2026

ADVERTISEMENT

ADVERTISEMENT