{
  "id": "kg-to-mg",
  "version": "006341b12279",
  "status": "published",
  "name": "Kg to Mg Converter",
  "question": "How do I convert kg to mg?",
  "summary": "Converts kilograms (kg) to milligrams (mg) and back, with the exact unit definitions.",
  "category": "convert",
  "subcategory": "weight",
  "url": "https://www.acalculator.org/convert/kg-to-mg",
  "markdown": "https://www.acalculator.org/convert/kg-to-mg.md",
  "kind": "formulas",
  "method": "mg = kg × 1000000 (the same as kg ÷ 0.000001)",
  "assumptions": [
    "1 kilogram = 1000000 milligrams, from the exact definitions in NIST SP 811.",
    "The answer shows at most 6 decimal places; the calculation keeps full precision."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "value": {
        "title": "Kilograms (kg)",
        "description": "The amount in kilograms to convert.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "result": {
        "title": "Milligrams (mg)",
        "description": "The same amount in milligrams.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000000000
      }
    }
  },
  "solve": {
    "fillAny": 1,
    "variables": [
      "value",
      "result"
    ],
    "inputsOnly": []
  },
  "outputs": {
    "value": {
      "label": "Kilograms (kg)",
      "description": "The amount in kilograms to convert.",
      "format": "number"
    },
    "result": {
      "label": "Milligrams (mg)",
      "description": "The amount in milligrams.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "value": 1
    },
    "outputs": {
      "result": 1000000
    },
    "text": "1 kg = 1,000,000 mg."
  },
  "examples": [
    {
      "given": {
        "value": 1
      },
      "expect": {
        "result": 1000000
      },
      "source": "exact unit definitions in NIST SP 811 (2008), Appendix B.8"
    },
    {
      "given": {
        "value": 0.25
      },
      "expect": {
        "result": 250000
      },
      "source": "exact unit definitions in NIST SP 811 (2008), Appendix B.8"
    },
    {
      "given": {
        "result": 250000
      },
      "expect": {
        "value": 0.25
      },
      "source": "exact unit definitions in NIST SP 811 (2008), Appendix B.8"
    }
  ],
  "sources": [
    "NIST SP 811 (2008), Guide for the Use of the International System of Units, Appendix B.8. https://www.nist.gov/pml/special-publication-811"
  ],
  "related": [
    "mg-to-kg",
    "kg-to-lbs",
    "lbs-to-kg",
    "grams-to-kg",
    "kg-to-grams"
  ],
  "changelog": []
}
