Chemistry · Solution Chemistry
Molarity calculator icon showing a volumetric flask with a dissolved solid and a balance

Molarity calculator

This molarity calculator finds the molar concentration of a solution from the mass of solute and the volume of solution, works out how many grams to weigh for a target molarity, the volume that holds a given mass, or the moles in a sample. Type the formula (hydrates and brackets are fine) and the molar mass is computed for you.

Molarity is moles of solute per liter of final solution, not per liter of solvent. Make the solution up to the mark in a volumetric flask and use that total volume.

Molarity calculator: M = n / V

Choose what you want to find. The molar mass comes from the formula unless you type it in the optional field.
Case matters: Co is cobalt, CO is carbon monoxide. Write hydrates with a dot, e.g. CuSO4·5H2O or CuSO4.5H2O.

Ion molarity calculator: ion concentrations and ionic strength

A strong electrolyte dissociates completely: the molarity of each ion is the salt molarity times the number of those ions in the formula.

How to use the molarity calculator

Pick what you want to find in the first panel. “Molarity from mass and volume” is the classic question: you dissolved a known mass of solid and made it up to a known volume. “Mass of solute for a target molarity” is the recipe question you meet before every lab: how many grams do I weigh for 250 mL of 0.1 M? “Volume of solution for a given mass” and “Moles of solute in a volume” cover the remaining two directions of the same equation. Type the solute formula and the molarity calculator works out the molar mass from IUPAC standard atomic weights; if you already know the molar mass, type it in the optional field and it is used instead. Every result has a “Show the working” list with the numbers substituted, so you can follow or copy the method. The second panel turns the molarity of a salt into the concentration of each ion and the ionic strength.

The molarity formula behind the molarity calculator

Molarity (symbol c or M, unit mol/L, often written M and read “molar”) is the amount of solute in moles divided by the volume of the whole solution in liters:

c = n / V and n = m / M so c = m / (M × V)

Here n is the amount of solute (mol), V the volume of solution (L), m the mass of solute (g) and M its molar mass (g/mol). Rearranging the same relation gives the other three modes of the molarity calculator: n = c × V, m = c × V × M, and V = m / (M × c). The IUPAC name for molarity is “amount concentration”; 1 mol/L = 1 mol/dm³ = 1000 mol/m³. A millimolar (mM) solution is 0.001 mol/L, and 1 mmol/L is numerically the same as 1 mol/m³, which is why the unit menu offers both.

How to calculate molarity: worked examples

Molarity from grams (the default example). A 0.500 L sample of vinegar contains 25.2 g of acetic acid, CH₃COOH. The molar mass is 2 × 12.011 + 4 × 1.008 + 2 × 15.999 = 60.052 g/mol, so n = 25.2 / 60.052 = 0.4196 mol and c = 0.4196 / 0.500 = 0.839 mol/L. This is Example 3.16 in OpenStax Chemistry 2e, section 3.3 Molarity, and it is what the molarity calculator shows with its default values.

Grams in a given volume. How many grams of NaCl are in 0.250 L of a 5.30 M solution? Choose “Mass of solute for a target molarity”, type NaCl, 5.30 mol/L and 250 mL: n = 5.30 × 0.250 = 1.325 mol and m = 1.325 × 58.44 = 77.4 g, the same answer as OpenStax Example 3.17.

Volume that contains a given mass. What volume of the 0.839 M vinegar contains 75.6 g of acetic acid? n = 75.6 / 60.052 = 1.259 mol, and V = 1.259 / 0.839 = 1.50 L (OpenStax Example 3.18). In the molarity calculator choose “Volume of solution for a given mass”.

Moles in a sample. A 10 mL sip of a 0.375 M sucrose soft drink contains 0.375 × 0.010 = 0.00375 mol of sugar, about 1.28 g (OpenStax Example 3.15 rounds this to 0.004 mol).

Preparing a solution of known molarity

To make 250.0 mL of 0.1000 M NaCl, the molarity calculator gives 0.02500 mol, or 1.461 g. Weigh the solid on an analytical balance, dissolve it in about half the final volume of water in a beaker, transfer quantitatively to a 250 mL volumetric flask (rinse the beaker into the flask), fill to the mark at room temperature and mix by inverting. Use the formula of the substance you actually weigh: copper sulfate is usually the pentahydrate CuSO₄·5H₂O (249.68 g/mol), not anhydrous CuSO₄ (159.60 g/mol), and using the wrong one gives a solution 36 % weaker than intended.

The quick-reference table below gives the masses a molarity calculator returns for a common lab target, 1.000 L of 0.1000 M; scale linearly for other volumes and molarities.

SoluteFormulaMolar mass (g/mol)Mass for 1.000 L of 0.1000 M (g)
Sodium chlorideNaCl58.445.844
Potassium chlorideKCl74.557.455
Sodium hydroxideNaOH40.004.000
Sodium carbonateNa₂CO₃105.9910.60
Calcium chlorideCaCl₂110.9811.10
Potassium permanganateKMnO₄158.0315.80
Silver nitrateAgNO₃169.8716.99
GlucoseC₆H₁₂O₆180.1618.02
Copper(II) sulfate pentahydrateCuSO₄·5H₂O249.6824.97
SucroseC₁₂H₂₂O₁₁342.3034.23

Molar masses are computed from the IUPAC CIAAW standard atomic weights, the same values the molarity calculator uses. For any other compound, the Molar Mass Calculator lists the contribution of each element. Sodium hydroxide is hygroscopic and absorbs CO₂, so a weighed NaOH solution is only approximate; it is standardized by titration against potassium hydrogen phthalate.

Ion concentrations and ionic strength with the molarity calculator

Ionic compounds dissociate, so a 0.10 M solution of Al₂(SO₄)₃ contains 0.20 mol/L of Al³⁺ and 0.30 mol/L of SO₄²⁻. The second panel of the molarity calculator does this multiplication and also returns the ionic strength, I = ½ Σ cᵢzᵢ², which controls activity coefficients and appears in the Debye-Hückel equation. For the Al₂(SO₄)₃ example, I = ½ (0.20 × 3² + 0.30 × 2²) = 1.5 mol/L, fifteen times the salt molarity. The sum of all ion concentrations (the ideal osmolarity, i × M) is handled by the Osmotic Pressure Calculator, which uses it in π = iMRT.

Molarity, molality and normality compared

A molarity calculator answers questions about volume-based concentration. Other units suit other jobs:

UnitDefinitionSymbol and unitChanges with temperature?
Molaritymoles of solute per liter of solutionc or M, mol/LYes (volume expands)
Molalitymoles of solute per kilogram of solventb or m, mol/kgNo
Normalityequivalents of solute per liter of solutionN, eq/LYes
Mass concentrationgrams of solute per liter of solutionγ or ρ, g/LYes

Use molality when the temperature changes (freezing and boiling points), with the Molality Calculator. Normality is molarity multiplied by the number of reacting equivalents per mole and is still found on older titration procedures; the Normality Calculator converts between the two. For dilute aqueous solutions, molarity and molality are almost equal, because 1 L of solution contains close to 1 kg of water.

Concentrated reagents and dilution

Acids and ammonia are sold as mass percent solutions with a density on the label, for example 37 % HCl at 1.19 g/mL. Their molarity is 10 × mass % × density / molar mass (12.1 M for that HCl). That conversion and the C₁V₁ = C₂V₂ step that follows are on the Dilution Calculator, so this molarity calculator does not repeat them: use it when you start from a weighed solid or a known amount of solute.

Common mistakes when calculating molarity

Dividing by the volume of solvent. Dissolving 58.44 g of NaCl in 1.000 L of water gives slightly more than 1 L of solution, so it is not exactly 1 M; make up to the mark instead. Leaving the volume in milliliters. 0.4196 mol in 500 mL is 0.839 mol/L, not 0.000839; the unit menus of the molarity calculator convert for you. Ignoring water of crystallization. Use the formula of the hydrate you weigh. Typing the formula with the wrong case. CO is carbon monoxide, Co is cobalt; the parser reads case literally. Rounding the molar mass too early. Keep four or five significant figures until the final answer, then round to the precision of the data. The molarity calculator keeps full precision internally and rounds only the displayed result.

Related calculators

Convert grams and moles first with the Mole Calculator, and turn a molarity into %, ppm or mole fraction with the Concentration Converter. Use the molarity calculator for weighed solids and the dilution calculator for liquid stocks.

Frequently asked questions

How do you calculate molarity from grams?

Divide the mass by the molar mass to get moles, then divide by the volume of solution in liters: c = m / (M × V). For 25.2 g of acetic acid in 0.500 L, c = 25.2 / (60.052 × 0.500) = 0.839 mol/L.

What is the difference between molarity and molality?

Molarity is moles per liter of solution; molality is moles per kilogram of solvent. Molality does not change with temperature, so it is used for freezing-point and boiling-point calculations.

How many grams do I need for a 1 M solution?

For 1 L of a 1 M solution you need one molar mass in grams: 58.44 g of NaCl or 40.00 g of NaOH. For other volumes multiply by the volume in liters; the molarity calculator does this in “Mass of solute for a target molarity”.

Is molarity the same as molar concentration?

Yes. Molarity, molar concentration and amount concentration all mean moles of solute per liter of solution, written mol/L or M. The molarity calculator accepts a molarity in mol/L, mmol/L, mol/m³, kmol/m³ or lbmol/ft³ and reports it in mol/L (M) and mmol/L (mM).

Does molarity change with temperature?

Slightly. The solution expands when heated, so the same moles occupy more volume and the molarity falls, typically by about 0.02 to 0.03 % per °C for dilute aqueous solutions.

Is this molarity calculator free?

Yes. It runs in your browser, needs no sign-up and does not store or send the values you enter.

Results are for study, homework and lab preparation; check important results against your own data, and follow your lab’s safety rules. Back to chemistry calculators or CalcSwiftly home.

Reviewed by: CalcSwiftly · Last reviewed: