Skip to content
ChemSolver

Molarity Calculator

Calculate molar concentration (M = n/V), required solute mass, or final solution volume from moles, grams, and a chemical formula. Automatically find molar mass for compounds and hydrates, convert lab units, and follow the calculation steps.

What Is Molarity?

Molarity is the amount of dissolved solute, in moles, per liter of the final solution. Its symbol is M (or c), and 1 M equals 1 mol/L. It measures concentration, not the mass of a compound or the volume of solvent poured into a vessel.

M = n / V

M = molarity (mol/L); n = moles of solute (mol); V = final solution volume (L).

If you start with mass in grams: M = mass / (molar mass × final volume in L).

Molarity from moles

M = n / V

How concentrated is the solution?

Molarity from grams

M = mass / (MW × V)

Convert mass to moles before dividing by volume.

Mass required

mass = M × V × MW

How many grams should be weighed to reach a target?

Final solution volume

V = mass / (MW × M)

What final volume is required for the given solute mass?

In these formulas, MW is molar mass in g/mol, mass is the mass of the target solute in g, and V is the final solution volume in L. If the reagent is not 100% pure, the amount actually weighed may differ from the mass of target solute.

How to Calculate Molarity from Grams and Volume

Convert the mass of a solute to moles using its molar mass, convert the final solution volume to liters, and divide. The order of the steps matters because mixing grams, milliliters, and moles without conversion produces incorrect results.

  1. Identify the chemical formula. Use the exact reagent form, such as NaCl or CuSO₄·5H₂O. The calculator finds molecular or formula weight from the elements and subscripts. A hydrate is not the same as an anhydrous salt.
  2. Find the amount in moles. Divide the active solute mass in grams by the correct molar mass in g/mol: n = mass ÷ MW. If given an applicable purity assay, account for the active fraction first.
  3. Convert the volume to liters. For example, 500 mL = 0.500 L, and 100 µL = 0.000100 L.
  4. Divide moles by liters. M = n / V. Record the concentration with a unit such as M, mM, or µM, and choose significant figures appropriate to the measured inputs.
Crucial distinction: The required volume is the final solution volume. Dissolving salt in 500 mL of water does not necessarily produce precisely 500 mL of solution. For preparations requiring a specified molarity, make up to the final volume with a suitable solvent.

How Many Grams Do I Need for a Molar Solution?

For a pure solid reagent, multiply target molarity (mol/L), desired final solution volume (L), and molar mass (g/mol). This yields grams of solute to weigh before dissolving and making up to the final volume.

mass (g) = M (mol/L) × V (L) × MW (g/mol)

To prepare 250 mL of 0.50 M NaCl from pure anhydrous NaCl, calculate 0.50 × 0.250 × 58.44 = 7.305 g. The solution must be brought to 250 mL final volume, not made by adding the solid to 250 mL of water.

Optional purity correction

If the reagent label gives a compatible mass-fraction assay, the required weighed mass can be estimated as mass of pure compound ÷ (purity% / 100). For a 0.100 M, 100 mL NaCl solution, the pure-solute requirement is 0.5844 g; at 98% purity by mass, the weighed quantity is 0.5844 ÷ 0.98 ≈ 0.5963 g. Verify the assay basis and reagent chemistry before relying on this calculation.

Molarity from Moles, Mass, and Volume: Worked Examples

Each example below is computed with the same formulas and standard atomic weights as the calculator, showing every intermediate step alongside the final answer.

Molarity from grams: NaCl

5.844 g NaCl in 500 mL final solution

0.2 M

  1. Weighed mass = 5.844 g. Active solute mass = 5.844 × 1 = 5.844 g.
  2. Moles = 5.844 g ÷ 58.44 g/mol = 0.1 mol.
  3. Final solution volume = 500 mL = 0.5 L.
  4. Molarity = 0.1 mol ÷ 0.5 L = 0.2 M.

Molarity from moles

0.500 mol in 2.00 L solution

0.25 M

  1. Convert amount = 0.5 mol = 0.5 mol.
  2. Final solution volume = 2 L = 2 L.
  3. Molarity = 0.5 mol ÷ 2 L = 0.25 M.

Find grams for a 0.5 M NaCl solution

0.500 M NaCl, 250 mL final volume

7.305 g

  1. Target molarity = 0.5 mol/L; final volume = 0.25 L.
  2. Moles required = 0.5 × 0.25 = 0.125 mol.
  3. Pure solute mass = 0.125 × 58.44 = 7.305 g.

Calculate mass with a hydrate

0.100 M CuSO₄·5H₂O, 100 mL final volume

2.49677 g

  1. Target molarity = 0.1 mol/L; final volume = 0.1 L.
  2. Moles required = 0.1 × 0.1 = 0.01 mol.
  3. Pure solute mass = 0.01 × 249.677 = 2.49677 g.

Calculate reconstitution final volume

5 mg of a compound (MW = 400 g/mol), 10 mM target

1.25 mL

  1. Active mass = 0.005 g × 1 = 0.005 g.
  2. Moles = 0.005 g ÷ 400 g/mol = 0.0000125 mol.
  3. Final volume = 0.0000125 mol ÷ 0.01 mol/L = 0.00125 L.

This is the final solution volume, not necessarily the solvent volume to add.

Mass to weigh for 10 mL of 10 mM

MW = 380 g/mol, final volume 10 mL

38 mg

  1. Target molarity = 0.01 mol/L; final volume = 0.01 L.
  2. Moles required = 0.01 × 0.01 = 0.0001 mol.
  3. Pure solute mass = 0.0001 × 380 = 0.038 g.

Anhydrous vs. Hydrated Salts: Why the Mass Changes

A chemical formula identifies the actual solid you weigh. Hydrates include water of crystallization, so the same target molarity requires a different weighed mass than the anhydrous compound. This is a frequent source of laboratory preparation errors.

Consider 100 mL of a 0.100 M copper(II) sulfate solution. Both anhydrous CuSO₄ and CuSO₄·5H₂O provide one mole of CuSO₄ formula units per mole of reagent. The hydrated solid weighs more per mole because it contains five waters of crystallization.

Anhydrous CuSO₄

Formula weight: 159.602 g/mol

1.59602 g

For 0.0100 mol, at 0.100 M in 100 mL final solution.

Copper(II) sulfate pentahydrate

Formula weight: 249.677 g/mol

2.49677 g

For 0.0100 mol, at 0.100 M in 100 mL final solution.

In this example, approximately 1.596 g of anhydrous CuSO₄ and 2.497 g of CuSO₄·5H₂O represent the same nominal amount of copper(II) sulfate. The water of crystallization is part of the hydrated formula weight. Never select a formula from a compound name alone: confirm the exact hydrate and assay stated on your reagent label.

Molarity from Percent and Density

For a solution specified by mass percent (% w/w) and density (g/mL), the molarity of a particular solute can be calculated without assuming that mass fraction is the same as mass per volume.

M = 10 × (% w/w) × density (g/mL) / MW (g/mol)

For 37% w/w HCl with density 1.19 g/mL, 1 L contains 1,190 g of solution and 440.3 g of HCl. Dividing by the molar mass of HCl (36.458 g/mol using standard atomic weights) gives approximately 12.08 mol/L.

Where does the factor of 10 come from?

  1. One liter is 1,000 mL. The mass of one liter of solution is 1,000 × density (g/mL), in grams.
  2. A mass percentage such as 37% w/w is a mass fraction of 0.37. Multiply total solution mass by 0.37 to get grams of the specified solute per liter.
  3. Divide grams of solute per liter by its molecular or formula weight (g/mol). The result is moles per liter, or M.
  4. Combining 1,000 mL/L with the division by 100 for the percent gives the coefficient 10 in the compact formula.

This is not a conversion from % v/v. It requires a mass percentage (% w/w) and a matching solution density. It does not imply that a concentrated liquid can be safely diluted without a reagent-specific procedure.

Illustrative concentrated reagent concentrations

Mass fraction and density examples, not certified reagent strengths
ReagentMass fractionDensityCalculated molarity
Hydrochloric acid (illustrative)37% w/w1.19 g/mL12.0769 M
Sulfuric acid (illustrative)98% w/w1.84 g/mL18.3865 M
Nitric acid (illustrative)70% w/w1.413 g/mL15.697 M
Aqueous ammonia (illustrative)28% w/w0.9 g/mL14.7965 M

Safety and accuracy: These are numerical examples based on the indicated hypothetical label values, not universal concentrations or instructions for preparing concentrated acids and bases. Actual assay and density may vary by batch and temperature. Consult the supplier’s certificate of analysis, safety data sheet, and your laboratory’s approved procedure. Never assume a density from a generic lookup is valid for a different formulation.

Molarity Unit Conversion and Mass Concentration

Molarity expresses moles of solute per liter of solution. Mass concentration expresses grams or milligrams of solute per liter or milliliter. Converting between the two requires the compound’s molar mass.

M to mM and µM

1 M = 1,000 mM = 1,000,000 µM. A 0.005 M solution is 5 mM or 5,000 µM.

Volume and amount

1 L = 1,000 mL; 1 mL = 1,000 µL. 1 mol = 1,000 mmol = 1,000,000 µmol.

mg/mL to molarity

1 mg/mL = 1 g/L. M = (g/L) / MW (g/mol). Multiply M by 1,000 to obtain mM.

Molarity to mg/mL

mg/mL = M × MW (g/mol). A 0.1 M NaCl solution has mass concentration 5.844 mg/mL, using 58.44 g/mol.

How to Convert mg/mL or g/L to Molarity (M and mM)

A mass concentration such as mg/mL is not itself a molar concentration. To convert it, you must know the molar mass of the specific dissolved substance. The conversion works for a named solute, not for mixed solutions with unknown composition.

From mg/mL to M

M = (mg/mL) ÷ MW (g/mol)

1 mg/mL equals 1 g/L. Dividing grams per liter by grams per mole gives moles per liter (M); multiply by 1,000 to express the result in mM. This assumes mg/mL refers to milligrams of the specified solute per milliliter of final solution.

From M to mg/mL

mg/mL = M × MW (g/mol)

Multiply the molar concentration by the solute formula weight. Because 1 g/L equals 1 mg/mL, the numerical result in g/L is identical to the mass concentration in mg/mL.

Worked conversion: NaCl in mg/mL to mM

Suppose a solution contains 5.844 mg of NaCl per mL of final solution. That is 5.844 g per liter. The calculated formula weight is 58.44 g/mol.

5.844 ÷ 58.44 = 0.1 M

= 100 mM

When using mg/mL, always verify that the concentration refers to the same molecular form as the molar mass.

Molarity vs. Molality vs. Normality

These concentration measurements use different denominators. They are not interchangeable, even when their reported numerical values look similar.

MeasurementDefinitionTypical unitKey difference
MolarityMoles of solute / liters of solutionmol/L (M)Depends on final solution volume
MolalityMoles of solute / kilograms of solventmol/kgMass-based; not based on solution volume
NormalityEquivalents / liters of solutioneq/L (N)Equivalent factor depends on the reaction
Mass concentrationMass of solute / volume of solutiong/L, mg/mLMust use MW to convert to molarity

Common Molarity Calculation Mistakes

Check the chemical form, the physical meaning of the volume, and the units before trusting a solution-preparation answer.

Common mistakeCorrect approach
Using mL without converting to LConvert 500 mL to 0.500 L before dividing moles by volume.
Confusing final volume and solvent addedDissolve the solute, then bring to the desired final solution volume.
Using anhydrous MW for a hydrated saltEnter the exact hydrate formula from the label (for example CuSO₄·5H₂O).
Treating the nominal purity as 100%Apply a mass-fraction assay correction only when it matches the entered chemical form.
Equating mg/mL with mMUse molar mass to convert mass-per-volume to molar amount-per-volume.
Using a generic acid density for a different batchVerify the actual assay, density, and measurement temperature first.

Accuracy, Significant Figures, and Practical Limits

The formulas produce a numerical concentration or quantity, but the accuracy of a real solution also depends on the reagent, the laboratory measurements, and how the final volume is established.

Precision vs. accuracy

The calculator keeps full intermediate precision and rounds only when displaying results. It does not determine significant figures for your course or the actual uncertainty of balances and volumetric equipment. Report only justified digits.

Solubility and compatibility

A positive calculated mass or volume is not proof that the compound will dissolve, remain stable, or be compatible with the chosen solvent. Check the reagent and applicable lab procedure.

Temperature and final volume

Molarity depends on solution volume; thermal expansion can change the value with temperature. Volumetric preparation should follow the specified conditions and equipment procedure.

Hydrates and assay bases

Use the formula of the weighed material. A stated 98% assay may refer to dry basis, active ingredient, or a specific analytical method. The optional purity adjustment only applies if it represents mass fraction of the entered compound.

Mixing and loss of solute

The ordinary mass-to-molarity formulas assume the weighed target compound is completely accounted for in the resulting solution. Precipitation, degradation, or losses invalidate that assumption.

Existing stock solutions

For a solution already dissolved at a known concentration, use the Dilution Calculator. Mass-to-molarity calculations are not a replacement for stock-solution dilution.

Frequently Asked Questions

Quick answers about molarity calculations, lab units, compound formulas, and solution preparation.

What is molarity?

Molarity is the number of moles of dissolved solute divided by the final volume of the solution in liters. Its unit is mol/L, written M. A 0.5 M NaCl solution contains 0.5 mol NaCl in each liter of final solution, not each liter of solvent added.

What is the molarity formula?

M = n/V, where n is moles and V is final solution volume in liters. When mass is given instead of moles, first calculate n = mass / molar mass, then use M = mass / (molar mass × volume in liters). Keep units consistent.

How do you calculate molarity from grams and mL?

Convert grams to moles by dividing by the compound’s molar mass in g/mol, then convert mL to L and divide. For 5.844 g NaCl (58.44 g/mol) in 500 mL of final solution: 5.844 / 58.44 = 0.100 mol; 500 mL = 0.500 L; molarity = 0.200 M.

How do you calculate molarity from moles and volume?

Divide the amount of solute in moles by the final solution volume in liters. For example, 0.5 mol in 2.0 L gives 0.25 mol/L or 0.25 M. Molecular weight is not needed if the amount is already known in moles.

How many grams do I need for a molar solution?

Calculate mass = target molarity (mol/L) × final volume (L) × molar mass (g/mol). For 250 mL of 0.50 M NaCl, use 0.50 × 0.250 × 58.44 = 7.305 g of pure NaCl, then bring the dissolved solution to 250 mL final volume. Adjust only for a known, applicable purity assay.

How do I convert mM to M or µM?

1 M = 1,000 mM = 1,000,000 µM. Divide mM by 1,000 to get M, and divide µM by 1,000,000 to get M. For example, 10 mM = 0.010 M = 10,000 µM.

How do I convert mg/mL to mM?

You need the solute’s molar mass. Because 1 mg/mL equals 1 g/L, molarity in mol/L equals (mg/mL) divided by molar mass in g/mol. Multiply by 1,000 to obtain mM. This applies to mass concentration of a specified solute, not to arbitrary percentages or mass fractions.

Do I use the amount of solvent or final solution volume?

Use the final solution volume for molarity. Adding 1 L of water to a quantity of salt does not necessarily produce exactly 1 L of solution. Dissolve the solute and then make up to the specified final volume following the appropriate procedure.

Should I use anhydrous or hydrated molar mass?

Use the exact chemical formula of the solid that you are weighing. Anhydrous CuSO₄ and CuSO₄·5H₂O contain different amounts of water per mole and have different formula weights. Enter the hydrate notation if the reagent is the pentahydrate; check the bottle label and any assay information.

How is molarity different from molality?

Molarity is moles of solute per liter of final solution (mol/L). Molality is moles of solute per kilogram of solvent (mol/kg). Molarity depends on solution volume and can change with temperature; molality is defined by masses. They are not interchangeable without additional information.

How does reagent purity affect the mass to weigh?

If a reagent has a stated assay of 98% target compound by mass, divide the mass of pure compound required by 0.98 to estimate the mass to weigh. This simple correction only applies when assay is defined on the same chemical basis as the entered formula; it is not a substitute for product-specific instructions.

How many moles are in a solution of known molarity?

Multiply molarity (mol/L) by the final solution volume in liters: n = M × V. For 250 mL of 0.20 M NaCl, n = 0.20 × 0.250 = 0.050 mol. If you need grams, multiply the amount in moles by the correct molar mass.

What is a 1 M solution?

A 1 M (one-molar) solution has one mole of a specified solute per liter of final solution. This does not mean adding one mole to one liter of water. For a pure solid, calculate its molar mass, dissolve it in an appropriate amount of solvent, and make up to 1.000 L final volume, if the preparation is chemically feasible.

Can I make any concentration the calculator gives me?

No. The calculation describes amounts and concentrations; it does not check solubility, chemical stability, temperature, compatible solvents, or safe preparation. A numerically valid result may not be physically achievable or appropriate. Follow validated reagent and laboratory guidance.

How do I dilute an existing molar stock solution?

If you already have a stock solution, use C₁V₁ = C₂V₂ in the Dilution Calculator to find how much stock to transfer. The Molarity Calculator is designed for computing concentration or preparing a solution from a known solute amount or assay and density.