Lab & life science

Molarity Calculator: Mass, Moles, Volume and Concentration

Need 500 mL of 0.1 M NaCl? Pick the chemical (or type its molecular weight), enter the concentration and volume, and get the exact mass to weigh, with a recipe line you can copy into your lab notebook. Works the other way round too: molarity from the mass you dissolved, or the volume you can make.

✅ No login needed100% freeRuns in your browserYour data stays on your device
Molarity Calculator✅ Free · no login📚 Cite this tool
Your data never leaves your PC. Your data is analysed on your own computer or phone, even when you upload a CSV or Excel file. Nothing is uploaded, stored or seen by Codanics, and no login is needed.
  • PriceFree, no login or sign-up needed
  • Your dataProcessed in your browser, never uploaded
  • Works onPhone, tablet or computer, any modern browser
  • Made byDr. Muhammad Aammar Tufail, Codanics
  • Published16 November 2026
  • Last updated16 November 2026

📚 How to cite this tool

This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.

Citation · APA 7th edition

Tufail, M. A. (2026). Molarity calculator: mass, moles, volume and concentration [Online tool]. Codanics. Retrieved 16 November 2026, from https://codanics.com/tools/molarity-calculator/

In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)

The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 16 November 2026.

🚀 Follow Codanics channel on WhatsApp for more updatesNew free tools, scholarships, PhD positions and research tips, straight to your phone. Free lessons on YouTube too.

How to use the molarity calculator

  1. Pick your chemical from the list, or choose Custom and type the molecular weight printed on the bottle. Hydrates matter: MgCl₂·6H₂O (203.30 g/mol) is not the same as anhydrous MgCl₂.
  2. Choose what to solve for: Mass to weigh (most common), Concentration from a mass you already dissolved, or the Volume you can make.
  3. Enter the other two values with their units. For a less-than-pure reagent, change Purity; liquid stocks such as 37% HCl fill in density and % w/w for you.
  4. Read the answer, copy the recipe line into your lab notebook, and use the table if you need a different volume.

Molarity formula

Molarity (M) is the number of moles of solute per litre of solution. Everything in this calculator comes from one relationship:

moles (mol) = mass (g) ÷ molecular weight (g/mol) molarity (mol/L) = moles ÷ volume (L) mass to weigh (g) = molarity × volume (L) × molecular weight mg/mL (= g/L) = molarity × molecular weight % w/v = g per 100 mL = mg/mL ÷ 10

Worked example: 500 mL of 0.1 M NaCl (MW 58.44 g/mol) needs 0.1 × 0.5 × 58.44 = 2.922 g. That is 5.844 mg/mL or 0.584% w/v.

How to make a molar solution

  1. Weigh the calculated mass on a balance that reads to at least 0.001 g (use 0.0001 g for small masses).
  2. Dissolve it in about 70–80% of the final volume of distilled or deionised water. Stir until fully dissolved; warm gently if the label allows.
  3. For buffers, adjust the pH now, before the final volume.
  4. Transfer to a volumetric flask (or measuring cylinder for less exact work) and make up to the mark. Mix by inverting.
  5. Label with name, concentration, date and your initials. Filter or autoclave if needed.
Do not add the solid to the full volume of water. The solid takes up space, so the final volume would be too large and the concentration too low.

Hydrates, purity and liquids

Hydrates: always use the molecular weight of the exact form you have. CaCl₂·2H₂O (147.01 g/mol) contains less calcium per gram than anhydrous CaCl₂ (110.98 g/mol). Using the wrong one is one of the most common lab mistakes.

Purity: a 98% pure reagent contains 0.98 g of compound per gram, so you weigh mass ÷ 0.98.

Liquids sold as solutions, such as hydrochloric acid 37% (w/w, density 1.19 g/mL), have a molarity of density × 1000 × fraction ÷ MW = 1.19 × 1000 × 0.37 ÷ 36.46 ≈ 12.1 M. To make 500 mL of 1 M HCl you measure 41.4 mL of the stock. The calculator does this when you pick a liquid. To dilute a stock you already have in molar units, the dilution calculator (C₁V₁ = C₂V₂) is quicker.

Common unit conversions

FromToMultiply by
MmM1,000
mMµM1,000
Mg/L (mg/mL)molecular weight
mg/mL% w/v0.1
mg/Lppm (in water)1
µMµg/mLMW ÷ 1,000
Learn the statistics behind these numbers. Codanics has free statistics, R and Python lessons on YouTube and full courses for researchers.

Frequently asked questions

How do I calculate the grams needed for a molar solution?

Multiply molarity (mol/L) by the volume in litres and by the molecular weight (g/mol). For 250 mL of 0.5 M glucose (180.16 g/mol): 0.5 × 0.25 × 180.16 = 22.52 g.

What is the difference between molarity and molality?

Molarity is moles per litre of solution; molality is moles per kilogram of solvent. For dilute aqueous solutions they are almost the same, but molality does not change with temperature.

Which molecular weight should I use for a hydrate?

Use the molecular weight of the exact form on your bottle, including the water of crystallisation. For example, MgSO₄·7H₂O is 246.47 g/mol, while anhydrous MgSO₄ is 120.37 g/mol.

How do I convert mM to mg/mL?

Multiply the concentration in mol/L by the molecular weight. 5 mM glucose = 0.005 mol/L × 180.16 g/mol = 0.90 g/L = 0.90 mg/mL. The calculator shows mg/mL and % w/v for every result.

How do I make a solution from a liquid like 37% HCl?

Pick the liquid in the list. The calculator uses its density and % w/w to work out the stock molarity (about 12.1 M for 37% HCl) and the millilitres to measure. Always add acid to water, never water to acid.

Is my data sent anywhere?

No. All calculations run in your browser and nothing is uploaded or stored.

Do I need to log in or create an account to use the molarity calculator?

No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.

How do I cite this tool in my thesis or paper?

Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). Molarity calculator: mass, moles, volume and concentration [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/molarity-calculator/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.

Free guides and courses from Codanics

More free tools

See all free Codanics tools → · Codanics on YouTube · WhatsApp channel

Made by Dr. Muhammad Aammar Tufail, Codanics. First published 16 November 2026, last updated 16 November 2026. Found a bug or have an idea for a new tool? Tell us on the WhatsApp channel or in the comments on YouTube. Results are for learning and planning; check important analyses with a statistician or your supervisor.