Molarity from Mass Calculator
About Molarity from Mass Calculator
What this calculator does
Most bench chemistry starts the same way: you have a jar of solid on the balance and you need to know what concentration it will give once it is dissolved. The molarity from mass calculator answers that question directly. Type in how many grams you weighed, the molar mass of the compound, and the final volume of the solution, and it returns the molarity in moles per liter. It also shows the number of moles it found on the way, so the arithmetic is never a black box.
Molarity is the workhorse unit of solution concentration. It tells you how many moles of a substance are dissolved in one liter of solution, which is exactly what you need for titrations, reaction stoichiometry, buffer preparation, and dilutions. Because mass is what a balance actually measures, converting grams to molarity is one of the most common calculations in a teaching lab, a research lab, or a quality-control setting. Doing it by hand is easy to get wrong when milligrams, milliliters, and hydrated salts get mixed together, which is where a dedicated tool earns its keep.
This page covers the formula, a clean step-by-step method, several worked examples that match the numbers you will see in a textbook, and the unit handling that trips people up. The calculator above is bidirectional: it can also work backward to tell you how much solute to weigh for a target concentration, what volume to make up, or what molar mass a measured solution implies.
The mass-to-molarity formula
Two short equations do all the work. The first converts mass to moles, and the second converts moles to molarity:
moles (n) = mass (g) ÷ molar mass (g/mol)
molarity (M) = moles (n) ÷ volume (L)
Combine them and you get a single relationship linking the four quantities this calculator works with:
M = mass ÷ (molar mass × volume)
Read it slowly and it makes physical sense. A bigger mass of solute raises the concentration, so mass sits on top. A larger molar mass means each gram is fewer moles, and a larger volume spreads the same moles more thinly, so both sit on the bottom. Keep the units honest (grams, grams per mole, and liters) and the answer comes out in moles per liter, which is the definition of molar (M).
Grams to molarity, step by step
Whether you use the calculator or a pencil, the same five steps get you to the answer:
- Identify the compound and its molar mass. Add up the atomic masses in the chemical formula, or look it up. The built-in preset list fills this in for common reagents.
- Record the mass you actually weighed. Use the real reading from the balance, not the target value, and note whether it is in grams or milligrams.
- Convert mass to moles.Divide grams by grams per mole. The unit "g" cancels and you are left with moles.
- Measure the final solution volume in liters. This is the volume after the solute has dissolved and the flask is topped up to the line, not the volume of water you started with.
- Divide moles by liters. The result is the molarity in mol/L. Round sensibly for the precision of your glassware.
The calculator runs these steps the instant you have three of the four values, and it prints the intermediate mole count so you can sanity-check each stage rather than trusting a single final number.
Worked textbook examples
Here are three examples you can reproduce in the calculator to confirm it matches a standard chemistry course.
Example 1: 1 M salt water
Dissolve 58.44 g of NaCl (molar mass 58.44 g/mol) to a final volume of 1 L. Moles = 58.44 ÷ 58.44 = 1 mol. Molarity = 1 ÷ 1 = 1.000 M.
Example 2: sodium hydroxide
Dissolve 20 g of NaOH (40.00 g/mol) in 500 mL of solution. Moles = 20 ÷ 40 = 0.5 mol. Volume = 0.5 L. Molarity = 0.5 ÷ 0.5 = 1.000 M.
Example 3: dilute glucose
Dissolve 9.008 g of glucose (180.16 g/mol) in 250 mL. Moles = 9.008 ÷ 180.16 = 0.05 mol. Volume = 0.25 L. Molarity = 0.05 ÷ 0.25 = 0.200 M.
Each of these lands on a round number, which is exactly why they show up in worksheets. Once you trust the tool on cases you can check in your head, you can lean on it for the messy real-world numbers where the molar mass has four decimal places and the volume is 0.375 L.
Working with units
Unit slips cause more wrong answers than the algebra ever will. The formula only behaves when mass is in grams, molar mass is in grams per mole, and volume is in liters. The calculator lets you enter milligrams, kilograms, or micrograms for mass and liters, milliliters, or microliters for volume, then converts everything to the base units before it does the math.
Mass
- 1 kg = 1000 g
- 1 mg = 0.001 g
- 1 µg = 0.000001 g
Volume
- 1 L = 1000 mL
- 1 mL = 0.001 L
- 1 µL = 0.000001 L
Concentration
- 1 M = 1 mol/L
- 1 mM = 0.001 M
- 1 µM = 0.000001 M
A classic example: weighing 250 mg of a reagent into 50 mL of buffer. That is 0.25 g in 0.05 L. If you forget to convert and divide moles by 50 instead of 0.05, your reported molarity is a thousand times too low. Picking the right unit from the dropdown removes that whole class of error.
Solving for mass, volume, or molar mass
Because all four quantities sit in one equation, you can fix any three and solve for the fourth. The solve-for menu at the top of the calculator switches between these modes:
- Solve for mass when you know the molarity you want. Rearranged, mass = molarity × molar mass × volume. To make 500 mL of 0.1 M NaCl you need 0.1 × 58.44 × 0.5 = 2.922 g.
- Solve for volume when you have a fixed amount of solute and a target concentration. Here volume = mass ÷ (molarity × molar mass), which tells you how far to dilute.
- Solve for molar mass when you measured a concentration and a mass and want the formula weight, using molar mass = mass ÷ (molarity × volume). This is handy for identifying an unknown or checking a hydrate.
Working out a required mass is the everyday version of this: it is how you turn "I need 250 mL of 2 M sodium carbonate" into a number on the balance. If your next step is to dilute a concentrated stock instead of weighing fresh solid, the dilution calculator and the C1V1 = C2V2 method below will finish the job.
Common mistakes and lab tips
A few recurring errors are worth guarding against every time you prepare a solution:
- Using the water volume, not the solution volume. Dissolving solute changes the total volume. Always make up to the mark in a volumetric flask and use that final figure.
- Ignoring water of hydration. Copper sulfate pentahydrate (CuSO₄·5H₂O) has a much larger molar mass than the anhydrous salt. Weigh the form you actually have and use its molar mass.
- Mismatched units. Milligrams with liters, or grams with milliliters, is the most common slip. Set the dropdowns before you read off the answer.
- Over-trusting decimal places. A balance good to ±0.001 g does not justify reporting molarity to six figures. Match the precision of your weakest measurement.
A good habit is to back-calculate: take the molarity the tool reports, multiply by molar mass and volume, and confirm you recover the mass you weighed. If it matches, your units and arithmetic agree.
Frequently Asked Questions
How do I find molarity from the mass of a solute?
Divide the solute mass in grams by its molar mass to get moles, then divide those moles by the final solution volume in liters. The molarity from mass calculator does both steps for you and shows the moles it found along the way, so you can check the working line by line.
What is the formula for converting grams to molarity?
Molarity equals mass divided by the product of molar mass and volume, written as M = m / (MM × V). Mass is in grams, molar mass in grams per mole, and volume in liters. Rearranging this one relationship lets you solve for mass, volume, or molar mass instead of molarity whenever one value is unknown.
Do I use the volume of water or the final solution volume?
Always use the final solution volume, measured after the solute is fully dissolved and the flask is topped up to the mark. The water you pour in first is usually less than the final volume because the dissolved solute takes up space, so using it would overstate the molarity you calculate.
Which units can I enter for mass, volume, and concentration?
Mass accepts grams, milligrams, kilograms, or micrograms; volume accepts liters, milliliters, or microliters; and concentration accepts molar, millimolar, or micromolar. The calculator converts everything to grams, liters, and mol/L internally, so you can mix the units that match your balance and glassware without doing manual conversions.
Where do I get the molar mass of my compound?
Add up the atomic masses of every atom in the chemical formula, or pick one of the built-in presets such as NaCl, glucose, or NaOH to fill the field automatically. For anything not in the list, use the molar mass calculator to compute the value from the formula and paste it back into this tool.
Can this calculator solve for mass or volume instead of molarity?
Yes. Choose mass, volume, or molar mass from the solve-for menu, enter the other three values, and the calculator rearranges M = m / (MM × V) for you. That makes it useful both for finding a concentration from grams and for working out how much solute to weigh to hit a target molarity.
Why does my answer differ from a textbook or another tool?
Small differences usually come from rounding the molar mass, mixing up milliliters and liters, or using a hydrated versus anhydrous form of the salt. Match the exact inputs and units first, confirm the molar mass you used, and the calculated molarity should line up with the reference value.