Bbiochemtools

Molarity to Grams & Molecular Weight Calculator

Type any chemical formula to get its molar mass, then find exactly how many grams to weigh out for your target concentration and volume, every step shown.

Molar mass
,
Weigh out
,

Every conversion, both directions

The same two relationships cover all of these, so once you have the molar mass you can go either way:

Molarity to grams

You know the concentration you want and the volume, and you need the mass to weigh out.
grams = molarity × volume in litres × molar mass
0.5 M glucose in 250 mL: 0.5 × 0.25 × 180.16 = 22.5 g

Grams to molarity

You weighed something out and need to know the concentration.
molarity = grams ÷ molar mass ÷ volume in litres
22.5 g glucose in 250 mL: 22.5 / 180.16 / 0.25 = 0.5 M

g/mL or mg/mL to molarity

You have a mass concentration and need molarity. Convert to grams per litre first, then divide by molar mass.
molarity = (g/L) ÷ molar mass
10 mg/mL glucose = 10 g/L, so 10 / 180.16 = 0.0555 M (55.5 mM)

Molecular weight to molarity

Molecular weight is the molar mass in g/mol, so this is the same calculation: divide your grams per litre by the molecular weight. A 1 g/L solution of something with MW 180.16 is 1 / 180.16 = 0.00555 M.

How to figure out grams for a solution

First find the molar mass by adding the atomic mass of every atom in the formula, for glucose, C₆H₁₂O₆, that is 6 carbons + 12 hydrogens + 6 oxygens. Then work in three steps: moles needed = molarity × volume in liters; grams = moles × molar mass. So for 0.5 M glucose in 250 mL: 0.5 × 0.25 = 0.125 mol, then 0.125 × 180.16 = about 22.5 g. Weigh that out, dissolve, and bring to the final volume.

Atomic masses use standard IUPAC values; molar mass is in g/mol. Formulas support parentheses and multipliers like Ca(OH)₂.

Related tools: Dilution calculator · Buffer calculator · Buffer pKa table · Antibody dilution calculator · all biochem tools.

Worked example 1: 0.5 M glucose in 250 mL (the default)

Molar mass of C₆H₁₂O₆: C: 6 × 12.011 = 72.066 H: 12 × 1.008 = 12.096 O: 6 × 15.999 = 95.994 Total = 180.156 → 180.16 g/mol moles = M × V = 0.5 × 0.250 L = 0.125 mol grams = moles × molar mass = 0.125 × 180.16 = 22.520 g

Weigh out 22.52 g of glucose, dissolve in water, then bring the total volume up to 250 mL, matches the calculator's default output exactly.

Worked example 2: 0.2 M Ca(OH)₂ in 100 mL

Calcium hydroxide, a formula that exercises the parenthesis-and-multiplier parsing (OH group ×2).

Molar mass of Ca(OH)₂: Ca: 1 × 40.078 = 40.078 O: 2 × 15.999 = 31.998 H: 2 × 1.008 = 2.016 Total = 74.092 → 74.09 g/mol moles = M × V = 0.2 × 0.100 L = 0.02 mol grams = moles × molar mass = 0.02 × 74.09 = 1.482 g

Type "Ca(OH)2" into the tool with molarity 0.2 and volume 100 mL to reproduce this, 1.482 g of calcium hydroxide dissolved up to 100 mL gives a 0.2 M solution.

Worked example 3: converting g/mL or mg/mL to molarity

Sometimes a concentration is given by mass per volume instead of molarity, common for drug stocks and cell culture reagents. A caffeine stock solution is labeled 1 mg/mL. What's its molarity?

Caffeine (C₈H₁₀N₄O₂) molar mass = 194.19 g/mol 1 mg/mL = 1 g/L (the units cancel exactly, mg/mL and g/L are numerically identical) Molarity = concentration ÷ molar mass = 1 ÷ 194.19 = 0.00515 M (5.15 mM)

This matches the calculator's "Concentration → molarity" mode exactly, switch to that mode, enter 1 with the mg/mL unit selected, and it shows the same 5.15 mM.

FAQ

What's the difference between molar mass and molecular weight?
Same quantity, different unit emphasis. Molar mass is typically in g/mol; molecular weight is technically a dimensionless ratio. In practice the terms are used interchangeably in chemistry and biochemistry.

Why does hydration matter for weighing out a compound?
Many lab chemicals are sold as hydrates (e.g. CaCl₂·2H₂O), which have a higher molar mass than the anhydrous formula. Using the anhydrous mass for a hydrated salt underestimates the grams needed. Check the bottle label for which form you have.

Does the order matter, moles first or grams first?
No, but computing moles first (moles = molarity × volume, then grams = moles × molar mass) mirrors how molarity is actually defined and is easier to check for errors than combining everything into one step.

Why use standard atomic masses instead of one isotope's mass?
Standard atomic masses (like carbon's 12.011) are weighted averages across an element's naturally occurring isotopes, since any real sample is a mix of isotopes. That's correct for everyday lab calculations; individual isotope masses only matter for specialized work like mass spectrometry.

How do I convert g/mL or mg/mL to molarity?
Divide the mass concentration (in g/L) by the molar mass (in g/mol). Concentration in g/mL needs ×1000 first to reach g/L; mg/mL needs no conversion, since mg/mL and g/L are numerically identical.

Practice problems

1. How many grams of caffeine (C₈H₁₀N₄O₂) are needed to make 100 mL of a 0.1 M solution?

Show answer
Molar mass: C: 8×12.011=96.088, H: 10×1.008=10.08, N: 4×14.007=56.028, O: 2×15.999=31.998 Total = 194.19 g/mol moles = 0.1 × 0.100 L = 0.01 mol grams = 0.01 × 194.19 = 1.942 g

2. How many grams of CuSO₄ are needed for 500 mL of a 0.25 M solution?

Show answer
Molar mass: Cu 63.546 + S 32.06 + O: 4×15.999=63.996 Total = 159.60 g/mol moles = 0.25 × 0.500 L = 0.125 mol grams = 0.125 × 159.60 = 19.95 g