Audited 27 Jul 2026·Last updated 28 Oct 2026·6 citations·Tier 1·0 uses

Molar Mass Calculator

Find the molar mass in g/mol of any formula, brackets and hydrates included, from IUPAC atomic weights, then convert grams to moles or moles to grams.

Molar Mass Calculator

Use the standard Hill / IUPAC formula notation. Element symbols are case-sensitive (Co is cobalt, CO is carbon monoxide). Group multiplied subgroups in parentheses, e.g. Ca(OH)2 or Al2(SO4)3.
Optional. If you enter a sample mass in grams, the calculator returns the equivalent number of moles using moles = mass / molar mass. Leave at 0 to skip.
g
Optional. If you enter an amount in moles, the calculator returns the equivalent mass in grams using mass = moles × molar mass. Leave at 0 to skip.
mol
Molar mass
18.015
Mass of one mole of the substance in grams per mole, summed from IUPAC conventional atomic weights.
Total atoms per formula unit
3
Distinct elements
2
Moles in your sample
0 mol
Mass in your sample
0 g

Background.

Chemists count molecules by weighing them. A balanced equation says one glucose molecule burns with six of oxygen, but nobody can pick molecules out one at a time; what anyone can do is set a beaker on a balance. Molar mass is the exchange rate between the two descriptions: the mass in grams of one mole, 6.02214076 × 10²³ particles, of a substance. Water's is 18.015 g/mol, so 18 grams of water holds very nearly a mole of molecules. Glucose's is 180.156 g/mol, so a single gram of sugar holds about 3.343 × 10²¹ of them.

Working it out is bookkeeping. Read the formula, count the atoms of each element, multiply each count by that element's standard atomic weight and add the results. The weights used here are IUPAC's conventional values — hydrogen 1.008, carbon 12.011, oxygen 15.999, chlorine 35.45 — for all 84 elements that have one, hydrogen through uranium. Elements with no stable isotopes and no characteristic natural composition, such as technetium, radon and plutonium, have no standard atomic weight and are not accepted.

Most wrong answers come from misreading the formula rather than from the arithmetic. Symbols are case-sensitive, so Co is cobalt at 58.933 g/mol while CO is carbon monoxide at 28.01. A number after a closing bracket multiplies everything inside it: Ca(OH)2 holds two oxygens and two hydrogens. And the water in a hydrate belongs to the formula. Blue copper sulfate pentahydrate is 249.677 g/mol against 159.602 for the anhydrous salt, so weighing the crystals with the anhydrous figure leaves a solution 36% short of copper.

Once the molar mass is known, the two optional fields turn it into a conversion: a sample mass in grams becomes moles, or an amount in moles becomes the grams to weigh out.

What is molar mass calculator?

Molar mass is the mass of a substance divided by its amount of substance, M = m ÷ n, normally given in grams per mole. Since the 2019 revision of the SI, the mole is defined by fixing the Avogadro constant at exactly 6.02214076 × 10²³ per mole, so one mole is that many specified entities: molecules for water, formula units for an ionic solid such as sodium chloride, atoms for a metal. A compound's molar mass is the sum of its atoms' contributions. Because standard atomic weights average each element's isotopes in their natural proportions, the result describes ordinary material, a bottle of reagent or a glass of water, rather than any single molecule. The same number travels under other names: molecular weight, formula weight and relative molecular mass are dimensionless versions of it, and a molecule's mass in daltons has the same numerical value. That conversion is what makes a balanced equation usable at the bench. C6H12O6 + 6 O2 → 6 CO2 + 6 H2O is a statement about molecules; through molar masses it becomes one about grams, so 1 g of glucose burns with 1.066 g of oxygen to give 1.466 g of carbon dioxide and 0.600 g of water, and the masses on each side balance.

How to use this calculator.

  1. Type the formula into Chemical formula as a textbook prints it, with no spaces, charges or state symbols: H2O, NaHCO3, C8H10N4O2. Capitalize the first letter of each symbol and only the first. Condensed structural formulas work too, because repeated elements are pooled: CH3CH2OH gives the same 46.069 g/mol as C2H6O.
  2. Use round brackets for groups and put the multiplier straight after the closing bracket: Al2(SO4)3, Ca(OH)2. Groups can nest, but square brackets are not read, so write K3[Fe(CN)6] as K3(Fe(CN)6).
  3. For a hydrate, fold the water in as a bracketed group — CuSO4·5H2O becomes CuSO4(H2O)5 — because the raised dot and a leading coefficient such as 5H2O are rejected.
  4. To turn a weighed amount into moles, put its mass in grams in Mass of sample; to find how much to weigh, put the moles you need in Amount of sample. Leave either at 0 to skip it, or fill both at once.
  5. Check the total atom count before relying on the molar mass. C6H12O6 should show 24 atoms and Ca(OH)2 should show 5; a different count means the formula was read differently from what you meant.

The formula.

Mm = Σ (n × A)

Mm = Σ n × A. For each element in the formula, multiply its atom count n by its standard atomic weight A in g/mol, then add the products. Counts inside brackets are multiplied by the number after the closing bracket before joining the total, and an element written in more than one place is pooled: acetic acid typed as CH3COOH is read as two carbons, four hydrogens and two oxygens, 60.052 g/mol.

The formula has to be the molecular formula, not the simplest ratio of atoms. Glucose's empirical formula, CH2O, gives 30.026 g/mol, exactly one sixth of 180.156. Chemists use that relationship in reverse to identify unknowns: combustion analysis yields the empirical formula, a separate measurement gives the molar mass, and a CH2O compound measured near 180 g/mol must have the molecular formula C6H12O6.

The atomic weights are IUPAC's conventional values, quoted to about five significant figures: hydrogen 1.008, carbon 12.011, nitrogen 14.007, oxygen 15.999. For hydrogen, carbon, oxygen, chlorine and several other elements, IUPAC's Commission on Isotopic Abundances and Atomic Weights publishes an interval rather than one number, because isotope ratios differ between natural sources; hydrogen runs from 1.00784 to 1.00811. The conventional value is a representative point inside that interval. Putting either end of the hydrogen interval into glucose moves its molar mass only between 180.154 and 180.157 g/mol, well below anything a laboratory balance can resolve.

The conversions come straight from the definition M = m ÷ n. Moles from a mass: n = m ÷ M. Mass from an amount: m = n × M, so 2 mol of sodium chloride weighs 2 × 58.44 = 116.88 g.

Averaged atomic weights set two limits. Isotopically labelled compounds, such as heavy water or carbon-13 tracers, need the masses of specific isotopes, and the symbol D for deuterium is not recognised. And a mass spectrometer weighs individual isotopic species, so the main peak it reports for glucose is the monoisotopic mass, 180.0634, rather than 180.156.

A worked example.

Example

Glucose, C6H12O6, with 1 g entered as the sample mass. The formula holds 6 carbon, 12 hydrogen and 6 oxygen atoms, which is 24 atoms of 3 elements. Carbon contributes 6 × 12.011 = 72.066 g/mol, hydrogen 12 × 1.008 = 12.096 g/mol and oxygen 6 × 15.999 = 95.994 g/mol. The sum, 72.066 + 12.096 + 95.994, is 180.156 g/mol. One gram is therefore 1 ÷ 180.156 = 5.551 × 10⁻³ mol, or 5.551 millimoles; the moles line rounds it to 0.0056. Multiplying by the Avogadro constant, 5.551 × 10⁻³ × 6.02214076 × 10²³, gives about 3.343 × 10²¹ glucose molecules in that gram. The same molar mass runs the other way when making up a solution. A 250 mL flask of 0.5 mol/L glucose needs 0.5 × 0.250 = 0.125 mol, and 0.125 × 180.156 = 22.5195 g, which a two-decimal balance reads as 22.52 g. Carbon's share of the mass, 72.066 ÷ 180.156, is 40.00%, a figure glucose shares with every compound whose simplest formula is CH2O.

mass1
formulaC6H12O6
moles0

Frequently asked questions.

My textbook lists glucose as 180.16 g/mol. Which figure is right?
Both. Most textbooks round to two decimals, and 180.156 rounds to 180.16. Older tables also listed oxygen as 16.00, which gives 6 × 12.011 + 12 × 1.008 + 6 × 16.00 = 180.162. The gap is about one part in 30,000, far smaller than the weighing error of an ordinary laboratory balance, so either value gives the same solution in practice.
Is molar mass the same thing as molecular weight?
Numerically, yes. Strictly, molecular weight (relative molecular mass, Mr) is a pure ratio: a molecule's average mass divided by one-twelfth the mass of a carbon-12 atom, with no unit. Molar mass carries the unit g/mol. Since 2019 the conversion factor between them differs from exactly 1 g/mol by less than a part per billion. For salts, which form lattices rather than molecules, formula weight is the more precise name.
How do I enter a hydrate such as copper sulfate pentahydrate?
Write the water as a bracketed group with its count after it: CuSO4(H2O)5, which returns 249.677 g/mol and 21 atoms. Leaving the water out gives 159.602 g/mol, the anhydrous salt. Check the bottle label before weighing, since the same compound is often sold both ways, and the waters of crystallization are part of every gram the balance shows.
Why do aspirin and glucose give almost the same molar mass?
Because different formulas can add up to nearly the same total. Aspirin, C9H8O4, comes to 180.159 g/mol and glucose, C6H12O6, to 180.156, a difference of 0.003. Isomers go further: fructose and glucose share the formula C6H12O6 exactly, so their molar masses are identical. Molar mass describes a formula, and it cannot tell you which compound is in the bottle.
Is g/mol the same as daltons or atomic mass units?
The numbers match. A dalton is one-twelfth the mass of a carbon-12 atom, so a molecule's mass in daltons equals its molar mass in grams per mole to better than a part per billion. That is why biochemists can describe a 50 kDa protein and mean 50,000 g/mol. The difference is scale: daltons describe one molecule, g/mol a mole of them.
What happens if I type a formula in capitals, like NI or CS?
Sometimes an error, sometimes a quietly wrong answer. NA fails because A is not a symbol, but NI reads as nitrogen plus iodine, 140.907 g/mol, when nickel is 58.693. CS becomes carbon plus sulfur, 44.071 instead of cesium's 132.91, and HF is hydrogen fluoride rather than hafnium. Write the second letter of a symbol in lower case.
Can I calculate heavy water or an isotope-labelled compound?
Not with standard atomic weights. They average each element's natural isotopes, while a labelled compound deliberately changes the mix, and the symbol D is not recognised. Heavy water, D2O, needs deuterium's own mass of about 2.0141: two of those plus oxygen's 15.999 gives about 20.027 g/mol, roughly 11% more than ordinary water's 18.015.
How many grams do I need for a solution of a given molarity?
Multiply molarity by volume in litres to get moles, then by molar mass to get grams. For 500 mL of 0.1 mol/L sodium chloride, 0.1 × 0.5 = 0.05 mol and 0.05 × 58.44 = 2.922 g. Dissolve it in part of the water and fill a volumetric flask to the mark, rather than adding 500 mL of water, because the dissolved salt takes up volume too. If the bottle holds a hydrate, use the hydrate's figure: 0.05 mol of copper sulfate pentahydrate is 12.484 g, not the 7.980 g the anhydrous molar mass would suggest.
Does the source of a sample change its molar mass?
Very slightly. Isotope ratios vary in nature: water from different sources carries different proportions of deuterium and oxygen-18, which is why IUPAC gives hydrogen's atomic weight as a range. For bench chemistry the effect is a few parts in 100,000 for a compound such as glucose and can be ignored. For isotope geochemistry and forensic work tracing where a sample came from, that variation is the measurement itself.
Which elements can't be entered?
Those without a standard atomic weight: technetium, promethium, and polonium onward to actinium, plus everything after uranium, including plutonium. Their isotopes are all radioactive and have no characteristic natural composition, so no average applies; for them you would use the mass of the specific isotope in hand, about 239.05 for plutonium-239, for example. Thorium, protactinium and uranium are included because they occur in nature with a characteristic isotopic composition.

References& sources.

  1. [1]Meija, J. et al. (2021). 'Atomic weights of the elements 2021 (IUPAC Technical Report)'. Pure and Applied Chemistry 93(5), 573–600 — the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW) authoritative reference for standard atomic weights, including the 14 interval-valued elements and the abridged 'conventional atomic weights' used in this calculator.
  2. [2]Tiesinga, E. et al. (2021). 'CODATA recommended values of the fundamental physical constants: 2018'. Reviews of Modern Physics 93(2), 025010 — the CODATA 2018 adjustment, including the redefinition of Avogadro's constant as exactly 6.02214076 × 10²³ /mol and the resulting status of the molar-mass constant.
  3. [3]NIST Chemistry WebBook — searchable database of molar masses, thermochemistry, vapour pressures, and spectroscopy for over 100,000 compounds. The canonical primary source for double-checking the molar mass of an unfamiliar reagent. National Institute of Standards and Technology, Standard Reference Database 69.
  4. [4]IUPAC Gold Book, 'amount of substance, n' — the formal IUPAC definition of the mole and amount of substance, including the 2019 SI redefinition in which Avogadro's constant becomes exactly 6.02214076 × 10²³ /mol. International Union of Pure and Applied Chemistry.
  5. [5]Atkins, P. W. & de Paula, J. (2014). Atkins' Physical Chemistry, 10th ed. Oxford University Press — Foundations and Chapter 1 on amount of substance, molar quantities, the mole concept, and the distinction between average molar mass and monoisotopic mass.
  6. [6]BIPM (2019). The International System of Units (SI), 9th ed. — the official 2019 SI brochure documenting the redefinition of the kilogram, mole, ampere, and kelvin in terms of fixed fundamental constants. Bureau International des Poids et Mesures.

How this page was produced

Published by
Quanta Calculator
Primary sources
6 cited below
Method
Mm = Σ (n × A)
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon