Home/Other Calculators & Tools/Molecular Weight Calculator

Molecular Weight Calculator

Free · No sign-up · Runs entirely in your browser

Calculate the molar mass of any chemical compound from its formula — brackets and hydrates included — with the element breakdown, percentage composition and step-by-step working.

Enter Chemical Formula
Search compound
Formula
Examples

Brackets and hydrate dots are supported — try Ca(OH)₂ or CuSO₄·5H₂O. Subscript digits work too.

Result
Molar mass
 
ElementCountAtomic massSubtotal% by mass
⏱️ Last reviewed: 26 July 2026 · Written and reviewed by Mohsin Iqbal under our editorial policy and calculation methodology. Atomic masses follow IUPAC standard atomic weights.
📖 Approx. 10 min read🧪 Brackets & hydrates🔄 Updated 26 July 2026

On this page

  1. The Bracket Trap
  2. How the Calculation Works
  3. Hydrates and the Dot
  4. Molecular Weight, Molar Mass and Formula Weight
  5. Common Compounds
  6. Comparing Molar Masses
  7. Using It in the Lab
  8. Organic and Inorganic
  9. Common Mistakes
  10. Frequently Asked Questions
  11. The Arithmetic Is Easy, the Reading Is Not

🔑 Key Takeaways

The Bracket Trap

Before the arithmetic, the thing that goes wrong most often — and it is a reading error, not a maths error.

Ca(OH)₂

✗  Ca + O + H₂  → 57.09  (wrong)
✓  Ca + (O + H) × 2 → 74.09

The subscript after a closing bracket multiplies everything inside it. Miss that and you lose one oxygen and one hydrogen. On larger formulas the error grows fast:

FormulaCorrectIf brackets ignoredError
Ca(OH)₂74.0957.0923% low
Mg(NO₃)₂148.3186.3142% low
Al₂(SO₄)₃342.13150.0356% low
Ca₃(PO₄)₂310.17215.2131% low
This is worth checking in any tool you use. A calculator that handles H₂O and CO₂ perfectly may still mishandle brackets, and it will not tell you — it returns a confident number that happens to be wrong. Test any molar mass calculator with Ca(OH)₂ first: if it does not give 74.09, do not trust it with anything harder.

How the Calculation Works

Three steps, and the calculator above shows all of them.

1. Count each element, expanding brackets and hydrates
2. Multiply each count by that element's atomic mass
3. Add the subtotals

Taking glucose, C₆H₁₂O₆:

ElementCountAtomic massSubtotal% by mass
C612.01172.06640.00%
H121.00812.0966.71%
O615.99995.99453.28%
Total180.156100%
Glucose is 53% oxygen by mass despite having the same number of oxygen atoms as carbon — because each oxygen is a third heavier again than each carbon. Atom counts and mass fractions are different things, and confusing them is a common source of error in composition problems.

Hydrates and the Dot

Some compounds crystallise with water built into the structure. The dot is not a multiplication sign — it means "and this much water as well".

CuSO₄·5H₂O

CuSO₄  = 159.61
5 × H₂O = 5 × 18.015 = 90.08
Total   = 249.68 g/mol
HydrateAnhydrousWith waterWater as % of mass
CuSO₄·5H₂O159.61249.6836.1%
MgSO₄·7H₂O120.36246.4751.2%
Na₂CO₃·10H₂O105.99286.1462.9%
CaCl₂·2H₂O110.98147.0124.5%
This matters when weighing out a solution. Washing soda, Na₂CO₃·10H₂O, is nearly 63% water by mass — so weighing the hydrate as though it were anhydrous sodium carbonate gives you well under half the intended amount. Always check whether a reagent bottle says anhydrous or names a hydrate, because the label decides which molar mass you use.

Molecular Weight, Molar Mass and Formula Weight

Three terms for closely related ideas, used interchangeably in practice and distinguished carefully in exams.

TermWhat it isUnits
Molecular weightMass of one molecule relative to a carbon-12 atomNone — it is a ratio
Molar massMass of one mole of the substanceg/mol
Formula weightSame sum, used where there is no discrete moleculeNone, or g/mol as molar mass
Relative molecular mass (Mr)The formal name for molecular weightNone

The number is identical in every case — water is 18.015 whichever term you use. What changes is whether it carries units and whether "molecule" is the right word.

Why sodium chloride has a formula weight rather than a molecular weight. NaCl is an ionic lattice, not a collection of NaCl molecules — there is no discrete particle containing one sodium and one chlorine. So 58.44 is the formula weight, calculated from the empirical formula, and the same figure works as its molar mass. In casual use nobody minds the distinction; in a chemistry exam, they might.

Common Compounds

CompoundFormulag/mol
WaterH₂O18.015
Carbon dioxideCO₂44.009
OxygenO₂31.998
NitrogenN₂28.014
AmmoniaNH₃17.031
MethaneCH₄16.043
Sodium chlorideNaCl58.440
Sodium bicarbonateNaHCO₃84.006
Sulfuric acidH₂SO₄98.072
Calcium carbonateCaCO₃100.086
EthanolC₂H₅OH46.069
Acetic acidCH₃COOH60.052
GlucoseC₆H₁₂O₆180.156
SucroseC₁₂H₂₂O₁₁342.297
OctaneC₈H₁₈114.232
Calcium hydroxideCa(OH)₂74.092

Comparing Molar Masses

Seeing them side by side makes the pattern obvious — bigger molecules mean fewer moles per gram, which matters when weighing out reagents.

Compoundg/molRelative size1 g contains
Hydrogen (H₂)2.0160.496 mol
Water18.0150.0555 mol
Ethanol46.0690.0217 mol
Sodium chloride58.4400.0171 mol
Glucose180.1560.00555 mol
Caffeine194.1940.00515 mol
Sucrose342.2970.00292 mol
Sucrose is exactly one water molecule short of two glucoses. Two glucose units at 180.156 each would be 360.312, and sucrose is 342.297 — a difference of 18.015, precisely one water. That is the condensation reaction that joined them, and the arithmetic shows it directly.

Using It in the Lab

Molar mass is the bridge between what you can weigh and what a reaction actually needs.

mass (g) = moles × molar mass
moles = mass (g) ÷ molar mass
TaskWorking
Make 500 mL of 0.1 M NaCl0.5 L × 0.1 mol/L = 0.05 mol → 0.05 × 58.44 = 2.92 g
Make 1 L of 0.25 M glucose0.25 mol × 180.156 = 45.04 g
How many moles in 10 g of CaCO₃?10 ÷ 100.086 = 0.0999 mol
Make 250 mL of 0.5 M CuSO₄ from the pentahydrate0.125 mol × 249.68 = 31.21 g — not 19.95 g

That last row is the hydrate trap in practice. Using the anhydrous molar mass with a hydrated reagent gives a solution roughly a third too dilute. Our molarity calculator handles the concentration side of these calculations.

Organic and Inorganic

A rough division that is useful in practice and blurry at the edges.

Organicg/molInorganicg/mol
Methane CH₄16.043Water H₂O18.015
Ethanol C₂H₅OH46.069Ammonia NH₃17.031
Acetic acid CH₃COOH60.052Sodium chloride NaCl58.440
Benzene C₆H₆78.114Sulfuric acid H₂SO₄98.072
Glucose C₆H₁₂O₆180.156Calcium carbonate CaCO₃100.086
Caffeine C₈H₁₀N₄O₂194.194Copper sulfate CuSO₄159.609
The boundary is a convention, not a rule. Organic chemistry is broadly the chemistry of carbon-hydrogen compounds, but several carbon-containing substances are traditionally classed as inorganic — carbon dioxide, carbonates such as CaCO₃, cyanides and carbides among them. The distinction reflects how the disciplines developed rather than any sharp chemical line, and the molar mass calculation is identical either way.

One pattern is worth noticing: organic molecules tend to have more atoms but lighter ones, so their molar masses climb through the addition of many carbons and hydrogens rather than a few heavy atoms. Caffeine has 24 atoms and comes to 194; copper sulfate has 6 and comes to 160.

Common Mistakes

  1. Ignoring a bracket multiplier. The subscript after a closing bracket applies to everything inside. Al₂(SO₄)₃ comes out 56% low if you miss it.
  2. Using the anhydrous molar mass for a hydrate. Check the reagent label — Na₂CO₃·10H₂O is 63% water by mass.
  3. Confusing atom counts with mass fractions. Glucose has equal carbon and oxygen atoms but is 53% oxygen by mass.
  4. Case errors in symbols. Co is cobalt; CO is carbon monoxide. Capitalisation is part of the symbol, not styling.
  5. Rounding atomic masses too early. Using C = 12 rather than 12.011 shifts a large organic molecule noticeably.
  6. Forgetting an element that appears twice. In CH₃COOH the carbons and oxygens are written apart but must be summed — two of each.
  7. Trusting a calculator you have not tested. Try Ca(OH)₂. If it does not return 74.09, it is mishandling brackets.

Frequently Asked Questions

What is molecular weight?

The mass of one molecule expressed relative to a carbon-12 atom, so it is a ratio with no units. Numerically it equals the molar mass in grams per mole, which is why the two terms are so often used interchangeably.

How do you calculate molecular weight?

Count how many atoms of each element the formula contains, multiply each count by that element's atomic mass, and add the results. For water: two hydrogens at 1.008 plus one oxygen at 15.999 gives 18.015. The only real difficulty is reading brackets and hydrates correctly.

Is molecular weight the same as molar mass?

Numerically yes, but they are different quantities. Molecular weight is a dimensionless ratio comparing one molecule to a carbon-12 atom. Molar mass is the mass of one mole in grams per mole. Water is 18.015 either way — one carries units and the other does not.

What is formula weight?

The same sum applied to a substance that has no discrete molecules, such as an ionic compound. Sodium chloride is a lattice rather than a set of NaCl molecules, so 58.44 is properly its formula weight. The arithmetic is identical to a molecular weight calculation.

What is the molecular weight of water?

18.015 g/mol — two hydrogens at 1.008 each plus one oxygen at 15.999. Water is 88.8% oxygen by mass despite having twice as many hydrogen atoms, because oxygen is roughly sixteen times heavier per atom.

What is the molar mass of glucose?

180.156 g/mol for C₆H₁₂O₆. It breaks down as 72.066 from carbon, 12.096 from hydrogen and 95.994 from oxygen, making glucose about 40% carbon, 6.7% hydrogen and 53.3% oxygen by mass.

How do brackets work in a chemical formula?

A subscript after a closing bracket multiplies everything inside it. Ca(OH)₂ contains one calcium, two oxygens and two hydrogens, giving 74.09 g/mol. Ignoring the multiplier is the single most common calculation error, and it grows worse with larger groups — Al₂(SO₄)₃ comes out 56% low.

What does the dot mean in CuSO₄·5H₂O?

It indicates a hydrate — water molecules built into the crystal structure. The coefficient before H₂O tells you how many, so copper sulfate pentahydrate is CuSO₄ plus five waters: 159.61 + 90.08 = 249.68 g/mol. The dot is not multiplication.

Why does the hydrate matter when making a solution?

Because you weigh the whole crystal, water included. Copper sulfate pentahydrate is 36% water by mass, so using the anhydrous figure of 159.61 instead of 249.68 gives a solution about a third too dilute. Washing soda is worse at nearly 63% water.

What units does molar mass use?

Grams per mole, written g/mol. Molecular weight and relative molecular mass are dimensionless ratios and take no units, though the numeric value is the same. In practice most sources write g/mol regardless of which term they use.

What is atomic mass?

The mass of an atom of an element, averaged over its naturally occurring isotopes and weighted by abundance. This is why values are not whole numbers — chlorine is 35.45 because natural chlorine is a mix of chlorine-35 and chlorine-37.

Why is chlorine 35.45 and not 35?

Because standard atomic weights are abundance-weighted averages across isotopes. Natural chlorine is roughly three-quarters chlorine-35 and one-quarter chlorine-37, and averaging gives 35.45. Using a whole number introduces error that compounds in larger formulas.

How do I find percentage composition?

Divide each element's mass contribution by the total molar mass. In carbon dioxide, carbon contributes 12.011 out of 44.009, which is 27.3%, and oxygen the remaining 72.7%. The calculator above shows these percentages alongside the subtotals.

How is molar mass used in stoichiometry?

It converts between mass, which you can weigh, and moles, which reaction equations are written in. Divide a mass by the molar mass to get moles, apply the equation's ratios, then multiply back by the molar mass of the product to predict its mass.

How many grams do I need for a 0.1 M solution?

Multiply the volume in litres by the concentration to get moles, then multiply by the molar mass. For 500 mL of 0.1 M sodium chloride: 0.5 × 0.1 = 0.05 mol, and 0.05 × 58.44 gives 2.92 g. Check whether your reagent is a hydrate before weighing.

Does capitalisation matter in chemical formulas?

Very much. Co is cobalt while CO is carbon monoxide, and Cs is caesium while CS would read as carbon and sulfur. Element symbols are one capital optionally followed by one lowercase letter, and the calculator above treats case as meaningful rather than cosmetic.

Can I enter subscript characters?

Yes. The calculator accepts H₂O with proper subscript digits as well as H2O typed normally, and it handles square brackets, asterisks in place of hydrate dots, and spaces within a formula.

What is the difference between organic and inorganic compounds?

Organic chemistry broadly covers carbon-hydrogen compounds, and inorganic covers the rest — but the line is a historical convention rather than a rule. Carbon dioxide, carbonates, cyanides and carbides all contain carbon and are traditionally classed as inorganic. Molar mass is calculated the same way regardless.

Why is sucrose not simply twice glucose?

Because a water molecule is lost when the two sugar units join. Two glucose molecules at 180.156 each would total 360.312, while sucrose is 342.297 — exactly 18.015 less, which is one water. That is the condensation reaction visible in the arithmetic.

Can I export the element breakdown?

Yes. The calculator offers a CSV download that opens directly in Excel or Google Sheets, and a copy-table option that pastes as tab-separated columns. There is also a print button for a clean paper copy of the working.

Why is molecular weight important?

Because reactions happen in whole-number ratios of particles, but laboratories work in grams. Molar mass is the conversion between the two, which makes it fundamental to preparing solutions, calculating yields, working out dosages and interpreting any quantitative chemistry.

The Arithmetic Is Easy, the Reading Is Not

Adding atomic masses is straightforward. What goes wrong is interpreting the formula — a bracket multiplier missed, a hydrate treated as anhydrous, an element counted once when it appears twice.

Those errors are also silent. Nothing about a wrong molar mass looks wrong; it is a plausible number that quietly ruins whatever comes after it. Which is why the calculator above shows every step and every element count, rather than just a total.

For the concentration side of solution work, use the molarity calculator. For density and volume relationships, the density calculator.

🧪 Related Tools

Molecular Weight Calculator — molar mass from any formula (this page) Molarity Calculator — concentration, moles and volume Density Calculator — density, mass or volume Mass Calculator — mass from material and dimensions Unit Converter — all measurement categories Weight Converter — grams, kilograms and ounces Volume Converter — millilitres, litres and cubic centimetres Scientific Notation Calculator — very large and small numbers Percentage Calculator — composition and yield percentages

📋 References & Further Reading

IUPAC — Periodic table and standard atomic weights NIST — Atomic weights and isotopic compositions Royal Society of Chemistry — Interactive periodic table OpenStax Chemistry 2e — Open textbook