\1
Calculate the molar mass (molecular weight) of any chemical compound from its formula. Supports parentheses, hydrates, and all 118 elements with IUPAC-standard atomic masses. Enter a formula like H2O, Ca(OH)2, or CuSO4·5H2O and get instant results with full element breakdown and percentage composition.
Click an element to insert it into the formula field. Hover for atomic mass.
Molar mass is one of the most fundamental quantities in all of chemistry. It connects the atomic world, where individual atoms and molecules operate at incomprehensibly small scales, to the macroscopic world of laboratory balances, graduated cylinders, and volumetric flasks. Without molar mass, there would be no way to translate between particle counts and measurable quantities of matter, and stoichiometry as a discipline would simply not exist.
The molar mass of a substance tells you how many grams of that substance constitute exactly one mole, which is 6.022 × 1023 particles (Avogadro's number). Water, for instance, has a molar mass of 18.015 g/mol. This means 18.015 grams of water contains approximately 6.022 × 1023 individual water molecules. That conversion factor is what makes every quantitative chemistry calculation possible, from the simplest dilution problem to the most complex multi-step organic synthesis.
In practical terms, molar mass appears in nearly every corner of chemistry. When a researcher prepares a 0.1 M sodium chloride solution, they know that NaCl has a molar mass of 58.44 g/mol so they can weigh out 5.844 grams per liter. When a pharmaceutical chemist synthesizes a drug compound and the protocol specifies 2.5 mmol of a reagent, molar mass tells them how many milligrams to weigh on the analytical balance. When an environmental scientist measures pollutant concentrations in parts per million, molar mass helps translate between mass-based and mole-based concentration units.
The procedure is straightforward. You identify every element in the formula, count the total number of atoms of each element (accounting for subscripts and parenthetical multipliers), multiply each atom count by the element's standard atomic mass from the periodic table, and sum all contributions.
Consider glucose, C6H12O6. Carbon appears 6 times at 12.011 g/mol each, giving 72.066 g/mol. Hydrogen appears 12 times at 1.008, giving 12.096 g/mol. Oxygen appears 6 times at 15.999, giving 95.994 g/mol. Sum: 72.066 + 12.096 + 95.994 = 180.156 g/mol. Percentage composition follows: carbon is 40.00%, hydrogen 6.71%, oxygen 53.29%.
Parenthetical groups require multiplying. In Ca(OH)2, the subscript 2 applies to both O and H inside the parentheses: 1 Ca (40.078) + 2 O (31.998) + 2 H (2.016) = 74.092 g/mol. For iron(III) sulfate, Fe2(SO4)3, the 3 multiplies the entire SO4 group: 2 Fe + 3 S + 12 O = 111.690 + 96.180 + 191.988 = 399.858 g/mol.
Hydrates add the water molecules to the anhydrous salt. CuSO4·5H2O: CuSO4 (159.609) + 5 H2O (90.075) = 249.684 g/mol. The centered dot means the water is structurally incorporated into the crystal lattice.
Percentage composition is a critical analytical tool that tells you the mass fraction of each element in a compound. It is essential in analytical chemistry (identifying unknowns), food science (nutritional content), pharmaceutical manufacturing (verifying purity), and materials engineering (characterizing alloys and composites).
percentage = (atoms × atomic mass / total molar mass) × 100. In Fe2O3: iron = (2 × 55.845 / 159.688) × 100 = 69.94%. Iron dominates the mass despite having fewer atoms because its atomic mass (55.845) greatly exceeds oxygen's (15.999). This relationship is critical for ore processing and metallurgy.
Percentage composition also works in reverse. Given combustion analysis data, assume 100 grams, convert percentages to grams, divide by atomic mass to get moles, find the simplest ratio. A compound that is 40% C, 6.7% H, 53.3% O yields C:3.33, H:6.65, O:3.33, which simplifies to CH2O (the empirical formula of glucose).
The empirical formula is the simplest whole-number ratio of atoms. The molecular formula is the actual count. They may be identical (H2O, NaCl) or differ by a multiplier (glucose: empirical CH2O, molecular C6H12O6). To convert, divide the known molecular mass by the empirical formula mass: 180.16 / 30.03 = 6. The Empirical to Molecular tab automates this.
The most used equation in practical chemistry: mass (g) = moles × molar mass (g/mol). moles = mass / molar mass. Every time you weigh a reagent you work in grams; every time you balance a reaction you work in moles. Molar mass is the bridge. The Moles to Grams tab provides instant conversion with step-by-step work for any formula.
| Compound | Formula | Molar Mass (g/mol) | Common Use |
|---|---|---|---|
| Water | H2O | 18.015 | Universal solvent |
| Table Salt | NaCl | 58.440 | Seasoning, IV fluids |
| Glucose | C6H12O6 | 180.156 | Cellular energy |
| Ethanol | C2H5OH | 46.068 | Solvent, beverages |
| Aspirin | C9H8O4 | 180.157 | Pain relief |
| Caffeine | C8H10N4O2 | 194.190 | Stimulant |
| Baking Soda | NaHCO3 | 84.007 | Leavening agent |
| Sulfuric Acid | H2SO4 | 98.079 | Industrial acid |
| Calcium Carbonate | CaCO3 | 100.087 | Antacid, limestone |
| Acetic Acid | CH3COOH | 60.052 | Vinegar |
Atomic masses come from IUPAC (International Union of Pure and Applied Chemistry) and are weighted averages of all naturally occurring isotopes. Chlorine exists as 75.77% Cl-35 and 24.23% Cl-37, giving 35.45 g/mol. This calculator uses the IUPAC 2021 standard atomic weights for all 118 elements. Some elements like lithium have ranges ([6.938, 6.997]) due to source-dependent isotopic variation; conventional values are used.
In pharmaceutical development, molar mass drives dosing calculations and pharmacokinetic modeling. In materials science, dividing polymer molecular weight by monomer molar mass gives the degree of polymerization, which determines mechanical properties. Environmental scientists convert between mg/L and molarity for pollutant measurements. Agricultural chemists use molar mass to formulate fertilizers. Even pool chemistry and cooking rely on molar mass through the concentration specs on product labels.
uppercase start, optional lowercase (Na, not NA). Subscripts as plain numbers (H2O). Parentheses for grouping: Ca(OH)2, Al2(SO4)3. Square brackets for coordination compounds: [Cu(NH3)4]SO4. For hydrates, use a dot (.), centered dot, or asterisk (*): CuSO4.5H2O, MgSO4*7H2O. Charges and phase labels (aq, s, l, g) are ignored automatically. The parser reports exactly which element is unrecognized if you make a typo.
I've tested this molar mass calculator against every edge case I could find, and it doesn't fail on formulas that trip up other tools. Nested parentheses, hydrates with large water counts, organic molecules with dozens of carbon atoms. I this because the free calculators I found online either couldn't handle parentheses or didn't show percentage composition. It won't ask for your email, it won't show ads, and it can't see your data because everything runs locally in your browser.
| Chrome | 90+ |
| Firefox | 88+ |
| Safari | 15+ |
| Edge | 90+ |
Molar mass is the mass of a given substance divided by the amount of substance, measured in g/mol. For elements it equals the standard atomic weight; for compounds it is the sum of atomic weights multiplied by their counts.
Source: wikipedia.org
Developer packages related to this tool.
Last Updated: March 2026. Regularly maintained for accuracy and browser compatibility.
Molar mass is the mass of one mole of a substance in g/mol. For water: 2(1.008) + 15.999 = 18.015 g/mol.
Multiply everything inside by the subscript outside. Ca(OH)2 = 40.078 + 2(15.999) + 2(1.008) = 74.092 g/mol.
Grams = moles x molar mass. 2 moles NaCl = 2 x 58.44 = 116.88 g. moles = grams / molar mass.
Use a dot, centered dot, or asterisk: CuSO4.5H2O, CuSO4*5H2O, or CuSO4·5H2O. All three work.
IUPAC 2021 standard atomic weights, weighted averages of naturally occurring isotopes for all 118 elements.
Empirical = simplest ratio (CH2O). Molecular = actual atoms (C6H12O6). Divide molecular mass by empirical mass for the multiplier.
Yes. Nested parentheses and square brackets both work: [Cu(NH3)4]SO4, K3[Fe(CN)6].
Yes. Reports to 3 decimal places using IUPAC standard weights. For isotopically enriched materials, use isotope-specific masses instead.
Molar mass is one of the most fundamental concepts in chemistry, connecting the microscopic world of atoms and molecules to the macroscopic world of grams and kilograms that we can measure in the laboratory. I built this calculator to make these conversions instant, but understanding the underlying concepts will help you apply the results correctly.
Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). One mole contains exactly 6.02214076 x 10^23 particles (Avogadro's number). This number was chosen so that one mole of carbon-12 atoms has a mass of exactly 12 grams. For any element, the molar mass in g/mol equals the atomic mass in atomic mass units (amu) listed on the periodic table.
The mole is the chemist's counting unit, similar to how a "dozen" means 12 of something. Just as you might buy a dozen eggs, chemists work with moles of molecules. The difference is scale: a mole is approximately 602 sextillion particles. This enormous number exists because atoms are incredibly small. A single drop of water contains approximately 1.67 x 10^21 molecules, or about 0.00278 moles.
| Substance | Formula | Molar Mass (g/mol) | What 1 Mole Looks Like |
|---|---|---|---|
| Water | H2O | 18.015 | About 18 mL (roughly 1 tablespoon) |
| Table salt | NaCl | 58.44 | About 2 tablespoons |
| Sugar (sucrose) | C12H22O11 | 342.30 | About 1.5 cups |
| Iron | Fe | 55.845 | A small iron nail (~56 g) |
| Carbon dioxide | CO2 | 44.01 | 22.4 liters of gas at STP |
| Aspirin | C9H8O4 | 180.16 | About half a cup of powder |
| Gold | Au | 196.97 | A gold bar about the size of a small die |
| Caffeine | C8H10N4O2 | 194.19 | About 1,940 cups of coffee worth |
Stoichiometry is the branch of chemistry that deals with the quantitative relationships between reactants and products in chemical reactions. Molar mass is the bridge between the moles used in balanced equations and the grams measured in the lab.
Consider the combustion of methane: CH4 + 2O2 -> CO2 + 2H2O
This equation tells us that 1 mole of methane reacts with 2 moles of oxygen to produce 1 mole of carbon dioxide and 2 moles of water. Using molar masses:
| Substance | Moles | Molar Mass | Mass (grams) |
|---|---|---|---|
| CH4 (methane) | 1 | 16.04 g/mol | 16.04 g |
| O2 (oxygen) | 2 | 32.00 g/mol | 64.00 g |
| CO2 (carbon dioxide) | 1 | 44.01 g/mol | 44.01 g |
| H2O (water) | 2 | 18.015 g/mol | 36.03 g |
Notice that mass is conserved: 16.04 + 64.00 = 80.04 g of reactants, and 44.01 + 36.03 = 80.04 g of products. This is the law of conservation of mass in action, and molar mass calculations make it easy to verify.
In real laboratory situations, you rarely have exactly the right proportions of each reactant. The limiting reagent is the reactant that runs out first, determining how much product can form. To identify it, convert the mass of each reactant to moles using their molar masses, then compare the mole ratios to the balanced equation.
For example, if you have 32 g of CH4 and 96 g of O2: CH4 gives 32/16.04 = 2.0 moles, and O2 gives 96/32.00 = 3.0 moles. The equation requires 2 moles of O2 per mole of CH4. For 2.0 moles of CH4, you need 4.0 moles of O2, but you only have 3.0 moles. So O2 is the limiting reagent, and only 1.5 moles of CH4 can react.
Molar mass is essential for determining percentage composition and deriving empirical formulas from experimental data.
The percentage composition of each element in a compound is calculated by dividing the total mass of that element in one mole of the compound by the molar mass of the compound, then multiplying by 100.
| Compound | Element | Contribution | Percentage |
|---|---|---|---|
| H2O (18.015 g/mol) | H | 2 x 1.008 = 2.016 g | 11.19% |
| O | 1 x 15.999 = 15.999 g | 88.81% | |
| C6H12O6 (180.16 g/mol) | C | 6 x 12.011 = 72.066 g | 40.00% |
| H | 12 x 1.008 = 12.096 g | 6.71% | |
| O | 6 x 15.999 = 95.994 g | 53.29% |
When analyzing an unknown compound, chemists often start with elemental analysis that gives percentage composition. To find the empirical formula: 1) Assume 100 g of the compound so percentages become grams. 2) Convert each element's mass to moles by dividing by its atomic mass. 3) Divide all mole values by the smallest to get the mole ratio. 4) Round to whole numbers (or multiply to get whole numbers) to obtain the empirical formula subscripts.
To find the molecular formula from the empirical formula, you need the actual molar mass (determined by mass spectrometry or other methods). Divide the actual molar mass by the empirical formula mass to get a multiplier, then multiply all subscripts in the empirical formula by that number.
Molar mass calculations appear in many practical applications beyond academic chemistry.
Drug concentrations are often expressed in moles or millimoles per liter (molarity). Converting between milligrams (what patients take) and millimoles (what the body processes) requires molar mass. For example, if a patient needs 0.5 mmol of a drug with a molar mass of 250 g/mol, the dose is 0.5 x 250 / 1000 = 0.125 g = 125 mg.
To prepare a 0.1 M solution of sodium hydroxide (NaOH, molar mass = 40.00 g/mol) in 500 mL of water: mass = molarity x volume x molar mass = 0.1 x 0.5 x 40.00 = 2.00 grams. This type of calculation is performed daily in chemistry labs, medical facilities, and manufacturing plants worldwide.
Understanding greenhouse gas emissions requires molar mass. Carbon dioxide (CO2, 44.01 g/mol) is heavier per molecule than methane (CH4, 16.04 g/mol), but methane has a much higher global warming potential per unit mass. Converting between mass emissions and molar quantities is essential for climate modeling and emissions reporting.
Nutrient concentrations in food are often analyzed using molar calculations. Vitamin C (ascorbic acid, C6H8O6) has a molar mass of 176.12 g/mol. If a serving of orange juice contains 0.5 mmol of vitamin C, that equals 0.5 x 176.12 / 1000 = 88 mg, which is close to the recommended daily intake of 90 mg for adults.
Here is a reference table of frequently encountered chemical compounds and their molar masses. I have organized them by category for quick lookup.
| Common Name | Chemical Name | Formula | Molar Mass (g/mol) |
|---|---|---|---|
| Baking soda | Sodium bicarbonate | NaHCO3 | 84.01 |
| Bleach (active ingredient) | Sodium hypochlorite | NaOCl | 74.44 |
| Vinegar (active ingredient) | Acetic acid | CH3COOH | 60.05 |
| Rust | Iron(III) oxide | Fe2O3 | 159.69 |
| Rubbing alcohol | Isopropanol | C3H8O | 60.10 |
| Plaster of Paris | Calcium sulfate hemihydrate | CaSO4.1/2H2O | 145.15 |
| Molecule | Formula | Molar Mass (g/mol) | Biological Role |
|---|---|---|---|
| Glucose | C6H12O6 | 180.16 | Primary cellular energy source |
| ATP | C10H16N5O13P3 | 507.18 | Energy currency of cells |
| Cholesterol | C27H46O | 386.65 | Cell membrane component |
| Urea | CO(NH2)2 | 60.06 | Nitrogen waste product |
| Hemoglobin (approx) | C2952H4664N812O832S8Fe4 | ~64,500 | Oxygen transport in blood |
Calculate molar mass from any chemical formula. All 118 elements, parentheses, hydrates, percentage composition, mole/gram conversion, and empirical-to-molecular formula conversion.
by Michael Lip. Runs 100% client-side in your browser. No data uploaded or sent to any server.
March 19, 2026
March 19, 2026 by Michael Lip
Update History
March 19, 2026 - First deployment with validated logic March 22, 2026 - Enhanced with FAQ content and meta tags March 24, 2026 - Improved color contrast and reduced DOM size
March 19, 2026
March 19, 2026 by Michael Lip
March 19, 2026
March 19, 2026 by Michael Lip
Last updated: March 19, 2026
Browser support verified via caniuse.com. Works in Chrome, Firefox, Safari, and Edge.
Works across Chrome, Firefox, Safari, and Edge. Tested March 2026 against current stable releases of all four major browsers.