HomeChemistry › Molarity Calculator

Molarity Calculator

Computes molar concentration (mol/L) of a solution from the amount of solute (moles, or mass with a formula or molar mass) and the solution volume, or the moles and mass of solute needed to prepare a target molarity.

When to use

You need the molarity of a solution from what was dissolved, or the grams of solute required for a given volume and target concentration.

Do not use when: You are diluting an existing stock solution (use dilution), or you need a mass-based concentration such as % w/w, ppm or ppb (use mass-percent).

Formula

molarity = moles / volume_l, with moles = mass_g / molar_mass_g_mol; for a target: moles = target_molarity × volume_l and mass_g = moles × molar_mass_g_mol

Molarity refers to the final volume of solution, not the volume of solvent added; volume changes with temperature, so molarity is usually stated at 20–25 °C.

Inputs

ParameterTypeUnitRequiredDescription
volume_lnumberLyesTotal volume of the solution in litres (250 mL = 0.25). Range: > 0
molesnumbermolnoAmount of solute in moles. Takes precedence over mass_g. Range: > 0
mass_gnumbergnoMass of solute in grams; requires formula or molar_mass_g_mol. Range: > 0
formulastringnoChemical formula, e.g. NaCl, C6H12O6, Ca(OH)2 or CuSO4·5H2O (case-sensitive element symbols). Alternative to molar_mass_g_mol.
molar_mass_g_molnumberg/molnoMolar mass of the substance; use instead of formula when it is already known. Range: > 0, ≤ 10000000
target_molarity_mol_per_lnumbermol/LnoDesired concentration; when given, the calculator returns the moles and mass of solute needed for volume_l instead (moles and mass_g are ignored). Range: > 0

Outputs

OutputTypeUnitDescription
molarity_mol_per_lnumbermol/LMoles of solute per litre of solution (M).
millimolarnumbermmol/LSame concentration in millimoles per litre (mM).
molesnumbermolAmount of solute in the solution.
mass_gnumbergMass of solute (only when the molar mass is known).
molar_mass_g_molnumberg/molMolar mass used (only when formula or molar_mass_g_mol was given).
mass_concentration_g_per_lnumberg/LGrams of solute per litre of solution (only when the molar mass is known).
volume_mlnumbermLSolution volume in millilitres.
solved_forstringmolarity_mol_per_l when computing a concentration, mass_g when computing what to weigh for a target molarity.

Example

5.844 g NaCl in 0.5 L: {"volume_l":0.5,"mass_g":5.844,"formula":"NaCl"}{"molarity_mol_per_l":0.2,"millimolar":200,"moles":0.1,"molar_mass_g_mol":58.44,"mass_concentration_g_per_l":11.688,"solved_for":"molarity_mol_per_l"}

Prepare 250 mL of 0.1 M NaOH: {"volume_l":0.25,"target_molarity_mol_per_l":0.1,"formula":"NaOH"}{"moles":0.025,"mass_g":0.9999,"molar_mass_g_mol":39.997,"molarity_mol_per_l":0.1,"solved_for":"mass_g"}

GET https://tttkmbb.com/api/v1/calculate/molarity?volume_l=0.5&mass_g=5.844&formula=NaCl

Machine access

Sources

FAQ

Is the volume the water added or the final solution?

The final solution volume. Dissolve the solute in less solvent than needed, then make up to the mark in a volumetric flask.

What if I know the mass but not the formula?

Enter molar_mass_g_mol instead of formula. Without either, only moles can be used to compute molarity.

Related calculators