ThisCalculator

Chemistry

Grams to Molarity Calculator: Convert Mass to Moles

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Grams to Molarity Calculator: Convert Mass to Moles

This calculator converts a mass of a solute (in grams) into molarity (moles per liter of solution). You enter the mass, the molar mass of the solute, and the volume of the solution, and you get the molarity in mol/L. It also shows the number of moles, so you can see the intermediate step.

Formula

The core formula is: Molarity (c) = mass (m) ÷ (molar mass (M) × volume (V))

In symbols: c = m / (M × V)

  • c = molarity, in moles per liter (mol/L, also written M)
  • m = mass of the solute, in grams (g)
  • M = molar mass of the solute, in grams per mole (g/mol)
  • V = volume of the solution, in liters (L)

This is simply the definition of molarity (moles per liter) combined with the conversion from grams to moles (moles = mass / molar mass).

Worked Example

Let’s use the default values: you have 58.44 g of sodium chloride (NaCl), whose molar mass is 58.44 g/mol, and you dissolve it in 1 L of water.

  1. First, convert grams to moles: n = 58.44 g ÷ 58.44 g/mol = 1.000 mol
  2. Then, divide by the volume: c = 1.000 mol ÷ 1 L = 1.000 mol/L

So the molarity is 1.000 M. The calculator shows 1.0000 mol for the amount and 1.0000 mol/L for the molarity.

When to Use This Conversion

You need this calculation whenever you prepare a solution from a solid solute. For example, making a buffer, a culture medium, or a standard solution for titration. You weigh the solid, look up its molar mass (from the periodic table or the bottle label), and decide the final volume. The calculator tells you the resulting concentration.

It’s also useful in reverse: if you need a specific molarity, you can rearrange to find the mass required. But this page focuses on the forward conversion from grams to molarity.

How to Choose the Molar Mass

The molar mass must match the chemical formula of the solute you are using. For a compound like NaCl, add the atomic masses of sodium (22.99) and chlorine (35.45) to get 58.44 g/mol. For hydrated salts (e.g., CuSO₄·5H₂O), include the water molecules in the molar mass. For acids and bases, use the formula that actually dissociates—for example, HCl has a molar mass of 36.46 g/mol, but H₂SO₄ is 98.08 g/mol.

If you are using a solution that is already a liquid (like concentrated HCl), you need density and weight percent to find the mass of solute, which is beyond this simple calculator. This calculator assumes you are weighing a pure solid.

Common Mistakes and Pitfalls

  • Unit mismatch: Volume must be in liters. If you measured in mL, divide by 1000 first. For example, 250 mL = 0.25 L.
  • Molar mass errors: Using the mass of the anhydrous salt when you have a hydrate, or forgetting to multiply by the number of atoms. Double-check the formula.
  • Confusing mass and moles: Molarity is moles per liter, not grams per liter. The calculator does the conversion, but when you do it by hand, don’t skip the division by molar mass.
  • Volume of solution vs. solvent: The volume in the formula is the final volume of the solution, not the volume of solvent you started with. When you dissolve a solid, the volume changes slightly; always make up to the final volume in a volumetric flask.

Limitations of the Formula

The formula assumes ideal behavior and that the solute dissolves completely without changing the volume significantly. In reality, dissolving a solid can cause a small volume change, and very concentrated solutions may not follow the ideal linear relationship. For most lab work, the formula is accurate enough.

Also, this calculator gives the nominal concentration. If the solute reacts with the solvent (like HCl in water), the actual concentration of H� ions may be slightly different due to activity effects. For precise work, you may need to standardize the solution by titration.

Frequently Asked Questions

How do I convert grams to molarity without a calculator?

Divide the mass in grams by the molar mass to get moles, then divide that by the volume in liters. The result is the molarity. For example, 10 g of NaOH (molar mass 40 g/mol) in 0.5 L gives (10/40)/0.5 = 0.5 M.

What is the difference between molarity and molality?

Molarity (M) is moles of solute per liter of solution. Molality (m) is moles of solute per kilogram of solvent. Molarity depends on temperature because volume changes with temperature; molality does not, since it uses mass.

Can I use this calculator for any solute?

Yes, as long as you know the molar mass of the pure solute. It works for ionic compounds, molecular compounds, acids, bases, and even elements. Just make sure the solute is fully dissolved and the volume is the final solution volume.

What if I only have the volume in milliliters?

Convert milliliters to liters by dividing by 1000. For instance, 250 mL becomes 0.25 L. Enter that value in the volume field. The calculator does not do the conversion automatically, so you must do it yourself.

Why is the molar mass sometimes not a whole number?

Because atomic masses are weighted averages of naturally occurring isotopes. For example, chlorine has two stable isotopes, so its average atomic mass is 35.45, not 35 or 36. That’s why NaCl is 58.44, not 58.

Does temperature affect molarity?

Yes. Since molarity uses volume, and liquids expand when heated, the same amount of solute in the same container will have a slightly lower molarity at higher temperatures. For precise work, control the temperature or use molality.

Related

Formula used
in m | Mass of solute | g | 58.44 | 0
in M | Molar mass | g/mol | 58.44 | 0
in V | Volume of solution | L | 1 | 0
out n | Amount of solute | mol | m / M | 4
out c | Molarity | mol/L | (m / M) / V | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.