Molar Mass Calculator
Calculate the molar mass of any chemical compound. Enter a formula like H2SO4 or Ca(OH)2 and get an element-by-element breakdown with mass percentages.
This molar mass calculator takes any chemical formula and gives you the molecular weight in grams per mole. Type a formula like H2O, NaCl, or Ca(OH)2, and the tool parses each element, looks up its atomic mass from the IUPAC 2021 standard atomic weights, and sums them. You get a full element-by-element breakdown with mass percentages and a visual composition chart.
About Molar Mass Calculator
How to Calculate Molar Mass
The molar mass of a compound equals the sum of the atomic masses of every atom in its formula. Each element's atomic mass comes from the periodic table (IUPAC publishes standard atomic weights that average across natural isotope abundances).
Formula: M = sum of (number of atoms x atomic mass) for each element
Worked example - sulfuric acid (H2SO4):
- Identify elements and counts: H = 2, S = 1, O = 4
- Look up atomic masses: H = 1.008, S = 32.06, O = 15.999
- Calculate: (2 x 1.008) + (1 x 32.06) + (4 x 15.999)
- Result: 2.016 + 32.06 + 63.996 = 98.072 g/mol
Worked example with parentheses - calcium hydroxide Ca(OH)2:
- Expand the parentheses: Ca(OH)2 = Ca + 2 x (O + H) = Ca, O2, H2
- Counts: Ca = 1, O = 2, H = 2
- Calculate: (1 x 40.078) + (2 x 15.999) + (2 x 1.008)
- Result: 40.078 + 31.998 + 2.016 = 74.092 g/mol
The calculator handles nested parentheses too. For magnesium phosphate Mg3(PO4)2, the subscript 2 applies to everything inside the parentheses, giving P = 2 and O = 8.
Common Compounds and Their Molar Masses
| Compound | Formula | Molar Mass (g/mol) | Common Use |
|---|---|---|---|
| Water | H2O | 18.015 | Universal solvent |
| Table salt | NaCl | 58.44 | Seasoning, preservation |
| Carbon dioxide | CO2 | 44.009 | Carbonation, dry ice |
| Glucose | C6H12O6 | 180.156 | Biological energy source |
| Sulfuric acid | H2SO4 | 98.072 | Industrial chemical |
| Ethanol | C2H5OH | 46.069 | Beverages, disinfectant |
| Calcium carbonate | CaCO3 | 100.087 | Chalk, limestone, antacids |
| Ammonia | NH3 | 17.031 | Fertiliser production |
| Aspirin | C9H8O4 | 180.157 | Pain relief |
| Caffeine | C8H10N4O2 | 194.190 | Stimulant |
| Baking soda | NaHCO3 | 84.007 | Leavening agent |
| Acetic acid | CH3COOH | 60.052 | Vinegar |
Why Molar Mass Matters in Chemistry
Molar mass is the bridge between the macroscopic world (grams you can weigh) and the atomic world (individual molecules). When a lab procedure calls for "0.5 mol of NaCl," you multiply 0.5 by 58.44 g/mol to know you need 29.22 grams on the scale. This conversion is the foundation of stoichiometry - the maths behind balanced chemical equations.
Key relationships:
- Moles to grams: mass (g) = moles x molar mass (g/mol)
- Grams to moles: moles = mass (g) / molar mass (g/mol)
- Number of particles: N = moles x 6.022 x 10^23 (Avogadro's number)
For example, 36.03 g of water contains 2 moles of H2O, which equals about 1.204 x 10^24 water molecules. The scientific notation calculator is useful for working with numbers at that scale.
Stoichiometry worked example:
How many grams of CO2 are produced by burning 10 g of methane (CH4)?
- Balanced equation: CH4 + 2O2 -> CO2 + 2H2O
- Molar mass of CH4 = 12.011 + (4 x 1.008) = 16.043 g/mol
- Molar mass of CO2 = 12.011 + (2 x 15.999) = 44.009 g/mol
- Moles of CH4 = 10 / 16.043 = 0.6233 mol
- From the equation, 1 mol CH4 produces 1 mol CO2
- Mass of CO2 = 0.6233 x 44.009 = 27.43 g
Every stoichiometry problem starts with molar mass. Without it, you cannot convert between grams and moles, and the balanced equation ratios become unusable.
Molar Mass vs Molecular Weight vs Formula Mass
These three terms come up constantly in chemistry courses and can be confusing:
| Term | Units | Applies to | Definition |
|---|---|---|---|
| Molar mass | g/mol | Any substance | Mass of one mole (6.022 x 10^23 entities) |
| Molecular weight | Dimensionless (Da or amu) | Molecular compounds | Sum of relative atomic masses |
| Formula mass | Dimensionless (Da or amu) | Ionic compounds | Same calculation, different name for non-molecular substances |
In practice, the numerical value is the same for all three. Water has a molar mass of 18.015 g/mol and a molecular weight of 18.015 amu. NaCl has a formula mass of 58.44 amu (not "molecular weight," because NaCl forms an ionic lattice, not discrete molecules). The calculator gives you the value in g/mol, which works for any of these contexts.
Mass Percentage Composition
The element breakdown shows what fraction of a compound's mass comes from each element. This is essential for several real applications:
- Empirical formula determination: Given mass percentages from combustion analysis, you can work backwards to find the formula
- Nutrition and supplements: Iron supplements list the mass of elemental iron, not the total mass of ferrous sulfate (FeSO4). A 325 mg ferrous sulfate tablet contains about 65 mg of actual iron (Fe is 36.8% of FeSO4)
- Mining and metallurgy: An ore's value depends on the mass percentage of the target metal in the mineral
- Environmental science: CO2 is 27.3% carbon by mass, which matters for emissions accounting and carbon credits
- Fertiliser grades: NPK ratings on fertiliser bags are based on mass percentages of nitrogen, phosphorus (as P2O5), and potassium (as K2O)
Mass percentage = (element's total mass / compound's molar mass) x 100%
For water: hydrogen makes up (2.016 / 18.015) x 100 = 11.19%, and oxygen makes up (15.999 / 18.015) x 100 = 88.81%. Despite water being "H2O" with twice as many hydrogen atoms, oxygen dominates by mass because it is 16 times heavier per atom.
Where Do Atomic Masses Come From?
The atomic masses used in this calculator come from the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW). These are "standard atomic weights" - weighted averages across all naturally occurring isotopes of each element, based on their relative abundance on Earth.
For example, chlorine has two stable isotopes: Cl-35 (75.77% abundance, mass 34.969) and Cl-37 (24.23% abundance, mass 36.966). The standard atomic weight is (0.7577 x 34.969) + (0.2423 x 36.966) = 35.45 amu. This is why atomic masses are not whole numbers even though each individual isotope has a near-integer mass.
IUPAC reviews and updates these values periodically. Some elements (like lithium and boron) have wide natural variation in isotope ratios, so their standard atomic weights are given as ranges. This calculator uses a single representative value for each element, which is accurate enough for virtually all lab and coursework calculations.
Tips for Using This Calculator
- Element symbols are case-sensitive: Co is cobalt, CO is carbon monoxide. Always capitalise only the first letter of each element
- Use parentheses for polyatomic ions: Ca(OH)2, not CaOH2 (that would give Ca + O + H2, which is a completely different thing)
- Hydrates need to be entered in two parts: for CuSO4.5H2O, calculate CuSO4 and H2O separately, then combine (159.61 + 5 x 18.015 = 249.69 g/mol)
- The atomic masses are weighted averages across natural isotopes, so they work for bulk samples but not for specific isotope calculations
- For very precise work (mass spectrometry, nuclear chemistry), you may need monoisotopic masses instead of standard atomic weights
If you need to work with significant figures in your calculations, the significant figures calculator can help. For percentage-based calculations in lab work, the percent error calculator compares experimental results against theoretical values.
What Is a Mole and Why Does It Matter?
The mole is chemistry's counting unit. Just like a "dozen" means 12 of something, a "mole" means 6.022 x 1023 of something. That number (Avogadro's number) was chosen so that one mole of carbon-12 atoms weighs exactly 12 grams, which neatly connects the atomic mass unit scale to the gram scale we use in the lab.
This connection is the whole point. Atoms are absurdly small. A single water molecule weighs about 3 x 10-23 grams, which is impossible to measure on any balance. But 6.022 x 1023 water molecules (one mole) weigh 18.015 grams, which you can easily pour from a bottle and weigh on a kitchen scale. The mole bridges the gap between the atomic world and the physical world.
Practical example: suppose you need to react sodium hydroxide (NaOH) with hydrochloric acid (HCl) in a 1:1 ratio. You cannot count individual molecules, but you can weigh out 40.00 g of NaOH and 36.46 g of HCl, knowing that both amounts are exactly one mole and therefore contain the same number of molecules. Without molar mass, there would be no way to measure out equal numbers of reactant molecules.
In a teaching context, the equation solver can help students work through the algebra involved in stoichiometry problems, and the scientific notation calculator handles the large exponents that come up when working with Avogadro's number.
How to Use Molar Mass in Stoichiometry
Stoichiometry is the process of using balanced equations to predict how much product a reaction will produce (or how much reactant you need). Molar mass is the essential conversion factor in every step. Here is a more complex worked example.
Problem: How many grams of iron (Fe) can be extracted from 500 g of iron(III) oxide (Fe2O3)?
- Balanced equation: Fe2O3 + 3CO -> 2Fe + 3CO2
- Molar mass of Fe2O3 = (2 x 55.845) + (3 x 15.999) = 111.69 + 47.997 = 159.687 g/mol
- Molar mass of Fe = 55.845 g/mol
- Moles of Fe2O3 = 500 / 159.687 = 3.131 mol
- From the equation, 1 mol Fe2O3 produces 2 mol Fe
- Moles of Fe = 3.131 x 2 = 6.262 mol
- Mass of Fe = 6.262 x 55.845 = 349.7 g
So 500 g of iron oxide yields about 349.7 g of pure iron. In practice, the yield is always lower due to impurities in the ore and losses during smelting, but the stoichiometry gives you the theoretical maximum. Industrial blast furnaces typically achieve 92-95% of the theoretical yield.
Notice the pattern: grams to moles (divide by molar mass), use the equation ratio, then moles back to grams (multiply by molar mass). Every stoichiometry problem follows this same three-step structure, and molar mass is the conversion factor for both the first and last step.
All calculations run entirely in your browser. No data is sent to any server.
Sources
Frequently Asked Questions
What is molar mass?
Molar mass is the mass of one mole (6.022 x 10^23 particles) of a substance, measured in grams per mole (g/mol). It's calculated by adding up the atomic masses of every atom in the chemical formula. For water (H2O), that's (2 x 1.008) + (1 x 15.999) = 18.015 g/mol.
What is the difference between molar mass and molecular weight?
They give you the same number for most purposes. Molar mass is expressed in g/mol and refers to one mole of a substance. Molecular weight (or relative molecular mass) is dimensionless, just the sum of relative atomic masses. In practice, chemists use the terms interchangeably.
How do I enter formulas with parentheses?
Type the formula exactly as you'd write it on paper. For calcium hydroxide, enter Ca(OH)2. The calculator multiplies everything inside the parentheses by the subscript outside. Nested parentheses like ((NH4))2SO4 also work.
Where do the atomic masses come from?
This calculator uses the IUPAC 2021 standard atomic weights, which are the internationally agreed values for each element. These are weighted averages across all naturally occurring isotopes.
Can I calculate molar mass for ionic compounds?
Yes. Ionic compounds like NaCl or CaCO3 work the same way - enter the formula and the calculator sums the atomic masses. For ionic compounds, the result is sometimes called formula mass rather than molecular mass, but the calculation is identical.
Related Tools
Link to this tool
Copy this HTML to link to this tool from your website or blog.
<a href="https://toolboxkit.io/tools/molar-mass-calculator/" title="Molar Mass Calculator - Free Online Tool">Try Molar Mass Calculator on ToolboxKit.io</a>