Water weighs 18.015 grams per mole and carbon dioxide weighs 44.009 grams per mole, and those two numbers decide how much of each substance you need for a reaction, how many moles are in a sample, and what a solution will contain. Molar mass is the mass of one mole of a substance, and this free molar mass calculator works it out from any chemical formula you type in, with a full element breakdown so you can see exactly where every gram comes from.
At the defaults, H2O, the molar mass is 18.015 g/mol: 2 hydrogen atoms contribute 2.016 g and 1 oxygen atom contributes 15.999 g. Type a formula such as CO2, Ca(OH)2 or Fe2(SO4)3 and the calculator parses it, counts every atom, multiplies each count by the standard atomic weight of that element, and adds the results. It uses the IUPAC 2021 conventional standard atomic weights, and it says so openly, because several elements have atomic weights that vary in nature and the last decimal of any molar mass is a convention, not extra precision.
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.
| Element | Atoms | Atomic Weight (g/mol) | Contribution (g/mol) | Share |
|---|---|---|---|---|
| H | 2 | 1.008 | 2.016 | 11.2% |
| O | 1 | 15.999 | 15.999 | 88.8% |
Enter a chemical formula using element symbols, numbers and brackets, for example H2O or Ca(OH)2.
| Compound | Formula | Molar Mass (g/mol) | Composition |
|---|---|---|---|
| Water | H2O | 18.015 | 2 H + 1 O |
| Carbon dioxide | CO2 | 44.009 | 1 C + 2 O |
| Sodium chloride | NaCl | 58.440 | 1 Na + 1 Cl |
| Ammonia | NH3 | 17.031 | 1 N + 3 H |
| Methane | CH4 | 16.043 | 1 C + 4 H |
| Glucose | C6H12O6 | 180.156 | 6 C + 12 H + 6 O |
| Sulfuric acid | H2SO4 | 98.072 | 2 H + 1 S + 4 O |
| Calcium carbonate | CaCO3 | 100.086 | 1 Ca + 1 C + 3 O |
| Calcium hydroxide | Ca(OH)2 | 74.092 | 1 Ca + 2 O + 2 H |
| Sodium hydroxide | NaOH | 39.997 | 1 Na + 1 O + 1 H |
Molar masses 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 g/mol.
ADVERTISEMENT
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.
User Ratings:
ADVERTISEMENT
ADVERTISEMENT
A molar mass calculator is a tool that turns a chemical formula into the mass of one mole of that substance in grams per mole. The formula is simple to state and easy to get wrong by hand: add up, for every element in the formula, the number of atoms of that element times its standard atomic weight. For water that is 2 times 1.008 for hydrogen plus 1 times 15.999 for oxygen, which is 2.016 plus 15.999, giving 18.015 g/mol.
The number matters because chemistry is counted in moles, not in grams. A mole is 6.02214076 times 10 to the power 23 entities, and one mole of any substance weighs its molar mass in grams. So 18.015 g of water is one mole, 44.009 g of carbon dioxide is one mole, and 180.156 g of glucose is one mole. Once you know the molar mass you can convert a weighed mass into moles by dividing mass by molar mass, and convert moles back into grams by multiplying.
Atomic weights are not whole numbers because they are averages over the isotopes of each element as found in nature. Chlorine is 35.45 rather than 35 or 37 because about three quarters of natural chlorine is chlorine-35 and about one quarter is chlorine-37. Carbon is 12.011 rather than exactly 12 because about 1.1 percent of natural carbon is carbon-13, even though carbon-12 itself is exactly 12 by definition. That is why sodium chloride is 58.440 g/mol and not 58 or 59.
Type a chemical formula in the box, using element symbols with a capital letter followed by an optional small letter, for example H2O, NaCl, C6H12O6 or Ca(OH)2. A number after an element multiplies that element, and a number after a closing bracket multiplies everything inside the brackets, so Ca(OH)2 means one calcium, two oxygens and two hydrogens, and Fe2(SO4)3 means two irons, three sulfurs and twelve oxygens. The calculator updates as you type, and the Calculate button runs it again at any time.
Read the results in order. The molar mass is the headline number in grams per mole, to three decimal places. Total atoms is the count of all atoms in one formula unit. Calculation shows the sum itself, so you can check it by hand. The element breakdown table lists every element, its atom count, its atomic weight, its contribution in grams per mole, and its share of the total mass. For H2O the table shows hydrogen at 2 atoms, 1.008, 2.016 and 11.2 percent, and oxygen at 1 atom, 15.999, 15.999 and 88.8 percent.
The Compare Compounds tab lists ten common compounds with their molar masses, from water at 18.015 g/mol to glucose at 180.156 g/mol, and highlights the row matching the formula you entered. If your formula is not in the list, no row is highlighted and the table still works as a quick reference.
If the formula cannot be parsed, the calculator shows a message and dashes out the results. A leading number is not allowed, so type H2O and not 2H2O. Unknown symbols, unbalanced brackets, zero counts, small letters at the start of a symbol, and dots, plus signs and minus signs are all rejected, because hydrates and charges are not supported by this calculator.
The formula is molar mass equals the sum over every element of the number of atoms of that element times its standard atomic weight. Written out for the defaults, H2O: 2 times 1.008 is 2.016, 1 times 15.999 is 15.999, and 2.016 plus 15.999 is 18.015 g/mol.
For a formula with brackets, distribute the multiplier through the brackets first. For Ca(OH)2: inside the brackets, one oxygen is 15.999 and one hydrogen is 1.008, so one OH group is 17.007, and two of them are 34.014. Add the calcium, 40.078, and the total is 74.092 g/mol. For Fe2(SO4)3: one sulfate group is 32.060 plus 4 times 15.999, which is 32.060 plus 63.996, giving 96.056, and three sulfate groups are 288.168. Add two irons at 55.845 each, which is 111.690, and the total is 399.858 g/mol.
The atomic weights used are the IUPAC 2021 conventional standard atomic weights. The calculator holds 47 elements, from hydrogen at 1.008 to lead at 207.2, including all the elements that appear in general chemistry. Gold is listed as 196.97, which is the full IUPAC value of 196.967 rounded to two decimals, as printed on most periodic tables.
Take carbon dioxide, CO2. First count the atoms: 1 carbon and 2 oxygens. Then look up the standard atomic weights: carbon is 12.011 and oxygen is 15.999. Multiply each count by its weight: 1 times 12.011 is 12.011, and 2 times 15.999 is 31.998. Add the contributions: 12.011 plus 31.998 is 44.009 g/mol.
That means one mole of carbon dioxide weighs 44.009 g, and 44.009 g of carbon dioxide contains 6.02214076 times 10 to the power 23 molecules. By mass, carbon is 27.3 percent of the total, because 12.011 divided by 44.009 is 0.273, and oxygen is 72.7 percent, because 31.998 divided by 44.009 is 0.727. The calculator shows the same breakdown, and the diagram draws a carbon ball and an oxygen ball sized by those shares, with the oxygen ball visibly larger.
The first benefit is speed without arithmetic slips. A formula such as Fe2(SO4)3 needs three multiplications and an addition, and a slip in any one of them, or in distributing the 3 through the brackets, gives a wrong answer that looks plausible. The calculator parses the brackets for you, so the count of twelve oxygens in Fe2(SO4)3 is never missed, and the breakdown table lets you check each line against your own working.
The second benefit is converting between grams and moles correctly. If a procedure calls for 0.5 moles of sodium chloride, you need 29.220 g, because half of 58.440 is 29.220. If you weigh out 10 g of glucose, you have 0.0555 moles, because 10 divided by 180.156 is 0.0555. Every stoichiometry problem starts with a step like this, and it starts with the molar mass.
The third benefit is seeing the composition, not just the total. The breakdown shows that oxygen is 88.8 percent of the mass of water, 72.7 percent of carbon dioxide, and 53.3 percent of glucose, while hydrogen is only 11.2 percent of water and 6.7 percent of glucose. That is the information you need for percent composition questions, and the diagram makes it visible: each element is a coloured ball sized by its share of the molar mass, above a bar divided into the same shares.
The fourth benefit is honest precision. Because the calculator states that it uses the IUPAC 2021 conventional values, you know why its answer can differ in the last decimal from a table that uses older weights or a different rounding. Sulfur is 32.06 here, and a table that uses 32.065 would give sulfuric acid as 98.077 rather than 98.072. Neither is wrong in its own convention, and the calculator tells you which convention it follows so you can match your textbook or your exam data sheet.
Count the atoms of each element, including distributing numbers through brackets, then multiply each count by that element’s standard atomic weight and add the results. For CO2 that is 1 times 12.011 plus 2 times 15.999, which is 12.011 plus 31.998, giving 44.009 g/mol. For Ca(OH)2, distribute the 2 through the brackets first: 1 calcium at 40.078 plus 2 oxygens at 15.999 plus 2 hydrogens at 1.008, which is 40.078 plus 31.998 plus 2.016, giving 74.092 g/mol.
Because atomic weights are averages over the isotopes found in nature, not the mass of a single isotope. Sodium is 22.990 and chlorine is 35.45, and 22.990 plus 35.45 is 58.440. Chlorine is 35.45 rather than 35 or 37 because natural chlorine is about three quarters chlorine-35 and one quarter chlorine-37. The calculator shows the total to three decimal places, 58.440 g/mol, which is the same value as 58.44 g/mol.
They are the same number with different units. Molecular weight, or molecular mass, is the mass of one molecule in atomic mass units, and molar mass is the mass of one mole of the substance in grams per mole. Water has a molecular weight of 18.015 and a molar mass of 18.015 g/mol. For ionic compounds such as sodium chloride, which do not form molecules, the correct term is formula mass, but the number is worked out the same way, and this calculator gives it in grams per mole either way.
Because standard atomic weights are revised by IUPAC as measurements improve, and because several elements have interval atomic weights in nature. Hydrogen, boron, carbon, nitrogen, oxygen, silicon, sulfur, chlorine and thallium have isotope mixes that vary by source, so IUPAC publishes both an interval and a single conventional value for each. This calculator uses the IUPAC 2021 conventional values, so hydrogen is 1.008, carbon is 12.011 and oxygen is 15.999. A table using older weights, for example sulfur at 32.065 instead of 32.06, gives sulfuric acid as 98.077 instead of 98.072, and the difference is the convention, not an error.
No. Hydrates such as CuSO4.5H2O and charged species such as SO4 with a 2 minus charge are not supported, and the calculator rejects dots, plus signs and minus signs with a message asking for a plain formula. The reason is that a hydrate dot and a charge sign need different rules from ordinary brackets, and guessing at them would give a silent wrong answer. For a hydrate, work out the anhydrous part and the water part separately and add them: copper sulfate is 159.602 g/mol and five waters add 90.075 g/mol, giving 249.677 g/mol for CuSO4.5H2O.
Wikipedia — Molar mass, with the definition as the mass of one mole in grams per mole, the sum of the atomic weights of the atoms in the formula, and the link between molar mass and the mole.
IUPAC — Atomic Weights of the Elements 2021, the Commission on Isotopic Abundances and Atomic Weights table, with the conventional standard atomic weights and the intervals for elements whose atomic weights vary in nature.
OpenStax — Formula Mass and the Mole Concept, Chemistry 2e section 3.1, with formula mass as the sum of the average atomic masses of all the atoms in the formula, and the mole as 6.02214076 times 10 to the power 23 entities.
Wikipedia — Standard atomic weight, with the conventional values used when an element has an interval, and the list of elements with interval atomic weights.
Khan Academy — Molar mass, with the worked method of multiplying each element’s atomic mass by its count and adding the results.
This calculator works out molar mass from the formula you enter, using the IUPAC 2021 conventional standard atomic weights, and it is for study, lab preparation and stoichiometry only. The values are conventional, not measured for your particular sample: several elements have atomic weights that vary with their source in nature, so a real sample can differ in the last decimal places, and isotope enriched or depleted material can differ much more. Hydrates and charges are not supported, so do not enter them, and check the formula you typed before using a result in the lab, because a wrong formula gives a wrong molar mass with no warning beyond the parse check. For analytical work, confirm the atomic weights against the current IUPAC table and your own lab standard.
Last updated: 29 November 2026
ADVERTISEMENT
ADVERTISEMENT