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.
Brackets and hydrate dots are supported — try Ca(OH)₂ or CuSO₄·5H₂O. Subscript digits work too.
| Element | Count | Atomic mass | Subtotal | % by mass |
|---|
Before the arithmetic, the thing that goes wrong most often — and it is a reading error, not a maths error.
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:
| Formula | Correct | If brackets ignored | Error |
|---|---|---|---|
| Ca(OH)₂ | 74.09 | 57.09 | 23% low |
| Mg(NO₃)₂ | 148.31 | 86.31 | 42% low |
| Al₂(SO₄)₃ | 342.13 | 150.03 | 56% low |
| Ca₃(PO₄)₂ | 310.17 | 215.21 | 31% low |
Three steps, and the calculator above shows all of them.
Taking glucose, C₆H₁₂O₆:
| Element | Count | Atomic mass | Subtotal | % by mass |
|---|---|---|---|---|
| C | 6 | 12.011 | 72.066 | 40.00% |
| H | 12 | 1.008 | 12.096 | 6.71% |
| O | 6 | 15.999 | 95.994 | 53.28% |
| Total | 180.156 | 100% | ||
Some compounds crystallise with water built into the structure. The dot is not a multiplication sign — it means "and this much water as well".
| Hydrate | Anhydrous | With water | Water as % of mass |
|---|---|---|---|
| CuSO₄·5H₂O | 159.61 | 249.68 | 36.1% |
| MgSO₄·7H₂O | 120.36 | 246.47 | 51.2% |
| Na₂CO₃·10H₂O | 105.99 | 286.14 | 62.9% |
| CaCl₂·2H₂O | 110.98 | 147.01 | 24.5% |
Three terms for closely related ideas, used interchangeably in practice and distinguished carefully in exams.
| Term | What it is | Units |
|---|---|---|
| Molecular weight | Mass of one molecule relative to a carbon-12 atom | None — it is a ratio |
| Molar mass | Mass of one mole of the substance | g/mol |
| Formula weight | Same sum, used where there is no discrete molecule | None, or g/mol as molar mass |
| Relative molecular mass (Mr) | The formal name for molecular weight | None |
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.
| Compound | Formula | g/mol |
|---|---|---|
| Water | H₂O | 18.015 |
| Carbon dioxide | CO₂ | 44.009 |
| Oxygen | O₂ | 31.998 |
| Nitrogen | N₂ | 28.014 |
| Ammonia | NH₃ | 17.031 |
| Methane | CH₄ | 16.043 |
| Sodium chloride | NaCl | 58.440 |
| Sodium bicarbonate | NaHCO₃ | 84.006 |
| Sulfuric acid | H₂SO₄ | 98.072 |
| Calcium carbonate | CaCO₃ | 100.086 |
| Ethanol | C₂H₅OH | 46.069 |
| Acetic acid | CH₃COOH | 60.052 |
| Glucose | C₆H₁₂O₆ | 180.156 |
| Sucrose | C₁₂H₂₂O₁₁ | 342.297 |
| Octane | C₈H₁₈ | 114.232 |
| Calcium hydroxide | Ca(OH)₂ | 74.092 |
Seeing them side by side makes the pattern obvious — bigger molecules mean fewer moles per gram, which matters when weighing out reagents.
| Compound | g/mol | Relative size | 1 g contains |
|---|---|---|---|
| Hydrogen (H₂) | 2.016 | 0.496 mol | |
| Water | 18.015 | 0.0555 mol | |
| Ethanol | 46.069 | 0.0217 mol | |
| Sodium chloride | 58.440 | 0.0171 mol | |
| Glucose | 180.156 | 0.00555 mol | |
| Caffeine | 194.194 | 0.00515 mol | |
| Sucrose | 342.297 | 0.00292 mol |
Molar mass is the bridge between what you can weigh and what a reaction actually needs.
| Task | Working |
|---|---|
| Make 500 mL of 0.1 M NaCl | 0.5 L × 0.1 mol/L = 0.05 mol → 0.05 × 58.44 = 2.92 g |
| Make 1 L of 0.25 M glucose | 0.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 pentahydrate | 0.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.
A rough division that is useful in practice and blurry at the edges.
| Organic | g/mol | Inorganic | g/mol |
|---|---|---|---|
| Methane CH₄ | 16.043 | Water H₂O | 18.015 |
| Ethanol C₂H₅OH | 46.069 | Ammonia NH₃ | 17.031 |
| Acetic acid CH₃COOH | 60.052 | Sodium chloride NaCl | 58.440 |
| Benzene C₆H₆ | 78.114 | Sulfuric acid H₂SO₄ | 98.072 |
| Glucose C₆H₁₂O₆ | 180.156 | Calcium carbonate CaCO₃ | 100.086 |
| Caffeine C₈H₁₀N₄O₂ | 194.194 | Copper sulfate CuSO₄ | 159.609 |
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.
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.
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.