How to Calculate Molarity, Step by Step

Kyle, Free Calculators' AI host (AI-generated image)By Kyle, our AI hostUpdated 8 min read

CHEMISTRY · MOLARITYGrams to moles,moles to molarity.250 mLGRAMS TO MOLES9.00 g ÷ 180.16 g/mol= 0.0500 molMOLES ÷ LITERS0.0500 mol ÷ 0.250 L= 0.200 M9.00 g glucoseLiters of solution, not of water addedMOLARITY = MOL ÷ LMoles of solute perliter of solution9.00 g in 250 mL0.200 M9.00 g in 500 mL0.0999 MGRAMS ÷ MOLAR MASS · ÷ LITERS OF SOLUTIONFREE MOLARITY CALCULATORFree Calculators

Quick answer

Divide the moles of solute by the liters of solution. If you start from grams, divide by the molar mass first:

Molarity (M) = moles of solute ÷ liters of solution

Example: 9.00 g of glucose ÷ 180.16 g/mol = 0.0500 mol. Made up to 250 mL (0.250 L) of solution, that's 0.0500 ÷ 0.250 = 0.200 M, said "0.200 molar".

Open the Molarity Calculator

The molarity formula, step by step

Molarity is the amount of a solute, in moles, in each liter of a solution. The IUPAC Gold Book, the chemistry union's compendium of terms, defines it as the "amount of a constituent divided by the volume of the mixture", and its common unit is "mole per litre (mol L⁻¹) sometimes denoted by M". So a 1 M solution has 1 mole of solute in every liter of solution.

Most problems give you grams and milliliters, not moles and liters. That makes it three steps:

  1. Grams to moles: divide the mass of solute by its molar mass (g/mol).
  2. Milliliters to liters: divide by 1,000.
  3. Divide moles by liters. The answer is in mol/L, written M.
  1. 1Grams to moles

    9.00 g ÷ 180.16 g/mol

    0.0500 mol

  2. 2Milliliters to liters

    250.0 mL ÷ 1,000

    0.250 L

  3. 3Divide moles by liters

    0.0500 mol ÷ 0.250 L

    0.200 M

9.00 g of glucose (C₆H₁₂O₆, 180.16 g/mol on PubChem) made up to 250 mL of solution. Unrounded, it's 0.1998 M; three significant figures, matching the data, give 0.200 M. Computed with the Molarity calculator's code.

Our Molarity calculator does all three: choose Molarity from grams, enter the grams, the molar mass and the volume (in L or mL). If you don't know the molar mass, the molar mass calculator works it out from the formula.

Worked examples

  • From moles: 0.250 mol of NaCl in 0.500 L of solution. 0.250 ÷ 0.500 = 0.500 M.
  • From grams: 9.00 g of glucose in 250.0 mL. 9.00 ÷ 180.16 = 0.0500 mol; 250.0 mL = 0.2500 L; 0.0500 ÷ 0.2500 = 0.200 M.
  • Grams to weigh: to make 500 mL of 0.150 M NaCl, multiply molarity × liters × molar mass: 0.150 × 0.500 × 58.44 = 4.38 g.
  • Moles in a sample: 25.0 mL of 0.100 M NaOH holds 0.100 × 0.0250 = 0.00250 mol of NaOH (100 mg).
  • Volume for an amount: to get 0.0500 mol from a 0.250 M solution, divide moles by molarity: 0.0500 ÷ 0.250 = 0.200 L (200 mL).

Those are the calculator's five options: molarity from moles or from grams, grams to weigh, moles, and volume. Keep every digit until the last step and round once at the end, to the number of significant figures in your data (three here), so rounding errors don't creep in.

Same molarity, different grams

Molarity counts particles (moles), not grams. Two solutions can have the same molarity and very different masses of solute, because a mole of a heavy molecule weighs more than a mole of a light one. For 250 mL of 0.100 M, you'd weigh 1.00 g of sodium hydroxide but 8.56 g of table sugar (sucrose):

Grams to weigh for 250 mL of 0.100 M

NaOH 39.997
1.00 g
NaCl 58.44
1.46 g
KCl 74.55
1.86 g
CaCl₂ 110.98
2.77 g
C₆H₁₂O₆ 180.16
4.50 g
CuSO₄·5H₂O 249.69
6.24 g
C₁₂H₂₂O₁₁ 342.3
8.56 g
Every bar is the same amount of solute, 0.0250 mol, so every solution is 0.100 M. The grams differ because the molar masses do (grams = molarity × liters × molar mass). Molar masses from PubChem.

That's why chemists use molarity: equal molarities mean the same number of moles, and so the same number of particles, in each liter, which is what matters when substances react. To go from grams to moles on their own, use the mole calculator.

How to make a solution of a given molarity

Work out the grams, weigh them, dissolve them in some of the solvent, then add solvent up to the final volume. The order matters, because molarity is per liter of solution, not per liter of water. Here's 500 mL of 0.150 M sodium chloride:

  1. 1. Weigh

    4.383 g of NaCl

    0.150 M × 0.500 L × 58.44 g/mol

  2. 2. Dissolve

    in less water than the final volume

    so there's room to fill to the mark

  3. 3. Fill to the mark

    up to 500 mL of solution

    the line on a 500 mL volumetric flask

  4. 4. Mix

    until it's the same all through

    a solution is uniform throughout

Molarity counts liters of solution, not liters of water added, so the solvent goes in last, up to the final volume. Grams computed with the calculator's code (molar mass of NaCl from PubChem).

Why not just add the solid to 500 mL of water? Because the volumes don't simply add up. As LibreTexts' chemistry text explains, dissolved particles "occupy less space than they had prior to their solvation, which causes the volume of the solution, as a whole, to decrease, relative to the combined volumes of the individual solute and solvent." How much it changes depends on the solute and solvent, so the only reliable volume is the one you measure at the end.

What changes the answer

  • Milliliters left unconverted. Divide 0.250 mol by 500 instead of 0.500 and you get 0.0005 M, 1,000 times too small. If your answer looks tiny, check the volume is in liters. The calculator lets you enter mL and converts for you.
  • The wrong molar mass, often a hydrate. Many lab chemicals come as hydrates, with water built into the crystals, and that water counts in the molar mass. Copper(II) sulfate pentahydrate (CuSO₄·5H₂O) is 249.69 g/mol; anhydrous CuSO₄ is 159.61 g/mol. Weigh 3.99 g of the pentahydrate for 250 mL of "0.100 M" and you actually get 0.0639 M, 36% weaker:

    Label says CuSO₄

    159.61 g/mol

    3.99 g

    for 250 mL of 0.100 M

    Label says CuSO₄·5H₂O

    249.69 g/mol (water included)

    6.24 g

    for 250 mL of 0.100 M

    3.99 g of the CuSO₄·5H₂O

    the wrong molar mass

    0.0639 M

    36% weaker than planned

    The water in a hydrate's crystals counts in its molar mass. Use the molar mass of the exact compound on the bottle: CuSO₄·5H₂O is 249.69 g/mol, not 159.61. Molar masses from PubChem; computed with the calculator's code.
  • Volume of solvent instead of solution. Dissolve first, then fill to the final volume (above).
  • Temperature. Liquids expand and contract, so the same solution has a slightly different molarity at different temperatures. In LibreTexts' words, "The volume of a solution, on the other hand, is slightly dependent upon temperature." For precise work, make and measure the solution at the temperature you'll use it at.
  • Purity. The calculation assumes the solid is 100% the compound on the label. If it isn't, the real molarity is lower in proportion.

Molarity, M and mol/L: what the standards say

Here's something most molarity pages skip: IUPAC's terminology and NIST's guide to the SI (the international system of units) describe "molarity" differently, and it's worth knowing if you write a lab report.

SourceName for the quantityOn "molarity" and M
IUPAC Gold BookAmount concentration (also amount-of-substance concentration)"in older literature molarity"; the unit mol L⁻¹ is "sometimes denoted by M"
NIST SP 811 (SI guide)Amount-of-substance concentration of B, cB = nB / V"The term molarity and the symbol M should no longer be used because they, too, are obsolete."
Chemistry classes and textbooksMolarityM, read "molar" (as in the LibreTexts text cited here)

All three mean the same number: 1 M = 1 mol/L = 1 mol/dm³. The difference is the label. NIST's guide asks for "such units as mol/dm³, kmol/m³, or mol/L", so when a report or journal follows SI style, write 0.200 mol/L; in class, 0.200 M is what your teacher expects.

Molarity vs molality

They differ by one letter and one denominator. Molarity divides moles of solute by the volume of the solution (mol/L). Molality, in NIST's definition, is the "amount of substance of solute B in a solution divided by the mass of the solvent" (mol/kg). Mass doesn't change with temperature, so, as LibreTexts puts it, "Molality is used because its value does not change with changes in temperature." Use molarity for making and using solutions at a set temperature, and molality when temperature changes, as in freezing-point and boiling-point problems.

Molarity after a dilution

Adding solvent doesn't change the moles of solute, only the volume, so c₁ × V₁ = c₂ × V₂. Dilute 10.0 mL of 1.00 M solution to 100.0 mL and the new molarity is 1.00 × 10.0 ÷ 100.0 = 0.100 M. Our dilution calculator solves for any one of the four values.

Solution-prep table: grams to weigh

Grams of solute for common molarities and volumes, computed with the calculator's code (grams = molarity × liters × molar mass) from PubChem's molar masses. Check the formula on your bottle, hydrate or not, before you pick a row.

Grams of solute to weigh for common molarities and volumes
Soluteg/mol0.100 M, 100 mL0.100 M, 250 mL0.100 M, 1 L0.500 M, 1 L1.00 M, 1 L
NaCl sodium chloride58.440.584 g1.461 g5.84 g29.22 g58.44 g
KCl potassium chloride74.550.746 g1.864 g7.46 g37.28 g74.55 g
NaOH sodium hydroxide39.9970.400 g1.000 g4.00 g20.00 g40.00 g
CaCl₂ calcium chloride110.981.110 g2.775 g11.10 g55.49 g110.98 g
CaCl₂·2H₂O calcium chloride dihydrate147.011.470 g3.675 g14.70 g73.51 g147.01 g
MgSO₄·7H₂O magnesium sulfate heptahydrate246.482.465 g6.162 g24.65 g123.24 g246.48 g
CuSO₄ copper(II) sulfate159.611.596 g3.990 g15.96 g79.81 g159.61 g
CuSO₄·5H₂O copper(II) sulfate pentahydrate249.692.497 g6.242 g24.97 g124.85 g249.69 g
C₆H₁₂O₆ glucose180.161.802 g4.504 g18.02 g90.08 g180.16 g
C₁₂H₂₂O₁₁ sucrose342.33.423 g8.558 g34.23 g171.15 g342.30 g

Molar masses from PubChem: NaCl, KCl, NaOH, C₆H₁₂O₆, C₁₂H₂₂O₁₁, CaCl₂, CaCl₂·2H₂O, CuSO₄, CuSO₄·5H₂O, MgSO₄·7H₂O. The table doesn't check whether a solute dissolves that far at your temperature, or how to handle it safely; check the safety data sheet and your lab's procedure.

Free printable: the formulas, the three steps, the traps and this table on one page. Download the sheet (PDF) or the image (PNG). Free to print and share with a link back to this page.

What the calculator assumes

  • You know the final volume of the solution (not the water you started with).
  • The molar mass you enter is for the exact compound you weighed, including any water of crystallization.
  • The solute is pure, and all of it dissolves.
  • The volume is measured at the temperature you'll use the solution at.

Try your own numbers

The Molarity calculator takes moles or grams and liters or milliliters, and shows the grams to weigh for a solution you want to make. For the rest of the set, see all our chemistry calculators. For homework, show each step as above; for lab work, your instructor's procedure comes first.

How to calculate molarity (30 seconds, captions on).
Transcript

How do you calculate molarity? Divide the moles of solute by the liters of solution. Start from grams: 9.00 grams of glucose, divided by its molar mass of 180.16 grams per mole, is 0.0500 moles. Then milliliters to liters: 250 milliliters is 0.250 liters. 0.0500 moles divided by 0.250 liters is 0.200 molar. Two traps. Forget to convert milliliters and your answer is 1,000 times too small. And a hydrate's water counts: copper sulfate pentahydrate is 249.69 grams per mole, not 159.61. Try it at freecalculators.ai.

How we checked this

Every number here is computed with the calculator's own math (lib/molarity.ts, with tests for each worked example). Molar masses are PubChem's, read on November 29, 2026. The definition and unit notes are quoted from the IUPAC Gold Book entry "amount concentration" (version 5.0.0) and NIST Special Publication 811, Chapter 8 (Secs. 8.6.5 and 8.6.8); the notes on volume and temperature from two LibreTexts chemistry texts (Heartland Community College's CHEM 120, Sec. 7.16, and CK-12's Introductory Chemistry, Sec. 16.11), all read on November 29, 2026. While writing this guide we found the Molarity calculator couldn't start from grams or take milliliters, though its FAQ said it could, so we added both. Kyle, our host, is an AI.

Frequently asked questions

How do you calculate molarity?

Divide the moles of solute by the liters of solution: M = mol ÷ L. From grams, first divide the mass by the molar mass. 9.00 g of glucose (180.16 g/mol) is 0.0500 mol; in 0.250 L of solution that's 0.200 M.

What is the formula for molarity?

Molarity (M) = moles of solute ÷ liters of solution. Rearranged: moles = M × liters, liters = moles ÷ M, and grams to weigh = M × liters × molar mass.

How do you calculate molarity from grams?

Divide the grams by the molar mass to get moles, convert the volume to liters, then divide moles by liters. For 9.00 g of glucose in 250.0 mL: 9.00 ÷ 180.16 = 0.0500 mol, ÷ 0.2500 L = 0.200 M.

How do you calculate molarity with milliliters?

Convert milliliters to liters first by dividing by 1,000 (250 mL = 0.250 L). Leaving the volume in milliliters makes the answer 1,000 times too small.

How many grams do I need to make a solution?

Multiply molarity × liters × molar mass. For 500 mL of 0.150 M NaCl: 0.150 × 0.500 × 58.44 = 4.38 g. Dissolve it, then add water up to 500 mL of solution.

Is molarity per liter of water or per liter of solution?

Per liter of solution. Dissolve the solute in less solvent than you need, then fill to the final volume, because the volumes of solute and solvent don't simply add.

What is the difference between molarity and molality?

Molarity is moles of solute per liter of solution (mol/L). Molality is moles of solute per kilogram of solvent (mol/kg). Molality doesn't change with temperature; molarity changes slightly because volume does.

Is M the same as mol/L?

Yes, 1 M = 1 mol/L = 1 mol/dm³. IUPAC says mol/L is sometimes denoted by M; NIST's SI guide calls the term molarity and the symbol M obsolete and asks for units such as mol/L instead.

Sources

For study and planning. Follow your instructor's or lab's procedure and the chemical's safety data sheet when you make a solution.