What is molarity?
The phrase molarity calculator is searched about 18,100 times a month in the United States by students working through concentration problems, teachers setting them, and lab staff preparing solutions to a specification. Nearly all of those problems reduce to one small relationship handled reliably: moles, volume and molarity, any one found from the other two — plus its two everyday companions, converting a weighed mass into moles through the molar mass, and diluting a stock solution with M1V1 = M2V2. That is exactly what the tool above does, in three modes, and this guide explains the mathematics thoroughly enough that you can predict its answers before you read them.
Molarity matters because chemical reactions happen between numbers of particles, not between grams. Two solutions react in proportion to the moles they deliver, so a concentration stated in moles per litre lets you read reaction quantities straight off a measuring cylinder: 250 mL of a 0.5 M solution delivers 0.125 mol of solute, whatever the solute is. Grams per litre cannot do that trick, because a gram of NaCl and a gram of glucose contain very different numbers of molecules — which is why the mole, and molarity built on it, sit at the centre of solution chemistry.
The molarity formula
Read the formula in pieces. M is molarity, in moles per litre (mol/L); a value of 0.171 M is read aloud as "0.171 molar". n is the amount of solute in moles — a pure count of particles, in units of 6.02214076 × 10²³. V is the volume of the finished solution in litres, not the volume of solvent you started with; the distinction is covered in the mistakes section, because it is the one most often marked wrong. The formula is a triangle relationship: cover the quantity you want and the other two tell you how to combine them — M sits over n divided by V, so finding moles means multiplying M by V, and finding volume means dividing n by M.
| To find | Formula | Needs |
|---|---|---|
| Molarity M | n ÷ V | moles, volume in litres |
| Moles n | M × V | molarity, volume in litres |
| Volume V | n ÷ M | moles, molarity |
| Moles from mass | mass (g) ÷ molar mass (g/mol) | mass, molar mass |
| Dilution (any one) | M1V1 = M2V2 | any three of M1, V1, M2, V2 |
Every mode of the calculator is one row of that table. Nothing else is hidden inside it — no fitted constants and no approximations beyond ordinary floating-point arithmetic — so any result can be reproduced with a pocket calculator from the same inputs.
How to calculate molarity
How to calculate molarity is the question behind most visits to this page, so here is the full procedure. Suppose you dissolve 5.0 g of sodium chloride and make the solution up to 500 mL, and you want its molarity. First, convert the mass to moles using the molar mass of NaCl, 58.44 g/mol: n = 5.0 ÷ 58.44 = 0.0856 mol. Second, convert the volume to litres: 500 mL ÷ 1,000 = 0.500 L. Third, divide: M = 0.0856 ÷ 0.500 = 0.171 M. Three steps — mass to moles, millilitres to litres, divide — and every molarity problem from a balance and a flask follows the same path. The mass mode of this calculator performs exactly these steps.
When the moles are given directly, the first step drops away: moles to molarity is a single division once the volume is in litres. And the formula runs backwards just as cleanly — a technician who needs 0.5 mol from a 2.0 M stock measures V = 0.5 ÷ 2.0 = 0.25 L = 250 mL. Two habits prevent nearly all errors: always convert the volume to litres before dividing, and always use the finished solution volume, made up to the mark, rather than the volume of water added.
Worked examples you can check
Two examples anchor this page, each chosen so the arithmetic can be verified by hand. Example 1 — mass to molarity. Dissolve 5.0 g of NaCl (molar mass 58.44 g/mol) and make up to 500 mL. Moles: 5.0 ÷ 58.44 = 0.0856 mol. Volume: 500 mL = 0.500 L. Molarity: 0.0856 ÷ 0.500 = 0.171 M. This is the calculator's starting state in mass mode: open the page and the hero result already reads 0.171 M.
Example 2 — dilution. Take 100 mL of a 6.0 M stock solution and dilute it to a final volume of 500 mL. The moles taken are 6.0 × 0.100 = 0.600 mol, and they are now spread through 0.500 L, so M2 = M1V1 ÷ V2 = 6.0 × 100 ÷ 500 = 1.2 M. Note the volumes can stay in millilitres inside M1V1 = M2V2 because the same unit appears on both sides and cancels. Set dilution mode to M1 = 6, V1 = 100, V2 = 500 with M2 blank to reproduce it. Both examples were verified by hand arithmetic before publication, and the figures above are the figures the calculator prints.
| Example | Given | Working | Result |
|---|---|---|---|
| NaCl from mass | 5.0 g NaCl, 500 mL | 5.0 ÷ 58.44 = 0.0856 mol; 0.0856 ÷ 0.500 | 0.171 M |
| Dilution | 6.0 M stock, 100 mL → 500 mL | 6.0 × 100 ÷ 500 | 1.2 M |
| Moles in a sample | 0.5 M, 250 mL | 0.5 × 0.250 | 0.125 mol |
| Volume for 0.5 mol | 2.0 M stock | 0.5 ÷ 2.0 | 0.25 L (250 mL) |
Molarity from mass and molar mass
In real work nobody counts out moles directly — you weigh grams on a balance, and the bridge between grams and moles is the molar mass: the mass of one mole of the substance, in grams per mole. It is built by adding the atomic masses in the formula. NaCl is sodium (about 22.99) plus chlorine (about 35.45), giving 58.44 g/mol. Glucose, C₆H₁₂O₆, is 6 × 12.01 + 12 × 1.008 + 6 × 16.00 = 180.16 g/mol. Once you have it, moles = mass ÷ molar mass, and the rest is the ordinary formula.
Plainly stated: the molar masses used by this calculator's quick-picks are rounded standard values — NaCl 58.44, glucose 180.16, NaOH 40.00, HCl 36.46 and H₂SO₄ 98.08 g/mol. They are right for homework, revision and general preparation. For assessed lab work, use the molar mass printed on your reagent bottle or given in your syllabus: hydrates, purities and rounding conventions can shift the last decimal, and your marker or your protocol is the authority, not this page.
Molar masses of common compounds
The table below lists the quick-pick compounds plus other common reagents, so a value read here matches the value the calculator uses. All figures are rounded standard molar masses in g/mol.
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Sodium chloride | NaCl | 58.44 |
| Glucose | C₆H₁₂O₆ | 180.16 |
| Sodium hydroxide | NaOH | 40.00 |
| Hydrochloric acid | HCl | 36.46 |
| Sulfuric acid | H₂SO₄ | 98.08 |
| Water | H₂O | 18.02 |
| Potassium chloride | KCl | 74.55 |
| Calcium chloride | CaCl₂ | 110.98 |
| Sucrose (table sugar) | C₁₂H₂₂O₁₁ | 342.30 |
| Ethanol | C₂H₅OH | 46.07 |
| Acetic acid | CH₃COOH | 60.05 |
One warning the table cannot show: check whether your solid is a hydrate. Copper(II) sulfate is usually the blue pentahydrate, CuSO₄·5H₂O at 249.68 g/mol, not the anhydrous 159.61 g/mol — using the wrong one is a classic source of solutions that come out far from their intended concentration.
Dilution: M1V1 = M2V2
A dilution calculator using M1V1 = M2V2 solves for whichever of the four values you leave out. The most common job is finding the final concentration, M2 = M1V1 ÷ V2, as in the worked example: 6.0 × 100 ÷ 500 = 1.2 M. The second most common runs the other way — how much stock to measure out: V1 = M2V2 ÷ M1. To prepare 250 mL of 0.1 M from a 1.0 M stock, V1 = 0.1 × 250 ÷ 1.0 = 25 mL of stock, made up to 250 mL with solvent.
Two practical points. First, V2 is the final total volume, not the volume of solvent to add — you add solvent until the total reaches V2. Second, volumes on the two sides must use the same unit, but it can be litres or millilitres, because the unit cancels. Molarities cannot cancel: both M1 and M2 are always in mol/L.
Units: litres, millilitres and moles
Unit discipline decides more molarity answers than the formula itself. Molarity is defined per litre, so a volume typed in millilitres must be divided by 1,000 before it meets the formula — 500 mL becomes 0.500 L, and forgetting this step inflates or deflates an answer by exactly 1,000, the most common numerical error in the topic. This calculator accepts either unit on every volume field and converts internally, showing the litre figure in the result breakdown so you can see the conversion it made.
The mole deserves the same care. A mole is not a mass: it is a count, 6.02214076 × 10²³ particles, and the molar mass is what translates that count into something a balance can weigh. Keeping the three quantities straight — moles (count), grams (mass), litres (volume of finished solution) — and converting each into the formula's units before dividing is the whole skill this page practises.
Where molarity is used
In teaching laboratories, molarity is the language of nearly every preparation instruction: make 250 mL of 0.1 M sodium hydroxide, standardise it, titrate with it. In titration and analytical chemistry, an unknown concentration is found from the volume of a known-molarity reagent that exactly reacts with it — moles from M × V on one side, matched against moles on the other. In pharmacy and medicine preparation, infusion and reagent concentrations are specified and checked in molar or related units, under professional protocols this page does not replace.
In industry and water treatment, dosing, dilution of concentrates and discharge limits are all concentration arithmetic of the same three forms. And in everyday terms, molarity is the precise version of "how strong is this solution" — the number that lets two people in different labs make the same solution and get the same result.
Common molarity mistakes
The most common mistake is using millilitres as litres: dividing moles by 500 instead of 0.500 and reporting a concentration 1,000 times too small. Second is using the solvent volume instead of the solution volume: dissolving a solute in 500 mL of water gives more than 500 mL of solution, so the correct method is to dissolve and then make up to the final mark. Third is skipping the molar mass step — dividing grams straight by litres gives grams per litre, not molarity, a different quantity entirely.
Fourth is confusing molarity with molality: molality is per kilogram of solvent and does not drift with temperature; molarity is per litre of solution and drifts slightly as the solution expands. Fifth, in dilutions, is treating V2 as the solvent to add rather than the final volume. Finally, beware hydrate and purity slips: the molar mass must match the actual solid in the bottle, waters of crystallisation included.
What this calculator cannot do
Plainly stated: this calculator does concentration arithmetic only. It assumes the solute dissolves completely, the volumes behave as entered, and the molar mass you supply matches your actual reagent. It does not model incomplete dissolving, volume changes on mixing beyond the finished-volume convention, temperature effects on volume, or reactions between solute and solvent that change the species present.
It follows that this page is not a substitute for lab safety guidance: it gives no handling instructions, no protective-equipment advice and no disposal guidance for concentrated acids, bases or any other hazardous reagent. Preparing real solutions — especially from concentrated stock — must follow your institution's procedures, the reagent's safety data sheet and a qualified supervisor's instructions. Used inside its stated scope, though, every number this page prints can be reproduced from the formula table in this guide: the homework check, the preparation calculation, the sanity check on someone else's figure.
Sources & References
- Khan Academy — Molarity (the definition of molarity and worked concentration examples)
- OpenStax Chemistry 2e — 3.3 Molarity (molarity, moles from mass, and solution preparation)
- LibreTexts Chemistry (OpenStax) — 3.3 Molarity (the same chapter in the LibreTexts library)
- Khan Academy — Dilution (the M1V1 = M2V2 relationship and how dilution problems are solved)
- Purdue University Chemistry Help — Solutions (solution concentration topics, including molarity)
- OpenStax Chemistry 2e — 3.4 Other Units for Solution Concentrations (molality and how it differs from molarity)
- PhET Interactive Simulations, University of Colorado Boulder — Molarity (interactive molarity and dilution simulation)
The formulas, the compound molar masses and every worked figure in this guide were checked against the sources above, and the two worked examples were recomputed by hand from the formulas themselves — M = n ÷ V with n = mass ÷ molar mass, and M1V1 = M2V2 — so you can reproduce each one exactly in the calculator.