{
  "id": "mg-to-ml",
  "version": "48c00d847791",
  "status": "published",
  "name": "Mg to Ml Converter",
  "question": "How do I convert mg to ml?",
  "summary": "Converts mg to ml and back: mL = mg ÷ concentration (mg/mL).",
  "category": "convert",
  "subcategory": "units",
  "url": "https://www.acalculator.org/convert/mg-to-ml",
  "markdown": "https://www.acalculator.org/convert/mg-to-ml.md",
  "kind": "formulas",
  "method": "mL = mg ÷ concentration (mg/mL)",
  "assumptions": [
    "Exact on the typed decimals: at most 6 decimal places (6 significant digits below 0.0001), rounded half up."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "value": {
        "title": "Milligrams (mg)",
        "description": "The amount in mg.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "mgPerMl": {
        "title": "Concentration (mg/mL)",
        "description": "From the label: 250 mg per 5 mL is 50.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 100000
      },
      "result": {
        "title": "Milliliters (mL)",
        "description": "The same amount in ml.",
        "type": "number",
        "minimum": 0,
        "maximum": 10000000
      }
    }
  },
  "solve": {
    "fillAny": 2,
    "variables": [
      "value",
      "mgPerMl",
      "result"
    ],
    "inputsOnly": []
  },
  "outputs": {
    "value": {
      "label": "Milligrams (mg)",
      "description": "The amount in mg.",
      "format": "number"
    },
    "mgPerMl": {
      "label": "Concentration (mg/mL)",
      "description": "From the label: 250 mg per 5 mL is 50.",
      "format": "number"
    },
    "result": {
      "label": "Milliliters (mL)",
      "description": "The amount in ml.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "value": 1,
      "mgPerMl": 50
    },
    "outputs": {
      "result": 0.02
    },
    "text": "1 mg = 0.02 ml."
  },
  "examples": [
    {
      "given": {
        "value": 250,
        "mgPerMl": 50
      },
      "expect": {
        "result": 5
      },
      "source": "NIST SP 811 (2008), Appendix B.8: mg and mL"
    },
    {
      "given": {
        "value": 30,
        "mgPerMl": 12
      },
      "expect": {
        "result": 2.5
      },
      "source": "NIST SP 811 (2008), Appendix B.8: mg and mL"
    }
  ],
  "sources": [
    "NIST SP 811 (2008), Guide for the Use of the International System of Units, Table 3 (watt = volt × ampere) and Appendix B.8, retrieved 2026-10-01. https://www.nist.gov/pml/special-publication-811"
  ],
  "related": [
    "ml-to-kg",
    "mg-to-kg"
  ],
  "changelog": []
}
