Skip to content
TheCalcUniverse

Molarity Calculator

Calculate molarity, mass, or volume of chemical solutions. Auto-detects compounds and shows step-by-step derivation of moles and concentration.

Select what you want to calculate

Auto-fills molar mass when a known compound is entered. Try NaCl (58.44 g/mol), H2SO4 (98.08 g/mol), or C6H12O6 (180.16 g/mol).

Enter the mass of the solute in grams

Enter the volume of the solution

Select the unit of volume for the solution

Leave blank to use the compound (any formula, e.g. NaCl, H2SO4, CuSO4·5H2O); type a value in g/mol to override it

Results

Molarity (M)

0.0999mol/L

Moles of Solute
0.099932mol
Mass of Solute
5.8400g
Volume of Solution
1.000L
Molar Mass
58.4400g/mol
Formula Used
M = n / V = (m / MM) / V
Compound Source
"NaCl" (MM = 58.44 g/mol)

The formula

M = n / V = (m / MM) / V

M
Molarity
n
Moles of solute
V
Volume
m
Mass
MM
Molar mass

Worked example — Compound (optional) NaCl, Mass of Solute (g) 5.84, Volume of Solution 1, Molarity (mol/L) 0.1

Molarity (M) = 0.0999 mol/L

Full explanation ↓

How Molarity Calculator Works

M = n / V = (m / MM) / V

Molarity (M) is the number of moles of solute per liter of solution. It is calculated by dividing the moles of solute (n) by the volume of solution in liters (V). The moles of solute are found by dividing the mass (m) by the molar mass (MM).

M
Molarity — Concentration of the solution in moles per liter (mol/L).
n
Moles of solute — Amount of substance measured in moles (mol).
V
Volume — Total volume of the solution in liters (L).
m
Mass — Mass of the solute in grams (g).
MM
Molar mass — Mass per mole of the compound in grams per mole (g/mol).
Molarity = moles of solute per liter of solution

Worked Examples

Dr. Patel, a chemistry researcher, needs to prepare 250 mL of a 0.2 M sodium hydroxide (NaOH) solution for a titration experiment. NaOH has a molar mass of 40.00 g/mol. How many grams of NaOH should she weigh on the analytical balance?

mode = calcMass · molarity = 0.2 · volume = 0.25 · volumeUnit = L · molarMass = 40.00

Mass = 2.000 g NaOH. n = 0.2 M × 0.25 L = 0.05 mol. m = 0.05 mol × 40.00 g/mol = 2.000 g.

Using m = M × V × MM: m = 0.2 mol/L × 0.25 L × 40.00 g/mol = 2.000 g. Dr. Patel should weigh exactly 2.000 g of NaOH pellets. Important safety note: NaOH is highly caustic and hygroscopic — it absorbs moisture from air, so weigh quickly. Always add NaOH to water, never water to NaOH, and wear appropriate PPE including gloves and safety goggles. Use a volumetric flask for precise dilution to the 250 mL mark.

Maria, a biology graduate student, has dissolved 4.5 g of glucose (C6H12O6, molar mass 180.16 g/mol) in enough water to make 500 mL of solution. What is the molarity of this glucose solution for her cell culture experiment?

mode = calcMolarity · mass = 4.5 · volume = 0.5 · volumeUnit = L · molarMass = 180.16

Molarity = 0.0500 M (50 mM). n = 4.5 g / 180.16 g/mol = 0.02498 mol. M = 0.02498 mol / 0.5 L = 0.0500 mol/L.

Moles n = m / MM = 4.5 g / 180.16 g/mol = 0.02498 mol. Molarity M = n / V = 0.02498 mol / 0.5 L = 0.0500 M = 50 mM glucose. For mammalian cell culture, this concentration may need further dilution depending on cell line requirements — typical media contain 5-25 mM glucose. This is a convenient stock solution for further dilution.

James, a quality control chemist, has 3.0 g of acetylsalicylic acid (aspirin, C9H8O4, molar mass 180.16 g/mol) and needs to prepare a 0.05 M standard solution for HPLC calibration. What final volume should he dilute to?

mode = calcVolume · mass = 3.0 · molarity = 0.05 · molarMass = 180.16

Volume = 0.333 L (333 mL). n = 3.0 g / 180.16 g/mol = 0.01665 mol. V = 0.01665 mol / 0.05 mol/L = 0.333 L.

Moles n = 3.0 g / 180.16 g/mol = 0.01665 mol. Volume V = n / M = 0.01665 mol / 0.05 mol/L = 0.333 L = 333 mL. James should dissolve the 3.0 g of aspirin and dilute to exactly 333 mL in a volumetric flask. For HPLC calibration, this stock would typically be further diluted to create a calibration curve with concentrations from 0.001 to 0.05 M.

Understanding the Result

Molarity is one of the most common units of concentration in chemistry, developed during the 19th century as chemistry matured into a quantitative science. The concept of the mole was formalized by the German chemist Wilhelm Ostwald in 1894, though the underlying principle was proposed by Amadeo Avogadro in 1811 — that equal volumes of gases at the same temperature and pressure contain equal numbers of molecules. A 1 M (1 molar) solution contains 1 mole of solute dissolved in enough solvent to make 1 liter of solution.

The mole is a counting unit representing Avogadroʼs number (6.022 × 10²³) of particles. To prepare a solution of known molarity, measure the required mass of solute and dilute to the desired volume. Practical example: to prepare 500 mL of 0.1 M NaCl solution. First, find the molar mass of NaCl: 58.44 g/mol. The moles needed = 0.1 M × 0.5 L = 0.05 mol. The mass needed = 0.05 × 58.44 = 2.922 g.

Weigh 2.922 g of NaCl, dissolve in about 400 mL of distilled water, then dilute to exactly 500 mL in a volumetric flask. The resulting solution contains 0.1 moles of NaCl per liter. Edge cases: molarity is temperature-dependent because the volume of the solution changes with temperature. A solution that is 0.1000 M at 20°C becomes approximately 0.0997 M at 30°C due to thermal expansion. For precise analytical work, solutions should be used at the temperature at which they were prepared.

For very dilute solutions (below 0.001 M), the assumption that the solute volume is negligible becomes less accurate, and molality (moles per kg of solvent) may be preferred. For concentrated solutions (above 1 M), the volume change upon mixing can be significant — for example, mixing 50 mL of water with 50 mL of ethanol yields only about 97 mL of solution, not 100 mL. For acids and bases, always add acid to water (not water to acid) when diluting concentrated solutions, especially for sulfuric acid which generates significant heat upon dilution.

How to Use

  1. Select the calculation mode: Molarity (from mass & volume), Mass (from molarity & volume), or Volume (from mass & molarity).
  2. Optionally enter a compound name (e.g., NaCl, H2SO4) to auto-fill the molar mass.
  3. Fill in the required fields based on the selected mode.
  4. Select the appropriate volume unit (L, mL, or µL).
  5. Results will show the calculated value, moles, step-by-step solution, and formulas used.

Quick Reference

Molarity formulaM = n / V = (m / MM) / V
Mass from molaritym = M × V × MM
Volume from massV = n / M = (m / MM) / M
1 M solution1 mole solute per 1 L of total solution
1 L = 1000 mLMultiply by 1000 to convert liters to mL
1 mL = 1000 µLMultiply by 1000 to convert mL to µL
Avogadroʼs number6.02214076 × 10²³ entities per mole
NaCl molar mass58.44 g/mol (table salt)

Frequently Asked Questions

What is the difference between molarity and molality?
Molarity (M) is moles per liter of solution, while molality (m) is moles per kilogram of solvent. Molarity depends on temperature (volume changes with temperature), while molality is temperature-independent.
How do I prepare a 1 M NaCl solution?
Weigh 58.44 g of NaCl (the molar mass), dissolve it in about 800 mL of distilled water, and then dilute to a final volume of 1 L in a volumetric flask.
Can I use this calculator for dilutions?
For dilution calculations (M₁V₁ = M₂V₂), you would need the dilution formula calculator. This molarity calculator focuses on direct molarity, mass, and volume relationships.
How do I handle hydrated compounds when calculating molarity?
Hydrated compounds contain water molecules bound in their crystal structure, and this water adds to the molar mass. For example, copper sulfate pentahydrate is CuSO4·5H2O with a molar mass of 249.68 g/mol (not 159.61 g/mol for anhydrous CuSO4). When preparing a solution from a hydrated salt, you MUST use the hydrated molar mass if the salt is in its hydrated form. Type the hydrate in the Compound box as CuSO4·5H2O (or CuSO4.5H2O) and the calculator adds the water for you; typing just CuSO4 gives the anhydrous mass. Example: to make 1 L of 0.1 M CuSO4 from the pentahydrate, you need 0.1 mol × 249.68 g/mol = 24.968 g of CuSO4·5H2O.
What safety precautions should I take when preparing solutions?
Always wear appropriate personal protective equipment: safety goggles, lab coat, and chemical-resistant gloves. For acid solutions, follow the "Always Add Acid" rule — slowly add concentrated acid to water with constant stirring, never the reverse. For exothermic dissolutions like NaOH in water, use a heat-resistant container. Work in a fume hood when handling volatile chemicals. Label all solutions with the chemical name, concentration, date prepared, and your initials. Consult the Safety Data Sheet (SDS) for each chemical before handling.

Common Uses

  • •Preparing standard solutions in analytical chemistry labs — calculating the exact mass of a reagent needed to achieve a target concentration for titrations, calibrations, and quantitative analysis.
  • •Pharmaceutical formulation and compounding — determining drug concentrations for intravenous (IV) solutions, ensuring correct dosing in mg/mL and verifying molar equivalents.
  • •Biochemistry and molecular biology — preparing buffer solutions (e.g., Tris, PBS), enzyme assays, and PCR reagents where precise molar concentrations are critical for reproducible experiments.
  • •Environmental testing — calculating pollutant concentrations in water samples, such as nitrate or phosphate levels in mg/L and converting to molarity for regulatory reporting.
  • •Educational chemistry labs — teaching the fundamental relationship between mass, moles, volume, and concentration through hands-on solution preparation exercises.

Pro Tips

  • →Always add solute to solvent, not the reverse. This is especially critical with concentrated acids — adding water to concentrated sulfuric acid can cause violent boiling and splashing. The safety mnemonic is "Always Add Acid" (AAA: Add Acid to water).
  • →When preparing solutions for precise analytical work, use a volumetric flask rather than a graduated cylinder. Volumetric flasks are calibrated to contain a specific volume with much higher accuracy — typically ±0.05% versus ±1% for graduated cylinders.
  • →Molarity is temperature-dependent because liquid volume expands when heated. A 0.1000 M solution at 20°C becomes approximately 0.0995 M at 30°C. For critical work, prepare and use solutions at the same temperature, or use molality (mol/kg solvent) for temperature-independent concentrations.
  • →For hydrated compounds (like CuSO4·5H2O or Na2HPO4·2H2O), use the molar mass of the hydrated form, not the anhydrous form. The water of crystallization adds significant mass — CuSO4 is 159.61 g/mol anhydrous, but 249.69 g/mol as the pentahydrate.
  • →Use the compound auto-detection feature to pull molar masses for common reagents. The database includes NaCl (58.44), HCl (36.46), NaOH (40.00), H2SO4 (98.08), and glucose (180.16). For compounds not in the database, use the Molecular Weight Calculator first.
  • →For serial dilutions, use the M1V1 = M2V2 formula rather than this calculator. To make 100 mL of 0.01 M from a 0.1 M stock: (0.1 M)(V1) = (0.01 M)(100 mL), so V1 = 10 mL of stock diluted to 100 mL.

Limitations to Know

  • •This calculator assumes the solute dissolves completely without significantly changing the total solution volume — this approximation holds well for dilute solutions below ~0.5 M but becomes less accurate at higher concentrations where volume changes upon mixing become significant.
  • •The compound database is limited to 16 common compounds; for others, manually enter the molar mass.
  • •Temperature effects on solution volume are not accounted for — molarity is temperature-dependent, and all calculations assume room temperature of approximately 20°C.
  • •The calculator does not handle serial dilutions; use M1V1 = M2V2 for those.
  • •Do not use this calculator for gases where concentration is expressed in partial pressure, for solid-solid mixtures where molarity is not applicable, for non-aqueous solvents where solution behavior differs, or for solutions requiring activity coefficient corrections at high ionic strength.

Sources

Was this calculator helpful?
Cite this calculator

TheCalcUniverse. "Molarity Calculator — Solution Concentration in mol/L." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/molarity-calculator/. Accessed October 25, 2026.

Embed this calculator on your site

Free to embed. Paste this into any HTML page — it stays up to date automatically.

Open embed ↗

You may also like

Guides that use this calculator