This free mass converter changes milligrams (mg) into grams (g) and back again, updating live as you type. It is useful for nutrition labels, medication doses, lab work, and recipes that switch between the two metric units.
How it works
The metric prefix “milli” means one-thousandth, so the relationship is exact: 1 g = 1000 mg. The conversion is a simple power-of-ten shift:
- g = mg ÷ 1000
- mg = g × 1000
The relationship is linear, so the converter is bidirectional — edit either field and the other updates instantly.
Example
A nutrition label lists 2300 mg of sodium and you want it in grams.
2300 ÷ 1000 = 2.3 g.
| Milligrams (mg) | Grams (g) |
|---|---|
| 100 mg | 0.1 g |
| 500 mg | 0.5 g |
| 1000 mg | 1 g |
| 2300 mg | 2.3 g |
| 2500 mg | 2.5 g |
All calculations run entirely in your browser — no data is sent to any server.
Why milligrams and grams both appear in everyday life
The milligram is the right unit when measuring very small quantities of dense or potent substances; the gram takes over once amounts become large enough to weigh conveniently. Switching between them is a routine task across several fields.
Medications and pharmacy
Tablet and capsule doses are expressed in milligrams because the active ingredient is present in small amounts. A standard paracetamol tablet contains 500 mg of the active ingredient — which is 0.5 g. A prescription antibiotic might be given as 250 mg, 500 mg, or 1000 mg (1 g) per dose. When pharmacists compound medications or calculate pediatric dosing by body weight, they work in milligrams and then may report a batch weight in grams.
Reading a blister pack that says “250 mg” and wanting to know how many grams that is: 250 ÷ 1000 = 0.25 g. This converter handles exactly that in one step.
Nutrition and food labelling
Nutrition labels in most countries report sodium, potassium, vitamins, and minerals in milligrams, while macronutrients (fat, carbohydrate, protein) are in grams. You might want to add up daily sodium across several meals and compare to a health guideline expressed in grams, or vice versa.
For example, if a meal contains 820 mg of sodium and a snack adds 450 mg, the total is 1,270 mg — which is 1.27 g.
Laboratory and scientific use
In chemistry and biology labs, reagents are often weighed in milligrams when used in small quantities, then recorded in grams on balance readouts with three decimal places (e.g. 0.250 g = 250 mg). Converting between the two is a constant, routine step when writing up experimental procedures or checking stoichiometric calculations.
Cooking and baking at scale
Small quantities of spices, leavening agents, and colorings in food manufacturing are measured in milligrams or grams. A home baker might note that a recipe uses “a pinch” of saffron but need to convert to milligrams when sourcing ingredients by weight.
Precision and edge cases
- The conversion is exact — there is no rounding built into the formula. The converter displays as many significant figures as your input provides.
- Very small quantities (for example, 0.5 mg, a common dose for some potent medications) convert to 0.0005 g. The converter handles decimal milligrams correctly.
- The converter works on mass only. Volume units (millilitres, fluid ounces) require density information and are a different calculation entirely — do not confuse mg with mL.