Molarity Calculator
Calculate the molarity of a solution from mass, molar mass, and volume — plus a dilution calculator (C₁V₁ = C₂V₂).
From mass and volume
Dilution (C₁V₁ = C₂V₂)
Volume of stock solution needed, topped up to V₂ with solvent.
Molarity Calculator: Formula, Worked Examples & Complete Guide
Written by Mathew | Financial Tools & Calculation Specialist · Last updated July 31, 2026
In two sentences: A molarity calculator finds the concentration of a solution by dividing moles of solute by liters of solution, using the formula M = n ÷ V, and can also work backward to determine how much solute or solvent you need to prepare a solution at a target concentration. This guide breaks down the formula, worked examples covering dilutions, and the difference between molarity and other concentration units chemistry students often confuse.
What Is a Molarity Calculator?
A molarity calculator determines the concentration of a chemical solution, expressed in moles of solute per liter of solution (mol/L, also written as M). It’s a foundational calculation in chemistry, used for everything from preparing lab reagents to calculating dosages in pharmaceutical formulations.
The Molarity Formula
Molarity (M) = Moles of Solute (n) ÷ Volume of Solution in Liters (V)
Converting grams to moles first
Since solute is usually measured by mass (grams) rather than directly in moles, an intermediate conversion step is often required:
Moles = Mass (g) ÷ Molar Mass (g/mol)
The dilution formula
For diluting an existing solution to a lower concentration:
M₁V₁ = M₂V₂
M₁ = initial molarity, V₁ = initial volume
M₂ = final molarity, V₂ = final volume
Worked Examples
Example 1: Basic molarity calculation
You dissolve 2 moles of sodium chloride (NaCl) in enough water to make 4 liters of solution.
Molarity = 2 mol ÷ 4 L = 0.5 M
Example 2: Starting from grams instead of moles
You dissolve 58.5 grams of NaCl (molar mass ≈ 58.5 g/mol) in enough water to make 2 liters of solution.
Moles = 58.5 g ÷ 58.5 g/mol = 1 mol
Molarity = 1 mol ÷ 2 L = 0.5 M
Example 3: Solving for volume needed
You need to prepare 0.25 M solution using 5 moles of solute. How many liters of solution do you need to make?
V = n ÷ M = 5 mol ÷ 0.25 M = 20 L
Example 4: Diluting a stock solution
You have a 6 M stock solution of hydrochloric acid and need 500 mL (0.5 L) of a 1.5 M working solution. How much stock solution do you need?
M₁V₁ = M₂V₂
6 × V₁ = 1.5 × 0.5
6 × V₁ = 0.75
V₁ = 0.75 ÷ 6 = 0.125 L = 125 mL
You would measure out 125 mL of the 6 M stock solution and add water to bring the total volume up to 500 mL.
Step-by-Step: How to Use a Molarity Calculator
- Determine your solute amount — if given in grams, convert to moles by dividing by the molar mass.
- Determine your total solution volume in liters (not just solvent volume — total solution volume after mixing).
- Divide moles by liters to find molarity.
- For dilution problems, use M₁V₁ = M₂V₂ instead, solving for whichever variable is unknown.
- Double-check units throughout — molarity calculations are one of the most common places where a unit mismatch (milliliters vs. liters, or grams vs. moles) produces a result off by a factor of 1,000 or more.
Molarity vs. Other Concentration Units
Molarity is just one of several ways chemists express concentration, and confusing them is a common source of error:
- Molarity (M) — moles of solute per liter of solution, the most common unit in general chemistry.
- Molality (m) — moles of solute per kilogram of solvent (not solution), used when temperature-independent concentration matters, since volume changes with temperature but mass doesn’t.
- Mass percent — grams of solute per 100 grams of total solution, common in industrial and commercial contexts.
- Parts per million (ppm) — used for very dilute solutions, common in environmental and water quality contexts.
The key distinction between molarity and molality is subtle but important: molarity is based on solution volume, which can expand or contract slightly with temperature, while molality is based on solvent mass, which doesn’t change with temperature — making molality the more precise choice for temperature-sensitive experiments.
Common Molarity Calculation Mistakes
- Using solvent volume instead of total solution volume. Molarity is defined by the total volume of the finished solution, not just the water or solvent added before the solute went in.
- Forgetting to convert grams to moles first, and dividing mass directly by volume — this produces a concentration in g/L, not the moles-per-liter figure molarity actually requires.
- Mixing milliliters and liters without converting. Since molarity is defined per liter, any volume given in mL must be divided by 1000 before use in the formula.
- Confusing M₁V₁=M₂V₂ dilution problems with straightforward molarity calculations. Dilution problems specifically involve two concentration-volume pairs connected by this shortcut formula, not a fresh moles-over-volume calculation.
Real-World Uses for a Molarity Calculator
- Laboratory reagent preparation — accurately preparing solutions at a specified concentration for experiments.
- Pharmaceutical formulation — calculating precise drug concentrations for solutions and IV preparations.
- Water treatment and environmental testing — determining chemical concentrations in treatment processes.
- Industrial chemical processing — maintaining precise concentrations for manufacturing and quality control.
- Academic chemistry coursework — a fast way to verify manual molarity and dilution calculations.
Using a Molarity Calculator Correctly in the Lab
A molarity calculator is most valuable in the moments before you actually mix a solution, since a mistake caught on paper is far cheaper than one discovered mid-experiment.
Best practices when using a molarity calculator
- Double-check molar mass before converting grams to moles. A molarity calculator’s grams-to-moles step depends entirely on an accurate molar mass value, and a wrong molar mass produces a confidently wrong final concentration.
- Confirm you’re using total solution volume, not just solvent volume. This is the single most common error when preparing a real solution — the solute itself contributes to total volume, so measuring only the water added before mixing will overstate the final concentration.
- Use the dilution formula for any working-solution preparation, rather than trying to back-calculate from scratch, since M₁V₁=M₂V₂ is specifically built for exactly this scenario and reduces the chance of a setup error.
- Label prepared solutions immediately with their calculated molarity, since even a correctly run molarity calculator result is only useful if it stays attached to the right container throughout a multi-step experiment.
Frequently Asked Questions
Concentration is the general term for how much solute is present in a solution, while molarity is one specific, standardized way of expressing that concentration (moles of solute per liter of solution).
Because molarity is defined in moles, not grams, and molar mass is the conversion factor between the two — dividing a solute’s mass in grams by its molar mass converts it into the moles needed for the molarity formula.
M₁V₁ = M₂V₂ works because the total moles of solute stay constant during a dilution — only the volume (and therefore concentration) changes, since you’re adding solvent, not more solute.
Yes, slightly — since molarity depends on solution volume, and most liquids expand slightly when heated, molarity can shift marginally with temperature. This is why molality (based on solvent mass, which doesn’t change with temperature) is preferred for highly temperature-sensitive applications.
Related Calculators
- Horsepower Calculator
- Heat Index Calculator
- Height Calculator
- Ohm’s Law Calculator
- Fuel Cost Calculator
- Shoe Size Conversion Calculator
- Common Factor Calculator
- Tile Calculator
- Speed Calculator
- Engine Horsepower Calculator
- Tire Size Calculator
- Love Calculator
- Concrete Calculator
- Gravel Calculator
- Bra Size Calculator
- Bandwidth Calculator
In summary, a molarity calculator applies a straightforward formula — moles of solute divided by liters of solution — but getting an accurate result depends on careful unit conversion, especially converting grams to moles and using total solution volume rather than solvent volume alone.
About the author: Mathew is a Financial Tools & Calculation Specialist focused on building and fact-checking online calculators across chemistry, science, and laboratory measurement topics.
Note: This calculator and article are provided for general educational and informational purposes only. Always double-check results for critical laboratory, pharmaceutical, or safety-related applications.