Find the molecular weight of any molecule with this mol weight calculator. Type a chemical formula like H2O or C6H12O6 and get its molar weight in g/mol.
Molecular Weight Calculator
Parse any chemical formula — brackets, hydrates and all — into its molar mass, element breakdown, moles and molarity.
Enter your values
Fill in the fields below — the result appears with every step shown.
Your result will appear here
Enter your values above, then press Calculate — or press Enter in any field.TinyExe · Molecular Weight Result
Calculated locally in your browser
—
Name
—
Chemical formula
—
Sample mass (optional)
—
Solution volume (optional)
—
How this was calculated
What to do next
TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.
Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.
The short answer
To find a molecular weight, count every atom in the formula, multiply each element count by its standard atomic weight, and add the results: water H2O is two hydrogens at 1.008 plus one oxygen at 15.999, totalling 18.015 grams per mole. Bracketed groups multiply everything inside, and hydrate dots add whole water molecules.
- Symbols are case-sensitive IUPAC: Co is cobalt, CO is carbon monoxide
- Brackets multiply their contents: Ca(OH)2 has two O and two H
- Hydrate water counts in full: CuSO4.5H2O totals 249.677 g/mol
Common compounds and molar masses
Reference values for this calculator.
| Compound | Formula | Molar mass |
|---|---|---|
| Water | H2O | 18.015 g/mol |
| Sodium chloride | NaCl | 58.440 g/mol |
| Glucose | C6H12O6 | 180.156 g/mol |
| Sulfuric acid | H2SO4 | 98.079 g/mol |
| Calcium hydroxide | Ca(OH)2 | 74.092 g/mol |
| Copper(II) sulfate pentahydrate | CuSO4.5H2O | 249.677 g/mol |
The formula
The exact formula this calculator uses — every variable in it is explained in the card below.
The formula
Ideas enhancement matching and extending the live TinyExe tool: the parser handles nested round and square brackets, hydrate parts after a dot (CuSO4.5H2O), reports mass-percent composition, and converts an optional sample mass and volume into moles, molarity and molecule counts in the steps.
Worked examples
Worked examples with the full working shown — try them in the calculator to check.
Example 1
Water
Formula H2O
| Calculation | Steps |
|---|---|
| 2 x H (1.008) = 2.016, plus 1 x O (15.999) = 15.999. Total 2.016 + 15.999 = 18.015 g/mol; hydrogen is 11.19% of the mass, oxygen 88.81%. | H2O = 18.015 g/mol. |
Result
Example 2
Glucose with a sample mass
Formula C6H12O6, sample 90.08 g in 0.5 L
| Calculation | Steps |
|---|---|
| 6 x 12.011 + 12 x 1.008 + 6 x 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol. Moles = 90.08 / 180.156 = 0.50 mol; molarity = 0.50 / 0.5 = 1.00 mol/L. | C6H12O6 = 180.156 g/mol; the sample is 0.50 mol, a 1.00 M solution. |
Result
Example 3
A hydrate: copper sulfate crystals
Formula CuSO4.5H2O
| Calculation | Steps |
|---|---|
| Cu 63.546 + S 32.06 + 4 x O 63.996 = 159.602 for the CuSO4 part, plus 5 x 18.015 = 90.075 of crystal water. Total 249.677 g/mol. | CuSO4.5H2O = 249.677 g/mol. |
Result
How to use this calculator
Step 1
Type the chemical formula with correct capitalisation, for example C6H12O6 or Ca(OH)2.
Step 2
Use brackets for repeated groups and a dot plus a number for hydrate water, as in CuSO4.5H2O.
Step 3
Optionally enter a sample mass in grams to also get the amount in moles.
Step 4
Optionally enter a solution volume in litres to also get the molarity.
Step 5
Press Calculate to see the molar mass, element counts and mass-percent composition.
Frequently asked questions
How do you calculate molar mass?
Add up the standard atomic weights of every atom in the formula, multiplying each element's weight by how many atoms of it appear. Water is 2 x 1.008 for hydrogen plus 15.999 for oxygen, giving 18.015 g/mol.
Why does capitalisation matter in a formula?
Element symbols are case-sensitive: Co is cobalt, while CO is carbon monoxide (one carbon plus one oxygen). This parser follows IUPAC symbols exactly, like the live TinyExe tool.
How are brackets in Ca(OH)2 handled?
Everything inside the brackets is multiplied by the number after them, so Ca(OH)2 contains one calcium, two oxygen and two hydrogen atoms. Square brackets work the same way for complex ions.
What does the dot in CuSO4.5H2O mean?
It marks water of crystallisation: the crystal contains five water molecules per formula unit. Those five waters add 5 x 18.015 = 90.075 g/mol, taking the total to 249.677 g/mol.
Is molecular weight the same as molar mass?
Numerically yes for most school and lab work: molecular weight in daltons per molecule equals molar mass in grams per mole. Strictly, molar mass (g/mol) is the quantity used for weighing out samples.
About this calculator
A molecular weight calculator reads a chemical formula, counts the atoms of each element — including atoms hidden inside brackets and hydrate water — and adds their standard atomic weights to give the molar mass in grams per mole. With an optional sample mass it also converts grams to moles, and with a volume, to molarity.
Every element has a standard atomic weight set by IUPAC from its natural isotope mix: hydrogen 1.008, carbon 12.011, oxygen 15.999. A molar mass is just the weighted shopping list of the formula: glucose C6H12O6 is 6 carbons, 12 hydrogens and 6 oxygens, totalling 180.156 g/mol.
Brackets and hydrate dots are where hand calculations go wrong. In Ca(OH)2 the subscript 2 applies to both the O and the H inside the brackets, and in CuSO4.5H2O the '5H2O' is part of the crystal and must be counted: forgetting the waters understates the mass by 90.075 g/mol, a 36% weighing error.
Case matters. Cobalt (Co) is a single metal atom weighing 58.933; carbon monoxide (CO) is two atoms totalling 28.010. The parser is case-sensitive exactly so these stay distinct, matching the live TinyExe tool.
Use it in chemistry lessons and labs whenever a formula must be weighed out: preparing solutions of a target molarity, checking a reagent bottle calculation, converting a reaction equation into grams, or verifying the mass percent of an element in a compound.
How to calculate it yourself
Step 1
Write the formula with correct capitalisation and integer subscripts.
Step 2
Expand any brackets: multiply every element inside by the number after the closing bracket.
Step 3
Add hydrate parts: a dot followed by a count means that many extra water (or other) groups.
Step 4
Multiply each element's total atom count by its standard atomic weight.
Step 5
Add all the element contributions for the molar mass in g/mol; divide a sample mass by it for moles.
Real-life examples
Making a glucose solution for a biology practical
A technician needs 0.5 litres of 1.00 M glucose and must weigh the solid before dissolving it.
Glucose weighs 180.156 g/mol, so 0.50 mol is needed for 0.5 L at 1.00 M: 0.50 x 180.156 = 90.08 g, exactly the sample in the worked example.
Weigh out 90.08 g of glucose and make up to 0.5 L.
Why the blue crystals weigh more than expected
A student calculates copper sulfate as 159.60 g/mol but the bottle of blue crystals is the pentahydrate, and her weighed mass keeps coming out high.
The crystal formula is CuSO4.5H2O at 249.677 g/mol; each mole of crystals carries five waters. For 0.1 mol she needs 24.97 g, not 15.96 g.
Using 249.677 g/mol fixes the weighing: 0.1 mol = 24.97 g of blue crystals.
Ideas & use cases
- Solution planning: enter a formula, then your target grams, and read moles directly; combine with the volume field to check a molarity before you enter the lab.
- Hydrate detective work: if a calculated mass disagrees with a bottle label, rerun the formula with .5H2O or .7H2O added — waters of crystallisation explain most mismatches.
- Mass-percent questions: the element breakdown lets you answer 'what percent iron is in Fe2O3?' style exam questions and verify fertiliser or ore grades.
Limitations & sources
- Supported syntax: element symbols from the built-in IUPAC table (all common elements plus heavier metals), integer subscripts, nested round () and square [] brackets with multipliers, and hydrate parts written as .nH2O or with a middle dot. It does not support charges (+/- superscripts), isotope labels, decimal atom counts, or polymer (n) notation, and it reports molar mass rather than exact monoisotopic mass.
Sources: IUPAC standard atomic weights (conventional values, CIAAW); parser behaviour cross-checked against the live tinyexe.com molecular weight calculator and calculator.net molecular weight calculator
