Lab calculator · Solutions
Molar Mass Calculator: g/mol From Any Chemical Formula
Type a chemical formula such as NaCl or CuSO4·5H2O and get its molar mass in g/mol, with each element's share of the mass.
Molar mass calculator
| Element | Atoms | Mass (g/mol) | % by mass |
|---|---|---|---|
| Na | 1 | 22.99 | 39.34 |
| Cl | 1 | 35.45 | 60.66 |
M = 1 × Na + 1 × Cl = 58.44 g/mol
Molar mass is the mass of one mole of a substance, in grams per mole (g/mol). It is the bridge between the balance and the chemistry: weigh grams, divide by molar mass, and you have moles. The calculator reads the formula you type, counts the atoms of each element and adds up their standard atomic weights.
How to use it
Type a formula into the box, or press one of the example buttons: NaCl, NaOH, H2O, CO2, HCl, C2H5OH, CaCO3, CuSO4·5H2O, C6H12O6 and Tris (C4H11NO3). The answer updates as you type and comes in three parts:
- a table listing each element, its number of atoms, its contribution in g/mol and its percent of the total mass;
- the molar mass, to six significant figures;
- the sum written out, for example
M = 1 × Na + 1 × Cl = 58.44 g/mol.
A few rules keep the parser happy. Element symbols start with a capital letter and case matters, so Co is cobalt while CO is carbon monoxide. Round or square brackets work, with a count after the closing bracket: Ca(OH)2 or [Cu(NH3)4]SO4. For a hydrate, put a dot, a middle dot or an asterisk before the water: CuSO4·5H2O, CuSO4.5H2O and CuSO4*5H2O all return 249.677 g/mol. Type the formula rather than the name; "ethanol" gives an error, C2H5OH works.
How to find molar mass by hand
- Write the formula and count the atoms of each element. Glucose, C6H12O6, has 6 carbon, 12 hydrogen and 6 oxygen. A bracket multiplies everything inside it, and a hydrate adds its waters: CuSO4·5H2O holds 10 hydrogen and 9 oxygen.
- Look up each standard atomic weight. The tool uses the IUPAC abridged values, among them H 1.008, C 12.011, N 14.007, O 15.999, Na 22.99, Cl 35.45 and Ca 40.078.
- Multiply each atomic weight by its atom count.
- Add the products. For glucose: 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol.
Brackets follow the same pattern. Calcium hydroxide, Ca(OH)2, has one calcium, two oxygen and two hydrogen: 40.078 + 2 × 15.999 + 2 × 1.008 = 74.092 g/mol.
Worked example: the default, NaCl
The box opens with NaCl. One sodium at 22.99 plus one chlorine at 35.45 gives 58.44 g/mol, and the table shows sodium at 39.34 percent of the mass and chlorine at 60.66 percent. That 58.44 is the molar mass the molarity calculator starts with: 58.44 g of sodium chloride made up to one liter is a 1 M solution.
Molar masses of common compounds
These were computed with the same atomic weights the calculator uses. Other tables may differ in the last decimal place because they draw on slightly different atomic weight values.
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Sodium chloride | NaCl | 58.44 |
| Sodium hydroxide | NaOH | 39.997 |
| Water | H2O | 18.015 |
| Carbon dioxide | CO2 | 44.009 |
| Hydrogen chloride (hydrochloric acid) | HCl | 36.458 |
| Ethanol | C2H5OH | 46.069 |
| Calcium carbonate | CaCO3 | 100.086 |
| Ammonia | NH3 | 17.031 |
| Calcium chloride, anhydrous | CaCl2 | 110.978 |
| Calcium chloride dihydrate | CaCl2·2H2O | 147.008 |
| Glucose | C6H12O6 | 180.156 |
| Copper(II) sulfate pentahydrate | CuSO4·5H2O | 249.677 |
| Tris base | C4H11NO3 | 121.136 |
Hydrochloric acid in a bottle is a solution of HCl in water, so the 36.458 applies to the HCl it contains. To work from a concentrated acid you also need its density and percent strength.
Common mistakes
- Wrong capitals. "nacl" fails, and "CO" is a different substance from "Co". Copy the formula from the label exactly.
- Leaving out hydrate water. Calcium chloride dihydrate is about a third heavier per mole than the anhydrous salt, so a recipe that names one and a bottle that holds the other will be off by that much.
- Typing ion charges. The parser does not read Na+ or SO4 2-. Enter the neutral formula; the mass of the extra or missing electrons is too small to matter.
- Treating molar mass and molecular weight as different numbers. They are the same value in different units: g/mol for a mole, daltons for one molecule. Where a recipe says MW or FW, the g/mol figure fits.
Limits
The atomic weight table covers the elements that have an IUPAC standard atomic weight. Elements without one, such as technetium or plutonium, are rejected. Isotope-labeled compounds (carbon-13, deuterium) need their own masses, and large biomolecules such as proteins are better handled from their sequence than from a written formula. Once you have the molar mass, the ppm calculator turns mg/L figures into molarity.
FAQ
How do you find the molar mass of a compound?
Count the atoms of each element in the formula, multiply each count by that element's atomic weight, and add the results. Water, H2O, is 2 × 1.008 + 15.999 = 18.015 g/mol. The calculator does the same sum and shows each step in its table.
What is the molar mass of NaCl?
Sodium chloride has a molar mass of 58.44 g/mol, from sodium at 22.99 and chlorine at 35.45. That means 58.44 g of NaCl contains one mole of formula units.
What is the molar mass of water?
Water is 18.015 g/mol with the IUPAC abridged atomic weights used here. Many textbooks round it to 18.02 or simply 18.
Is molar mass the same as molecular weight?
They are numerically equal but measured in different units. Molar mass is grams per mole, while molecular weight (or molecular mass) is usually given in daltons per molecule. For weighing out solutions, either number works in the same way.
How do I enter a hydrate?
Write the salt, then a dot or middle dot, then the number of waters and H2O, for example CuSO4·5H2O or CuSO4.5H2O. The calculator multiplies the water by its coefficient and adds it to the total, giving 249.677 g/mol for copper sulfate pentahydrate.
Related calculators
- Molarity calculatorMass to weigh for a target concentration, or the concentration of what you dissolved.
- PPM and percent converterppm to mg/L, percent, ppb and molarity, plus % w/v and % v/v recipes.
- Molality calculatorMoles per kilogram of solvent, the solute mass for a target, or a conversion from molarity.
