Molar Mass Calculator
Calculate the molar mass of any compound from its chemical formula. Enter H2O, NaCl, Ca(OH)2, Fe2(SO4)3 or any formula. Handles nested parentheses. Shows element-by-element breakdown with percent composition.
Explore all Chemistry Calculators
Percent composition, percent ionic character, atom calculator and more -- all free.
Rate this tool
Why use the LazyTools Molar Mass Calculator?
Parse any chemical formula
Handles simple formulas (H2O), parenthesised groups (Ca(OH)2) and complex ionic compounds (Fe2(SO4)3).
Element-by-element breakdown
Shows each element, its count, atomic mass, contribution to total mass and percentage.
Percent composition included
The percentage by mass of each element is displayed alongside the molar mass.
10 pre-loaded examples
Water, NaCl, glucose, CO2, ammonia, sulfuric acid and more -- click to populate instantly.
Ionic compounds and hydrates
Works with ionic formula units and hydrated salts including water of crystallisation.
Free, no signup
Runs in your browser.
How to use this tool in three steps
Enter formula
Type any chemical formula in the box. Use standard notation: H2O, Ca(OH)2, Fe2(SO4)3.
Or click an example
Ten pre-loaded examples cover common compound types.
Click Calculate Molar Mass
The molar mass in g/mol and full element breakdown appear instantly.
Copy result
Click Copy for stoichiometry calculations and lab reports.
LazyTools vs other Molar Mass Calculator tools
| Feature | LazyTools | Omnicalculator | Webqc | PubChem |
|---|---|---|---|---|
| Parentheses support | YES | ✓ Yes | ✓ Yes | ✓ Yes |
| Element breakdown | YES | ✓ Yes | ✓ Yes | ✓ Yes |
| % composition | YES | ✗ No | ✓ Yes | ✓ Yes |
| Pre-loaded examples | YES | ✗ No | ✗ No | ✗ No |
| No signup | YES | ✓ Yes | ✓ Yes | ✓ Yes |
Molar masses of common compounds
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H2O | 18.015 |
| Sodium chloride | NaCl | 58.443 |
| Carbon dioxide | CO2 | 44.010 |
| Ammonia | NH3 | 17.031 |
| Glucose | C6H12O6 | 180.156 |
| Sucrose | C12H22O11 | 342.297 |
| Sulfuric acid | H2SO4 | 98.079 |
| Calcium carbonate | CaCO3 | 100.086 |
| Iron(III) sulfate | Fe2(SO4)3 | 399.873 |
| Calcium hydroxide | Ca(OH)2 | 74.093 |
| Potassium permanganate | KMnO4 | 158.034 |
| Copper sulfate pentahydrate | CuSO4.5H2O | 249.685 |
Molar Mass Calculator: Complete Chemistry Guide
The molar mass (also called molecular weight) of a substance is the mass of one mole of that substance, expressed in grams per mole (g/mol). It is calculated by summing the standard atomic weights of all atoms in the chemical formula, each multiplied by its subscript. For water H2O: M = 2(1.008) + 15.999 = 18.015 g/mol. The molar mass connects mass (measurable on a balance) to moles (the chemist's counting unit) via M = mass / moles.
How to calculate molar mass step by step
Step 1: identify each element and its subscript in the formula. Step 2: look up the standard atomic weight for each element from the periodic table. Step 3: multiply atomic weight by subscript for each element. Step 4: sum all contributions. Example: glucose C6H12O6. Carbon: 6 x 12.011 = 72.066. Hydrogen: 12 x 1.008 = 12.096. Oxygen: 6 x 15.999 = 95.994. Total: 72.066 + 12.096 + 95.994 = 180.156 g/mol. Example: iron(III) sulfate Fe2(SO4)3. Iron: 2 x 55.845 = 111.690. Sulfur: 3 x 32.065 = 96.195. Oxygen: 12 x 15.999 = 191.988. Total = 399.873 g/mol. The LazyTools calculator handles parentheses and nested groups automatically.
Molar mass and stoichiometry
Molar mass is the essential bridge between grams and moles. Moles = mass / molar mass. Mass = moles x molar mass. In a stoichiometry problem: a reaction of 10.0 g of NaOH (M = 40.00 g/mol) with HCl. Moles NaOH = 10.0 / 40.00 = 0.250 mol. Since NaOH reacts 1:1 with HCl, 0.250 mol HCl is required, which has a mass of 0.250 x 36.461 = 9.115 g. In limiting reagent problems, calculate moles of each reactant from its mass and molar mass, divide by the stoichiometric coefficient, and the smaller value identifies the limiting reagent. Molar mass is used in every quantitative chemistry calculation involving mass and amount of substance.
Empirical formula vs molecular formula vs molar mass
The empirical formula gives the simplest whole-number ratio of atoms. The molecular formula gives the actual numbers. The molar mass determines the relationship. Glucose: empirical formula CH2O (molar mass 30.026 g/mol); molecular formula C6H12O6 (molar mass 180.156 g/mol). Ratio: 180.156 / 30.026 = 6. The molecular formula is 6 times the empirical formula. If an experiment gives an empirical formula of CH2 (M = 14.027 g/mol) and the compound has a molar mass of approximately 56 g/mol (from a mass spectrometry experiment), the molecular formula is (CH2)4 = C4H8 (butylene or cyclobutane). Molar mass determination from gas density, osmometry, or mass spectrometry is always the final step in identifying an unknown compound's molecular formula.
Molar mass of ionic compounds and hydrates
For ionic compounds, the formula unit is used rather than a molecule. NaCl: M = 22.990 + 35.453 = 58.443 g/mol. CaCO3: M = 40.078 + 12.011 + 3(15.999) = 100.086 g/mol. For hydrated salts, include the water molecules in the calculation. CuSO4.5H2O: M = 63.546 + 32.065 + 4(15.999) + 5(18.015) = 249.685 g/mol. When a hydrate is heated, it loses water. CuSO4.5H2O (249.685 g/mol) loses 5 water molecules to give anhydrous CuSO4 (159.609 g/mol). The percentage of water in the hydrate = (5 x 18.015 / 249.685) x 100 = 36.08%. Hydrate calculations are a common exam question type at A-level and AP Chemistry.
Percent composition from molar mass
Percent composition = (mass of element in formula / molar mass) x 100. The LazyTools molar mass calculator displays the percent composition of each element alongside its contribution to the total molar mass. For glucose C6H12O6 (M = 180.156 g/mol): %C = (72.066/180.156) x 100 = 40.00%. %H = (12.096/180.156) x 100 = 6.71%. %O = (95.994/180.156) x 100 = 53.29%. These percentages sum to 100%. Percent composition is used to determine empirical formulas from combustion analysis data and to verify the identity of an isolated compound against a theoretical formula.
Using this tool in coursework and lab reports
All LazyTools chemistry calculators run entirely in your browser with no data sent to any server. Results can be copied with one click for inclusion in lab reports, assignments and problem sets. The formula is shown with every result. The LazyTools chemistry suite covers all major quantitative chemistry topics -- see the related tools section below for the calculators most commonly used alongside this one.
Chemistry problem-solving: common errors and how to avoid them
The most frequent errors in chemistry calculations are: using the wrong formula for the context, failing to convert percentages to fractions where required, rounding intermediate values instead of carrying full precision to the final step, and misidentifying which quantity is the unknown. This calculator displays the formula alongside every result, making it straightforward to identify which step went wrong and correct it. For best exam preparation, attempt problems manually first and use the calculator to verify, so you build both procedural fluency and error-checking habits simultaneously.
Molar mass and gas calculations: the ideal gas law
The ideal gas law PV = nRT links moles (n) to pressure, volume and temperature. Since n = mass/M (molar mass), the law can be rewritten as PV = (mass/M)RT, giving M = mass x RT / (PV). This allows molar mass to be determined experimentally from the density of a gas at known temperature and pressure. For a gas of density rho at STP (T=273.15 K, P=101325 Pa): M = rho x R x T / P = rho x 22.414 L/mol x (1 / density in g/L). For example, if a gas has a density of 1.963 g/L at STP, M = 1.963 x 22.414 = 44.0 g/mol -- consistent with CO2. This method was widely used before mass spectrometry became routine, and it remains a classic A-level and AP Chemistry experimental technique.
Molar mass in titration and quantitative analysis
In acid-base and redox titrations, knowing the molar mass is essential for calculating the number of moles reacted. Example: 25.0 cm3 of 0.100 mol/L NaOH is neutralised by 18.4 cm3 of H2SO4. Moles NaOH = 0.0250 x 0.100 = 0.00250 mol. The reaction is 2NaOH + H2SO4 -> Na2SO4 + 2H2O (1:2 ratio). Moles H2SO4 = 0.00250/2 = 0.00125 mol. Concentration H2SO4 = 0.00125/0.0184 = 0.0679 mol/L. The molar mass of H2SO4 (98.079 g/mol) would be needed to express the result in g/L. Molar mass is also used in gravimetric analysis -- if 1.234 g of BaSO4 precipitate is collected from a reaction, moles BaSO4 = 1.234/233.389 = 0.00529 mol, from which the mass or concentration of the analyte can be calculated.
Worked examples for exam preparation
Example 1: What mass of CO2 is produced when 5.00 g of CaCO3 is fully decomposed? CaCO3 -> CaO + CO2. M(CaCO3) = 100.086 g/mol. Moles CaCO3 = 5.00/100.086 = 0.04996 mol. Moles CO2 = 0.04996 mol (1:1). Mass CO2 = 0.04996 x 44.010 = 2.199 g. Example 2: How many grams of glucose (C6H12O6) are needed to make 500 mL of 0.250 mol/L solution? M(C6H12O6) = 180.156 g/mol. Moles = 0.500 x 0.250 = 0.125 mol. Mass = 0.125 x 180.156 = 22.52 g. These two calculation types -- stoichiometry and solution preparation -- cover the majority of molar mass applications in A-level, IB and AP Chemistry examinations.
The LazyTools molar mass calculator handles any standard chemical formula including nested parentheses, ionic compound formula units, hydrated salts and organic molecules of any size, provided all element symbols are correctly capitalised. It is suitable for use from GCSE through university undergraduate level and covers all 72 elements in the LazyTools periodic table database.
From simple diatomic molecules to complex polymers and inorganic salts, molar mass is the single most frequently used quantity in quantitative chemistry calculations, linking the macroscopic world of laboratory masses to the atomic world of moles and molecules.
Frequently asked questions
Sum the standard atomic weights of all atoms: molar mass = sum(atomic weight x subscript) for all elements. For H2O: 2(1.008) + 15.999 = 18.015 g/mol.
H2O: M = 2(1.008) + 15.999 = 18.015 g/mol.
C6H12O6: M = 6(12.011) + 12(1.008) + 6(15.999) = 180.156 g/mol.
NaCl: M = 22.990 + 35.453 = 58.443 g/mol.
Expand the parentheses by multiplying the subscript outside. Ca(OH)2: Ca + 2O + 2H = 40.078 + 2(15.999) + 2(1.008) = 74.093 g/mol. The LazyTools calculator handles this automatically.
They are numerically equal. Molecular weight is dimensionless (ratio to 1/12 of C-12 mass); molar mass has units of g/mol. In practice the terms are used interchangeably.
M = 2(55.845) + 3(32.065) + 12(15.999) = 111.690 + 96.195 + 191.988 = 399.873 g/mol.
Yes. Free, no signup, runs in your browser.