Molarity Calculator

Turn grams, molecular weight, and volume into molarity, or solve for the mass to weigh out, the volume to prepare, or the molecular weight, with quick-picks for common reagents.

Result

—mass to weigh out
—moles of solute

How this calculator works

Molarity ties four quantities together: the concentration you want, the volume you're preparing, the compound's molecular weight, and the mass on the balance. Given any three, the fourth follows. The default mode answers the daily-lab question ("how many grams do I weigh out?"), but the solver flips to any variable, including molecular weight (useful for checking what's in an unlabeled stock).

The quick-pick menu fills the molecular weight for common reagents. Choosing one overwrites the MW field, and typing your own value flips the menu back to "custom" so the two can never silently disagree. For hydrated compounds, the quick-picks use the hydrate's weight, the number that matches what's in the jar.

The formula

Molarity (mol/L) = mass (g) ÷ [ MW (g/mol) × volume (L) ]

mass   = M × V × MW
volume = mass ÷ (MW × M)
MW     = mass ÷ (M × V)

One mole is 6.022 × 10²³ particles. The molecular weight in g/mol is the bridge between countable moles and weighable grams. All units convert internally to mol/L, liters, and grams before solving.

Worked example

Say you need 1 L of 150 mM NaCl (physiological saline):

  1. Convert: 150 mM = 0.15 mol/L
  2. Moles needed: 0.15 × 1 L = 0.15 mol
  3. Mass: 0.15 × 58.44 g/mol = 8.766 g

Weigh 8.77 g of NaCl, dissolve it in about 900 mL of water, then top up to exactly 1 L. The same arithmetic with MgCl₂·6H₂O would need 203.30 in the MW slot: 30.5 g for the same 150 mM, over three times the mass, because you're weighing the water of crystallization too.

Assumptions & tips

  • Read the bottle's FW, not a memory. Suppliers sell many compounds in several hydration states, and each has its own formula weight. The label always wins over a table, including this page's quick-picks.
  • Dissolve first, then bring to volume. Some solutes shrink or swell the solution noticeably (concentrated salts, sugars). Dissolving in ~90% of the water and topping up gives the correct final concentration.
  • Watch pH-adjusted buffers. Tris and HEPES recipes typically titrate to pH after dissolving: do the pH adjustment before the final top-up to volume, or the acid/base addition dilutes your work.
  • Sanity-check with round numbers. A 1 M solution of anything is its MW in grams per liter. If your calculated mass isn't roughly (MW × molarity × liters), a unit slipped somewhere.
  • Diluting an existing stock instead of powder? That's the C₁V₁ = C₂V₂ calculator's job: molarity math is for going from solid reagent to solution.

Frequently asked questions

What is the difference between molarity and molality?

Molarity (M) is moles of solute per liter of solution, the everyday lab unit, and what this calculator computes. Molality (m) is moles per kilogram of solvent, used when the concentration must not change with temperature, because a solution's volume expands with heat but its mass does not. For dilute aqueous solutions at room temperature the two are numerically close.

Which molecular weight do I use for hydrated salts?

The one on the bottle you are weighing. Magnesium chloride hexahydrate (MgCl₂·6H₂O) weighs 203.30 g/mol, while anhydrous MgCl₂ is 95.21. The water of crystallization is part of every gram you put on the balance. Using the anhydrous MW with a hydrated reagent makes your solution more than twice as dilute as intended, and it is among the most common solution-prep errors.

Where do I find a compound's molecular weight?

On the reagent bottle's label (listed as MW or FW, formula weight), in the supplier's catalog entry, or by summing atomic weights from the periodic table. The quick-pick list here covers common lab reagents with their standard values, but when the bottle disagrees with a table, trust the bottle, since it reflects the actual lot and hydration state.

Does temperature affect molarity?

Slightly, because molarity is defined per liter of solution and liquids expand when warm. A solution made at 20 °C is a fraction of a percent less concentrated at 37 °C. Volumetric glassware is calibrated at 20 °C. The effect is negligible for routine buffers. Exacting analytical work uses molality or standardization to avoid it.

Sources

  1. Chemistry 2e, §3.3 — Molarity. OpenStax, Rice University. openstax.orgDefines molarity as moles of solute per liter of solution, the definition this page solves in all four directions, including the mass = M × V × MW rearrangement used by the default "mass to weigh out" mode.
  2. The International System of Units (SI), 9th edition. Bureau International des Poids et Mesures, 2019. bipm.orgDefines the mole by fixing the Avogadro number at exactly 6.02214076 × 10²³ elementary entities: the constant quoted in the formula section as the bridge between countable moles and weighable grams.
  3. Standard Atomic Weights. IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW). ciaaw.orgThe IUPAC-recommended atomic weights that a formula weight is summed from, which is the third of the three ways the FAQ lists for finding a compound's molecular weight.
  4. PubChem. National Center for Biotechnology Information, U.S. National Library of Medicine. pubchem.ncbi.nlm.nih.govCross-check for the molecular weights in the compound quick-pick list, including the hydrate case the FAQ singles out: PubChem lists magnesium chloride hexahydrate at 203.30 g/mol against 95.21 for the anhydrous salt.
  5. Quantities, Units and Symbols in Physical Chemistry (the IUPAC "Green Book"). International Union of Pure and Applied Chemistry / RSC Publishing. iupac.orgThe formal definitions of amount concentration (per volume of solution) and molality (per mass of solvent) that the first FAQ contrasts, and the symbols and unit conventions the M/mM/µM selector follows.
  6. The Calibration of Small Volumetric Laboratory Glassware (NBSIR 74-461). Josephine Lembeck, National Bureau of Standards (now NIST), December 1974. nvlpubs.nist.govGives 20 °C as the usual reference temperature to which volumetric glassware capacities are corrected (the calibration fact behind the FAQ on molarity drifting with temperature) plus the fill-and-adjust-to-the-mark technique behind "dissolve first, then bring to volume".