# Convert mg to grams

Converts milligrams (mg) to grams (g) and back, with the exact unit definitions.

- Page: https://www.acalculator.org/convert/mg-to-grams
- JSON spec: https://www.acalculator.org/convert/mg-to-grams.json
- Version: b7f75fea5d42

## Default answer

Example with the default inputs (Milligrams (mg) 1): 1 mg = 0.001 g.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| value | Milligrams (mg) | The amount in milligrams to convert. |
| result | Grams (g) | The same amount in grams. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| value | Milligrams (mg) | The amount in milligrams to convert. |
| result | Grams (g) | The amount in grams. |

## Method

g = mg × 0.001

## Assumptions

- 1 milligram = 0.001 grams, from the exact definitions in NIST SP 811.
- Exact on the typed decimals: at most 6 decimal places (6 significant digits below 0.0001), rounded half up; an answer of 1 billion or more shows at most 15 significant digits.

## Worked examples

1. value = 1 gives result = 0.001. Source: Exact unit definitions in NIST SP 811 (2008), Appendix B.8.
2. value = 500 gives result = 0.5. Source: Exact unit definitions in NIST SP 811 (2008), Appendix B.8.
3. result = 0.5 gives value = 500. Source: Exact unit definitions in NIST SP 811 (2008), Appendix B.8.

## FAQ

### How many grams are in a milligram?

1 milligram is 0.001 grams, from the exact unit definitions (NIST SP 811).

### How do I convert mg to grams?

Multiply by 0.001: g = mg × 0.001. For example, 1 mg × 0.001 = 0.001 g.

### How do I convert grams back to mg?

Multiply by 1,000, or type the grams into the second box and the converter works it out. 1 gram is 1,000 milligrams.

### What is 500 mg in grams?

0.5 g: 500 ÷ 1,000.

### Do I need the density to convert mg to grams?

No. Both are units of mass, and milli means one thousandth (NIST SP 811), so 1 mg is 0.001 g of any substance.

## Sources

- NIST SP 811 (2008), Chapter 4, Table 5: SI prefixes (kilo 10³, centi 10⁻², milli 10⁻³), retrieved 2026-10-18. https://www.nist.gov/pml/special-publication-811/nist-guide-si-chapter-4-two-classes-si-units-and-si-prefixes
