Audited ·Last updated 27 Jul 2026·6 citations·Tier 1·0 uses

Molarity Calculator

Free molarity calculator — solve for molarity, moles, volume, mass, or dilution using M = n/V and C1V1 = C2V2. Worked NaCl example.

Molarity Calculator

Solve for
Amount-of-substance concentration in mol/L (also written M). Required for solving moles, volume, or mass. Leave blank when solving for molarity.
mol/L
Amount of substance in moles. Required when solving for molarity or volume. Leave blank when solving for moles.
mol
Solution volume in litres. Convert mL to L by dividing by 1000 (500 mL = 0.5 L). Leave blank when solving for volume.
L
Mass of solute in grams. Used only when solveFor = 'mass' (you can leave it blank; the calculator computes it from molarity, volume, and molar mass).
g
Molar mass of the solute, in g/mol. Defaults to 58.44 (sodium chloride, NaCl). Look up your compound on the NIST WebBook or sum atomic masses from a periodic table.
g/mol
Concentration of the stock solution before dilution. Used only when solveFor = 'dilutionVolume'.
mol/L
Volume of stock solution taken for the dilution. Used only when solveFor = 'dilutionVolume'.
L
Desired concentration after dilution. Must be less than or equal to the initial concentration. Used only when solveFor = 'dilutionVolume'.
mol/L
Molarity
0.1
Amount-of-substance concentration M = n / V, in mol/L (equivalent to molar, symbol M).
Moles
0.05 mol
Volume
0.5 L
Mass of solute
2.922 g
Dilution volume (V2)
0 L

Background.

This molarity calculator solves the central concentration equation of solution chemistry — M = n / V — for whichever of molarity, moles, volume, or solute mass you do not know, and also handles the dilution law C1V1 = C2V2 for preparing a working solution from a stock. Pick a 'solve for' mode, type the values you know, and the tool returns the missing quantity in SI units (mol/L for concentration, mol for amount, L for volume, g for mass).

Molarity — formally called amount-of-substance concentration in the IUPAC Gold Book and abbreviated 'M' on reagent bottles — is the workhorse concentration unit of wet-lab chemistry, biochemistry, pharmacy, water-quality engineering, and any field where you need to know how many particles of a species are present per unit volume of solution rather than per unit mass. The reason wet-lab protocols are written in molarity rather than percent-by-mass or grams-per-litre is reaction stoichiometry: chemistry happens between particles, not between grams, so a 0.1 M solution of HCl and a 0.1 M solution of NaOH neutralize one another in equal volumes regardless of the fact that HCl and NaOH have different molar masses.

There is, however, an important caveat baked into the definition that many introductory students miss: because molarity is moles per litre of solution and a litre of solution expands with temperature (water expands roughly 0.02 percent per kelvin near room temperature, more in organic solvents), the molarity of a given prepared solution drifts slightly with temperature even though the amount of solute has not changed. This is why analytical chemistry sometimes prefers molality (moles of solute per kilogram of solvent) for high-precision work and physical-chemistry equations: mass is invariant, volume is not.

Below the widget you will find the formal definition, the derivation of M = n/V from the SI definition of the mole, the dilution-law derivation from particle conservation (C1V1 = C2V2 because the same number of particles is now spread through a larger volume), worked examples for preparing a 0.1 M NaCl saline, a discussion of when to use molarity versus molality versus mass percent, the unit-conversion tricks every wet-bench chemist memorizes (mol/L = mmol/mL = µmol/µL), and the safety footnotes for diluting strong acids and bases. The solver beneath the calculator uses Decimal.js arbitrary-precision arithmetic and is registered at molarity.solve in the Quanta engine; the same code path is exercised by unit tests for every mode including the edge cases (zero volume, zero molarity, final concentration exceeding initial, mismatched solveFor selection).

What is molarity calculator?

Molarity, denoted M and formally called amount-of-substance concentration by IUPAC, is the number of moles of a solute dissolved in one litre of solution: M = n / V. A '1 M' solution — read as 'one molar' — contains one mole of the solute per litre of total solution volume, and a 0.1 M solution contains a tenth of that. The mole itself is the SI base unit for amount of substance and, since the 2019 SI redefinition, is defined as exactly 6.02214076 × 10²³ elementary entities (Avogadro's number is now an exact integer rather than an experimentally measured one). To convert between mass and moles you use the compound's molar mass M_m in g/mol: n = mass / M_m, so mass = M × V × M_m. The molar mass is read off the periodic table by summing atomic masses — for sodium chloride, NaCl, that is 22.99 (Na) + 35.45 (Cl) = 58.44 g/mol, which is the default the calculator uses if you leave the field blank. The key contrast students often confuse is molarity versus molality. Molality (lowercase m, mol/kg) is moles of solute per kilogram of solvent — not per kilogram of solution — and crucially it is temperature-independent because mass does not change when you heat or cool the bottle. Molarity is more convenient in practice (you measure volumes with a volumetric flask, not weigh the solvent on a balance) but it drifts by a fraction of a percent across normal temperature ranges and by several percent across the full liquid range. For most bench work the drift is negligible; for colligative-property calculations, boiling-point elevation, freezing-point depression, and high-precision physical chemistry, switch to molality.

How to use this calculator.

  1. Pick a mode from the 'Solve for' menu — molarity, moles, volume, mass, or dilution volume. Each mode reads only the inputs it needs and ignores the rest.
  2. For molarity mode (M = n / V): enter moles and volume in litres. The calculator returns M in mol/L and also reports the equivalent mass using the molar mass field.
  3. For moles mode (n = M × V): enter molarity and volume. Useful when you have an existing stock and want to know how many moles a given aliquot contains.
  4. For volume mode (V = n / M): enter moles and target molarity. The calculator returns the solution volume in litres — divide by 0.001 to get millilitres.
  5. For mass mode (mass = M × V × molar mass): enter molarity, volume, and the molar mass of your compound. This is the everyday 'how much do I weigh out?' calculation. Default molar mass is 58.44 g/mol (NaCl); change it for any other solute.
  6. For dilution mode (C1V1 = C2V2): enter the stock concentration C1, the volume of stock V1 you plan to take, and the final concentration C2 you want. The calculator returns V2, the total final volume. The water you add is V2 − V1.
  7. Watch the units. All volumes in the calculator are litres, all masses are grams. Convert mL → L by dividing by 1000 and mg → g by dividing by 1000 before entering values.

The formula.

M = n ⁄ V

Three equations underlie every mode of this calculator. They follow directly from the definitions of amount, mass, and concentration.

M = n / V (definition of molarity) n = mass / M_m (mole–mass conversion via molar mass M_m) C1 × V1 = C2 × V2 (dilution law, from particle conservation)

From the first two you can express any one of {M, n, V, mass} in terms of the others — that is what the solveFor modes do under the hood. Setting solveFor = molarity gives M = n / V directly. Setting solveFor = moles gives n = M × V. Setting solveFor = volume gives V = n / M, which the calculator guards against M = 0 (division by zero). Setting solveFor = mass chains the two: mass = (M × V) × M_m, with M_m defaulting to 58.44 g/mol for NaCl when no molar mass is supplied.

The dilution law deserves its own derivation because students often memorize it without understanding it. When you take V1 litres of a stock solution at concentration C1, you have removed n = C1 × V1 moles of solute. If you then add solvent to bring the total volume to V2, you have not added or removed any solute — only diluted what was already there. So the new concentration is C2 = n / V2 = (C1 × V1) / V2, which rearranges to C1 × V1 = C2 × V2. The calculator rejects C2 > C1 (dilution cannot increase concentration) and C2 = 0 (division by zero), but it accepts the limiting case C1 = C2, which corresponds to zero dilution.

One last unit identity worth memorizing because it saves wet-bench time every day: 1 mol/L = 1 mmol/mL = 1 µmol/µL. The same number of significant figures applies whether you scale the volume by 1000× or by 1 000 000×, which is why benchtop pipetting in microlitres pairs naturally with millimolar concentrations.

A worked example.

Example

Standard biology-prep problem: you need 500 mL of 0.1 M sodium chloride (a roughly physiological saline strength is closer to 0.154 M, but 0.1 M is a common stock for buffers and titrations). Pick solveFor = mass, enter molarity = 0.1, volume = 0.5 (litres), and molar mass = 58.44 g/mol (the molar mass of NaCl, 22.99 + 35.45). The calculator chains the two equations: first n = M × V = 0.1 × 0.5 = 0.05 mol, then mass = n × M_m = 0.05 × 58.44 = 2.922 g. So you weigh out 2.922 g of NaCl on a balance with at least 0.001 g resolution, transfer it quantitatively to a 500 mL volumetric flask, dissolve in a portion of deionized water, then top up to the 500 mL graduation mark — not 'add 500 mL of water', because the dissolved salt itself takes up a small but non-zero volume. The calculator's other outputs all agree: moles = 0.05, volume = 0.5, molarity = 0.1. If you instead needed a 250 mL prep of the same concentration, halve everything: 1.461 g of NaCl in a 250 mL volumetric. If you needed 0.5 M (five times more concentrated) at the same 500 mL volume, multiply the mass by five: 14.61 g.

volume0.5
molar Mass58.44
molarity0.1
solve Formass

Frequently asked questions.

What is the difference between molarity and molality?
Molarity (uppercase M, mol/L) is moles of solute per litre of total solution. Molality (lowercase m, mol/kg) is moles of solute per kilogram of solvent — note 'solvent', not 'solution'. The practical difference is that molarity is fast (you measure volume in a volumetric flask) but temperature-dependent (volume expands when heated, so molarity drifts), while molality is slower to prepare (you must weigh the solvent on a balance) but temperature-independent because masses do not change with temperature. For most bench work the temperature dependence of molarity is negligible — water expands roughly 0.02 percent per kelvin near room temperature — so you can ignore it. For colligative properties (boiling-point elevation, freezing-point depression, osmotic pressure) and high-precision physical-chemistry equations, switch to molality.
Why does molarity change with temperature but molality does not?
Because molarity is defined per unit volume and molality is defined per unit mass, and only volume responds to temperature. When you heat a 1 L volumetric flask of solution, the liquid expands — typical thermal expansion of water near 25 °C is about 2.5 × 10⁻⁴ per kelvin — so the same number of moles now occupies more than a litre, which means the moles-per-litre figure has dropped. Molality is moles per kilogram of solvent, and a kilogram is a kilogram whether the solution is at 4 °C or 80 °C, so the ratio does not change. Across normal lab temperatures the molarity drift is well under 1 percent and rarely matters; across the full liquid range of water (0 °C to 100 °C) it is closer to 4 percent and starts to matter for analytical work. Volumetric flasks are calibrated at 20 °C for this reason.
How do I calculate the mass of solute needed for a given molarity?
Multiply molarity by volume to get moles (n = M × V), then multiply moles by the molar mass of your compound to get mass in grams (mass = n × M_m). The molar mass comes from summing atomic masses across the molecular formula, or from a database like the NIST Chemistry WebBook. Example: for 250 mL of 0.5 M glucose (C6H12O6, molar mass 180.16 g/mol), n = 0.5 × 0.25 = 0.125 mol and mass = 0.125 × 180.16 = 22.52 g. Set the calculator to solveFor = mass, enter molarity = 0.5, volume = 0.25, molar mass = 180.16, and confirm. For hydrates like CuSO4·5H2O, use the molar mass of the hydrate (249.69 g/mol), not the anhydrous salt — the waters of hydration count.
How do I dilute a stock solution using C1V1 = C2V2?
Decide the final concentration C2 and final volume V2 you want, then compute the volume of stock V1 = C2 × V2 / C1. Pipette V1 of the stock into a volumetric flask of total capacity V2 and top up with solvent. Example: you have 1 M HCl stock and need 100 mL of 0.1 M working solution. V1 = 0.1 × 0.1 / 1 = 0.01 L = 10 mL — pipette 10 mL of 1 M HCl into a 100 mL volumetric flask, top up to the mark with water. Critically: add acid to water, not water to acid, because the dissolution is exothermic and adding water to concentrated acid can boil and spit. The calculator's solveFor = dilutionVolume mode returns V2 instead, which is the form you want when you have already committed to a stock volume V1 (e.g. a fixed-volume aliquot from a vial) and want to know what final volume gives the target concentration.
What is a 1 M solution?
A 1 M solution — read as 'one molar' — contains exactly one mole of solute per litre of total solution. For sodium chloride, that is 58.44 g of NaCl made up to 1.000 L of total volume with water (not 58.44 g of NaCl plus 1.000 L of water, which would give a slightly larger total volume and a slightly lower molarity). For glucose (180.16 g/mol) it is 180.16 g per litre. For sulphuric acid (98.08 g/mol) it is 98.08 g per litre, but in practice you do not prepare H2SO4 by weighing — you dilute the 18 M concentrated stock using C1V1 = C2V2. One mole is 6.02214076 × 10²³ entities (Avogadro's number, fixed by the 2019 SI redefinition), so a 1 M solution contains about 6 × 10²³ solute particles per litre — an astronomical number, which is why even very dilute solutions still have plenty of particles for chemistry to happen.
Can I have a negative molarity or a molarity greater than the solubility limit?
Negative molarity has no physical meaning — concentration is a non-negative quantity — and the calculator rejects negative inputs at the validation layer. Exceeding the solubility limit is more subtle: the calculator will happily return a numerical answer for, say, 10 M NaCl, but 10 M NaCl is physically impossible because NaCl saturates at about 6.14 M in water at 25 °C. Beyond saturation the excess solute simply does not dissolve; it sits as a solid at the bottom of the flask, and the supernatant remains at the saturation concentration. So always sanity-check your target molarity against the solute's solubility (the CRC Handbook of Chemistry and Physics tabulates this for thousands of compounds). For sparingly soluble compounds — calcium carbonate, silver chloride — even millimolar concentrations may be unreachable in pure water.
How do I convert between molarity, mass percent, and ppm?
These three concentration units measure different things and the conversion requires the solution's density. Mass percent (% w/w) is grams of solute per 100 g of solution. Parts per million (ppm) is roughly mg/L for dilute aqueous solutions (because 1 L of dilute water weighs roughly 1 kg = 10⁶ mg). To convert from molarity M (mol/L) to mass percent: mass percent = (M × M_m) / (10 × ρ), where M_m is the molar mass in g/mol and ρ is the solution density in g/mL. To convert from molarity to ppm in a dilute aqueous solution: ppm ≈ M × M_m × 1000. Example: 0.01 M NaCl = 0.01 × 58.44 × 1000 = 584 ppm. For non-aqueous solvents or very concentrated solutions, you must use the actual measured density rather than approximating it as 1 g/mL.
What is the default molar mass of 58.44 g/mol?
It is the molar mass of sodium chloride, NaCl — the world's most common laboratory solute and the obvious worked example for a molarity tutorial. The figure comes from summing the standard atomic weights of sodium (22.989769 g/mol) and chlorine (35.45 g/mol, an interval reflecting the natural isotopic abundance variation of chlorine). If you are working with any other compound, replace the default. Glucose is 180.16, ethanol is 46.07, sucrose is 342.30, calcium chloride dihydrate is 147.01, copper(II) sulphate pentahydrate is 249.69. The NIST Chemistry WebBook (webbook.nist.gov) gives molar masses to higher precision for thousands of compounds, and any periodic table app will let you sum atomic weights from a molecular formula.
Does this calculator work for non-aqueous solutions?
Yes — the equations M = n/V, n = mass/M_m, and C1V1 = C2V2 are solvent-agnostic and apply equally to organic solvents, ionic liquids, supercritical CO2, and even gas-phase 'solutions' once you reinterpret volume appropriately. What changes between solvents is the density and the temperature dependence: organic solvents like ethanol, acetone, and dichloromethane expand more per kelvin than water (typical thermal expansion 1.1 × 10⁻³ /K versus 2.5 × 10⁻⁴ /K), so the molarity-vs-temperature drift is roughly four times larger and worth correcting for in precise work. Solubility limits also differ wildly — NaCl is essentially insoluble in dry ethanol, while iodine is more soluble in ethanol than in water — so always check the solute–solvent pairing against a solubility table before targeting a particular molarity.

References& sources.

  1. [1]IUPAC Gold Book, 'amount-of-substance concentration, c' — the formal IUPAC definition of molarity, c = n / V, including the modern recommendation to use 'c' rather than 'M' as the quantity symbol and the explicit note that 'molar concentration' and 'molarity' are accepted synonyms. International Union of Pure and Applied Chemistry.
  2. [2]Atkins, P. W. & de Paula, J. (2014). Atkins' Physical Chemistry, 10th ed. Oxford University Press. Chapter 1A 'The properties of gases' and Foundations section on amount of substance, molar quantities, and the distinction between molarity and molality including the temperature-dependence argument.
  3. [3]NIST 'Definition of the Mole' (2019 SI redefinition) — the mole is defined as exactly 6.02214076 × 10²³ elementary entities; Avogadro's number is now an exact, fixed integer rather than an experimentally measured constant. National Institute of Standards and Technology, Physical Measurement Laboratory.
  4. [4]Skoog, D. A., West, D. M., Holler, F. J. & Crouch, S. R. (2014). Fundamentals of Analytical Chemistry, 9th ed., Cengage. Chapter 4 on concentration units, the molarity-versus-molality discussion, and the standard protocols for preparing solutions by mass and by dilution from stock.
  5. [5]NIST Chemistry WebBook — searchable database of molar masses, thermochemistry, and spectroscopy for over 100,000 compounds; the canonical primary source for molar-mass values entered into molarity calculations. National Institute of Standards and Technology.
  6. [6]Lide, D. R. (ed.) (2005). CRC Handbook of Chemistry and Physics, 86th ed., CRC Press. Section 8 'Analytical Chemistry' on solubility tables, density of aqueous solutions versus concentration, and conversion factors between molarity, molality, mass percent, and ppm.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon