A gram conversion calculator converts between mass in grams and other units or quantities, most commonly moles in chemistry. You enter the mass (in grams) and the molar mass (in g/mol) of a substance, and the calculator returns the number of moles. It also supports converting grams to milligrams, micrograms, kilograms, and other metric mass units.
Formula
The core formula for converting grams to moles is:
moles = mass (g) / molar mass (g/mol)
Where:
- mass (m) is the weight of the substance in grams (g).
- molar mass (MM) is the mass of one mole of the substance in grams per mole (g/mol). For a compound, it is the sum of the atomic weights of its constituent atoms (e.g., NaCl = 22.99 + 35.45 = 58.44 g/mol).
- moles (n) is the amount of substance in moles (mol).
If you also have a solution volume (V) in milliliters, the molarity (concentration) is:
molarity (mol/L) = moles / volume (L) = [mass (g) / molar mass (g/mol)] / [volume (mL) / 1000]
This calculator uses the second formula to give both moles and molarity in one step.
Worked Example
Let’s use the default values: you have 2.922 g of sodium chloride (NaCl, molar mass = 58.44 g/mol) and you dissolve it in 250 mL of water.
- Convert volume to liters: 250 mL ÷ 1000 = 0.250 L.
- Calculate moles of NaCl: 2.922 g ÷ 58.44 g/mol = 0.0500 mol (exactly 0.0500 to four significant figures).
- Calculate molarity: 0.0500 mol ÷ 0.250 L = 0.2000 mol/L.
- Convert to millimolar: 0.2000 mol/L × 1000 = 200.0 mM.
The calculator shows 0.2000 mol/L as the headline result and 200.0 mM as the secondary result.
Assumptions
- The solute is pure and completely dissolves; no volume change upon mixing.
- The final volume (not solvent volume) is used – you add solute and then bring the total volume to 250 mL.
- Molar mass is the sum of standard atomic weights (IUPAC abridged values). For NaCl, we use 58.44 g/mol.
- Temperature and pressure do not affect molarity (they affect gas volumes, not solution concentrations).
How to Use a Gram Conversion Calculator
Using a gram conversion calculator is straightforward:
- Identify what you want to convert. Grams to moles, grams to milligrams, or grams to kilograms.
- For grams to moles: enter the mass in grams and the molar mass of the substance (you can compute it from the periodic table).
- For simple unit conversion: enter the gram value and select the target unit (mg, µg, kg, etc.). The calculator applies the appropriate factor: 1 g = 1000 mg = 1,000,000 µg = 0.001 kg.
- Read the result. The calculator returns the converted value, often with a clear unit label.
For example, converting 5 grams to milligrams: 5 g × 1000 = 5000 mg. Converting 5 grams to kilograms: 5 g ÷ 1000 = 0.005 kg.
Common Mistakes and How to Avoid Them
- Mixing up molar mass and atomic mass. Molar mass is in g/mol, not amu. For water (H₂O), molar mass is 18.015 g/mol, not 18.015 g.
- Forgetting to convert volume to liters. Molarity requires liters. If you plug in milliliters without dividing by 1000, your concentration will be 1000 times too high.
- Using the wrong molar mass for hydrated compounds. For example, CuSO₄·5H₂O has a molar mass of 249.69 g/mol, not 159.61 g/mol (anhydrous). Check the formula.
- Rounding too early. Round only at the final step to avoid accumulating errors.
- Confusing mass and weight. In everyday lab work, grams are used as a measure of mass; the difference is negligible on Earth.
When to Use Grams vs. Moles
Grams measure mass directly – what you weigh on a balance. Moles count particles (atoms, molecules, ions) using Avogadro’s number (6.022 × 10²³). Use grams when you are weighing a solid reagent. Use moles when you need to relate amounts in a chemical reaction (stoichiometry) or prepare a solution of known concentration.
For example, to make 500 mL of a 0.1 M NaCl solution, you need 0.05 mol of NaCl. Multiply by molar mass (58.44 g/mol) to get 2.922 g – that’s what you weigh out. The calculator above does this in reverse.
How to Choose the Right Molar Mass
Always use the molar mass of the exact chemical formula you are using. For elements, it’s the atomic weight (e.g., Na = 22.99 g/mol). For compounds, sum the atomic weights of all atoms in the formula. For hydrates, include the water molecules (e.g., CaCl₂·2H₂O = 147.01 g/mol). For polymers or mixtures, use the average molecular weight if known.
If you are unsure, look up the substance’s formula and calculate the molar mass from the periodic table. Many calculators, including this one, let you enter the molar mass as an input, so you can use any value you need.
Limitations of Gram Conversion Calculators
These calculators assume ideal conditions: pure substances, complete dissolution, and no chemical reactions. They do not account for:
- Purity: If your reagent is 95% pure, the actual mass of the active compound is lower.
- Temperature effects: Molarity changes slightly with temperature because volume changes. For precise work, use molality (moles per kg of solvent) instead.
- Non-ideal solutions: In concentrated solutions, the effective concentration differs from the calculated molarity.
- Isotopic variations: Atomic weights are averages; specific isotopes have different masses.
Frequently Asked Questions
How do I convert grams to moles without a calculator?
Divide the mass in grams by the molar mass (g/mol). For example, 10 g of water (molar mass 18.015 g/mol) = 10 ÷ 18.015 = 0.555 mol. You can do this with any calculator or by hand.
What is the difference between a gram and a mole?
A gram is a unit of mass; a mole is a unit of amount of substance. One mole contains exactly 6.02214076 × 10²³ elementary entities (Avogadro’s number). The mass of one mole of a substance in grams equals its molar mass.
Can I convert grams to milliliters?
Only if you know the density of the substance. The formula is volume (mL) = mass (g) ÷ density (g/mL). For water at 4 °C, density is 1 g/mL, so 1 g = 1 mL. For other substances, density varies.
How do I convert grams to milligrams?
Multiply the number of grams by 1000. For example, 0.5 g × 1000 = 500 mg. Conversely, divide milligrams by 1000 to get grams.
Why do I need molar mass for gram-to-mole conversion?
Molar mass is the bridge between the macroscopic world (grams) and the microscopic world (moles). It tells you how many grams are in one mole of a substance, so you can convert between the two.
Safety and Lab Practice
This calculator is for study and lab-planning arithmetic only. Always follow your lab’s method, the safety data sheet (SDS) for each chemical, and your supervisor’s instructions. Never use this tool for medication dosing or any clinical preparation. When weighing chemicals, use an appropriate balance and handle all reagents with care.
Related
Formula used
in m | Mass of solute | g | 2.922 | 0 in mm | Molar mass | g/mol | 58.44 | 0.001 in v | Final solution volume | mL | 250 | 0.001 out c | Molarity | mol/L | m / mm / (v / 1000) | 4 out cmm | Concentration in millimolar | mM | c * 1000 | 2
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 with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- ug to ppb Calculator: Convert Micrograms per Liter1.00 ppb
- Grams to Moles Chemistry: How to Convert0.2000 mol/L
- Convert ug/l to ppb Calculator
- CPP Calculator Ontario: How CPP Is Calculated162.12 $/month
- Grams to Moles to Molecules: How to Convert0.2000 mol/L
- Organic Chemistry Reaction Calculator: How It Works