How to Calculate Molarity (With Dilution and Lab Examples)

Volumetric flask of teal solution beside a digital balance with powder, a beaker, pipette and a 0.500 M label

To calculate molarity, divide the moles of solute by the volume of solution in liters: M = mol ÷ L. If you start from a mass, first convert grams to moles by dividing by the molar mass. For example, 5.00 g of NaOH (39.997 g/mol) is 0.125 mol, and dissolved to 250 mL it gives 0.500 M.

That one line covers most homework problems, and our molarity calculator does the arithmetic for you in either direction. What makes molarity tricky in practice is everything around it: getting the molar mass right for hydrates, using the volume of the finished solution rather than the water you poured in, and diluting a stock without losing track of units. This guide covers each step the way you would do it at the bench.

What molarity means

Molarity (symbol c or M, also called molar concentration or amount concentration) is the number of moles of a dissolved substance per liter of solution. Its unit is mol/L, written M for short, so “0.5 M NaCl” means half a mole of sodium chloride in every liter of the final solution.

A mole is a counting unit: exactly 6.02214076 × 10²³ particles, a value fixed by the 2019 revision of the SI described by the International Bureau of Weights and Measures. Chemists like molarity because reactions happen particle by particle. If you know a solution is 0.200 M and you pipette 25.0 mL, you know you dispensed 0.00500 mol, without weighing anything.

Three related formulas carry the whole topic:

  • Moles from mass: n = m ÷ M (mass in g, molar mass in g/mol)
  • Molarity: c = n ÷ V (volume in L)
  • Mass needed: m = c × V × M

Step 1: Find the molar mass from the formula

Molar mass is the sum of the atomic weights of every atom in the formula. Atomic weights come from the periodic table (the standard values are maintained by IUPAC). Count each element, multiply by its atomic weight, then add.

Example: copper(II) sulfate pentahydrate, CuSO₄·5H₂O

  • Cu: 1 × 63.546 = 63.546
  • S: 1 × 32.06 = 32.06
  • O: 4 + 5 = 9 oxygen atoms × 15.999 = 143.991
  • H: 5 × 2 = 10 hydrogen atoms × 1.008 = 10.080

Total: 249.68 g/mol. The five waters of hydration add 90.08 g/mol, more than a third of the total. Forget them and every solution you make from the blue crystals will be 36% too weak. The molar mass calculator parses brackets and hydrate dots for you and shows the contribution of each element.

Molar masses of common lab chemicals

CompoundFormulaMolar mass (g/mol)Grams for 1 L of 0.100 M
Sodium chlorideNaCl58.445.844
Sodium hydroxideNaOH40.004.000
Potassium chlorideKCl74.557.455
Hydrogen chlorideHCl36.463.646
Sulfuric acidH₂SO₄98.079.807
GlucoseC₆H₁₂O₆180.1618.016
SucroseC₁₂H₂₂O₁₁342.3034.230
Copper(II) sulfate pentahydrateCuSO₄·5H₂O249.6824.968

Step 2: Convert grams to moles

Divide the mass you weighed by the molar mass. Keep at least one more significant figure than your final answer needs, then round at the end.

Example: you dissolve 4.50 g of glucose. Moles = 4.50 ÷ 180.156 = 0.02498 mol. The grams to moles calculator handles this step on its own if that is all you need.

How to calculate molarity: the full worked example

Here is the classic textbook question, start to finish: 5.00 g of sodium hydroxide is dissolved in water and made up to 250.0 mL. What is the molarity?

  1. Molar mass of NaOH: 22.990 + 15.999 + 1.008 = 39.997 g/mol.
  2. Moles: 5.00 ÷ 39.997 = 0.12501 mol.
  3. Volume in liters: 250.0 mL ÷ 1000 = 0.2500 L.
  4. Molarity: 0.12501 ÷ 0.2500 = 0.500 M.

Going the other way is just as common: how many grams of NaCl do I need for 250 mL of 0.150 M saline? Mass = 0.150 mol/L × 0.250 L × 58.44 g/mol = 2.19 g. For 500 mL of 0.100 M copper sulfate from the pentahydrate: 0.100 × 0.500 × 249.68 = 12.48 g.

Converting between units is a frequent source of slips, so here are the ones you will meet most:

UnitMeaningEquals
Mmol/L1 M
mM (millimolar)mmol/L0.001 M
µM (micromolar)µmol/L0.000001 M
nM (nanomolar)nmol/L10⁻⁹ M
mol/m³SI base units0.001 M (so 1 mM = 1 mol/m³)

Dilutions with C₁V₁ = C₂V₂

When you add solvent, the amount of solute does not change, only the volume does. Moles before equals moles after, and since moles are concentration times volume:

C₁ × V₁ = C₂ × V₂

C₁ and V₁ are the stock concentration and the volume of stock you take; C₂ and V₂ are the final concentration and final volume. Any three give you the fourth. The units only need to match on each side, so you can work in mL and mM without converting.

Example: making a working solution from stock

You need 100 mL of 0.050 M NaCl and have a 1.0 M stock. V₁ = C₂V₂ ÷ C₁ = 0.050 × 100 ÷ 1.0 = 5.0 mL. Pipette 5.0 mL of stock into a 100 mL volumetric flask and fill to the mark (about 95 mL of water, but fill to the line rather than measuring the water). The dilution calculator solves for any of the four values and tells you how much solvent to add.

Example: diluting concentrated hydrochloric acid

Concentrated HCl is sold as about 37% w/w with a density of 1.19 g/mL. Its molarity is (1000 mL × 1.19 g/mL × 0.37) ÷ 36.46 g/mol = 12.1 M. To make 250 mL of 0.100 M: V₁ = 0.100 × 250 ÷ 12.08 = 2.07 mL. Always add the acid to water, not water to acid, so the heat of mixing goes into a large volume. The percentage concentration to molarity calculator does the first part of this for any reagent bottle label.

For very large dilutions, chain several smaller ones. Three successive 1:10 steps take a 0.1 M stock to 0.0001 M (100 µM) with far better accuracy than one 1:1000 step, because you never have to measure a microscopic volume. The serial dilution calculator lays out each step.

Preparing a solution in the lab

The calculation is the easy part. Making the solution accurately depends on technique:

  1. Calculate the mass with m = c × V × M, using the exact formula on the bottle (anhydrous or hydrate).
  2. Weigh onto a weighing boat or paper on an analytical balance. Record the actual mass; if you weigh 2.205 g instead of 2.192 g, recalculate the real concentration rather than chasing the target.
  3. Dissolve in roughly 60–80% of the final volume of solvent in a beaker. Stir until fully dissolved and let it return to room temperature, because dissolving NaOH, for instance, releases heat and warm liquid takes up more volume.
  4. Transfer quantitatively into a volumetric flask, rinsing the beaker two or three times and adding the rinses.
  5. Make up to the mark so the bottom of the meniscus sits on the line at eye level. Stopper and invert 10–15 times to mix.
  6. Label with compound, concentration, date and your initials.

Glassware tolerance matters more than people expect. A Class A 250 mL volumetric flask is typically good to ±0.12 mL, while a 250 mL graduated beaker might be off by 5% or more. If you measured your final volume in a beaker, your molarity is only as good as that beaker. Comparing your result with an expected value is a job for percent error, covered in our guide to percent error vs percent difference.

Molarity vs molality and other concentration units

Molarity is not the only way to state concentration, and mixing them up is a common exam trap.

  • Molality (m) is moles of solute per kilogram of solvent, not per liter of solution. It does not change with temperature, which is why it is used for boiling-point and freezing-point calculations. Use the molality calculator when a problem gives you the mass of water.
  • Percent w/v is grams per 100 mL. Normal saline is 0.9% w/v, or 9 g/L, which is 9 ÷ 58.44 = 0.154 M.
  • Normality (N) multiplies molarity by the number of reacting equivalents. 1 M H₂SO₄ is 2 N as an acid because each molecule gives two H⁺.
  • ppm is used for trace amounts; in dilute water solutions 1 ppm is about 1 mg/L.

Molarity is also the starting point for pH. A 0.010 M solution of HCl, a strong acid, has [H⁺] = 0.010 M and a pH of 2. Our guide to calculating pH picks up from there.

Common mistakes

  • Using mL instead of L. 0.125 mol in 250 mL is 0.500 M, not 0.0005 M. Divide mL by 1000 first.
  • Using the solvent volume. Molarity uses the final solution volume. Dissolving 58.44 g of NaCl in 1.000 L of water gives slightly more than a liter of solution, so slightly less than 1 M.
  • Ignoring water of hydration. Check whether your bottle says CuSO₄ or CuSO₄·5H₂O, MgSO₄ or MgSO₄·7H₂O.
  • Adding V₂ of water in a dilution. V₂ is the final total volume. Water added = V₂ − V₁.
  • Rounding molar mass too hard. Using 58 instead of 58.44 for NaCl already introduces a 0.8% error.
  • Weighing a hygroscopic solid slowly. NaOH pellets pick up water and CO₂ from the air, so standardize NaOH solutions by titration if you need an exact value.

Frequently asked questions

What is the formula for molarity?

Molarity = moles of solute ÷ liters of solution. If you have the mass instead of moles, use M = mass ÷ (molar mass × volume in liters).

How do you calculate molarity from grams?

Divide the grams by the molar mass to get moles, then divide by the solution volume in liters. For 4.50 g of glucose in 500 mL: 4.50 ÷ 180.16 ÷ 0.500 = 0.0500 M.

Is molarity the same as concentration?

Molarity is one kind of concentration, specifically moles per liter. Other kinds include mass concentration (g/L), percent solutions, molality and ppm, and you can convert between them if you know the molar mass and sometimes the density.

Does molarity change with temperature?

Slightly, yes. Liquids expand as they warm, so the same moles occupy more volume and the molarity drops a little. For precise work, make up solutions at the temperature the glassware is calibrated for, usually 20 °C.

How do I calculate the molarity after mixing two solutions?

Add the moles of solute from each solution (c × V for each), then divide by the combined volume. Mixing 50 mL of 0.20 M with 150 mL of 0.10 M NaCl gives (0.010 + 0.015) mol ÷ 0.200 L = 0.125 M.

Once you treat molarity as a count of particles packed into a known volume, each problem reduces to a few unit conversions in a row. Write the units next to every number, check your molar mass against the exact formula on the bottle, and let the molarity and dilution calculators confirm your arithmetic before you start weighing.