{
  "id": "safety-stock",
  "version": "08eb0100f40d",
  "status": "published",
  "name": "Safety Stock Calculator",
  "question": "How much safety stock do I need?",
  "summary": "Works out safety stock from the service level, the standard deviation of demand and the lead time (z × σ × √lead time), with the reorder point when the average demand is given.",
  "category": "logistics",
  "url": "https://www.acalculator.org/logistics/safety-stock-calculator",
  "markdown": "https://www.acalculator.org/logistics/safety-stock-calculator.md",
  "kind": "function",
  "method": "z = the standard normal quantile of the service level. Standard deviation over the lead time = σd × √L. Safety stock = z × σd × √L. Reorder point = average demand × L + safety stock.",
  "assumptions": [
    "Demand per period is normally distributed and independent from one period to the next.",
    "The lead time is fixed. A lead time that varies needs more safety stock than this.",
    "Demand, its standard deviation and the lead time use the same period (days, weeks or months)."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "level": {
        "title": "Service level",
        "description": "The chance of not running out during one lead time (the cycle service level), from 50% to under 100%.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 50,
        "exclusiveMaximum": 100
      },
      "sd": {
        "title": "Standard deviation of demand per period",
        "description": "How much demand swings from one period to the next, in units, for one day, week or month.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000
      },
      "lead": {
        "title": "Lead time, in the same periods",
        "description": "Periods from placing an order to having the goods, counted in the same period as the demand.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000
      },
      "demand": {
        "title": "Average demand per period (optional)",
        "description": "Average units used or sold per period, for the reorder point.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000
      }
    }
  },
  "outputs": {
    "safety": {
      "label": "Safety stock",
      "description": "z × standard deviation of demand × √lead time, in units.",
      "format": "number"
    },
    "whole": {
      "label": "Safety stock in whole units",
      "description": "The safety stock rounded up to the next whole unit, so the service level is at least met.",
      "format": "integer"
    },
    "z": {
      "label": "z for the service level",
      "description": "The standard normal value with the service level below it.",
      "format": "number"
    },
    "sdLead": {
      "label": "Standard deviation over the lead time",
      "description": "Standard deviation of demand per period × √lead time.",
      "format": "number"
    },
    "leadDemand": {
      "label": "Average demand over the lead time",
      "description": "Average demand per period × lead time.",
      "format": "number"
    },
    "reorder": {
      "label": "Reorder point",
      "description": "Average demand over the lead time + safety stock: order again when stock falls to this level.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "level": 95,
      "sd": 10,
      "lead": 9,
      "demand": 50
    },
    "outputs": {
      "safety": 49.345608808544185,
      "whole": 50,
      "z": 1.6448536269514729,
      "sdLead": 30,
      "leadDemand": 450,
      "reorder": 499.34560880854417
    },
    "text": "At a 95% service level, a demand standard deviation of 10 and a lead time of 9, keep 49.35 units of safety stock."
  },
  "examples": [
    {
      "given": {
        "level": 90,
        "sd": 4,
        "lead": 1,
        "demand": 20
      },
      "expect": {
        "z": 1.2815515655446006,
        "safety": 5.126206262178402,
        "whole": 6,
        "reorder": 25.126206262178403
      },
      "source": "Abbas and Goosheh, Operations Management (eCampusOntario, 2024), section 13.7 Inventory Models for Uncertain Demand: σL = σd × √L, SS = Z × σL, ROP = d × L + SS, https://ecampusontario.pressbooks.pub/opsmgmt/chapter/13-7-inventory-models-for-uncertain-demand/ (with z rounded to 1.28 the book gets 5.12); NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.7.1 (standard normal quantiles: 0.90 gives 1.282, 0.95 gives 1.645, 0.99 gives 2.326), https://www.itl.nist.gov/div898/handbook/eda/section3/eda3671.htm; Python 3 check (statistics.NormalDist) in docs/progress/WP-128/xcheck.py"
    },
    {
      "given": {
        "level": 95,
        "sd": 10,
        "lead": 9
      },
      "expect": {
        "z": 1.6448536269514715,
        "sdLead": 30,
        "safety": 49.34560880854414,
        "whole": 50
      },
      "source": "Abbas and Goosheh, Operations Management (eCampusOntario, 2024), section 13.7 Inventory Models for Uncertain Demand: σL = σd × √L, SS = Z × σL, ROP = d × L + SS, https://ecampusontario.pressbooks.pub/opsmgmt/chapter/13-7-inventory-models-for-uncertain-demand/; NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.7.1 (standard normal quantiles: 0.90 gives 1.282, 0.95 gives 1.645, 0.99 gives 2.326), https://www.itl.nist.gov/div898/handbook/eda/section3/eda3671.htm (0.95 gives 1.645); hand calculation in content.mdx; Python 3 check (statistics.NormalDist) in docs/progress/WP-128/xcheck.py"
    },
    {
      "given": {
        "level": 99,
        "sd": 25,
        "lead": 4,
        "demand": 120
      },
      "expect": {
        "z": 2.3263478740408408,
        "safety": 116.31739370204204,
        "whole": 117,
        "leadDemand": 480,
        "reorder": 596.3173937020421
      },
      "source": "Abbas and Goosheh, Operations Management (eCampusOntario, 2024), section 13.7 Inventory Models for Uncertain Demand: σL = σd × √L, SS = Z × σL, ROP = d × L + SS, https://ecampusontario.pressbooks.pub/opsmgmt/chapter/13-7-inventory-models-for-uncertain-demand/; NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.7.1 (standard normal quantiles: 0.90 gives 1.282, 0.95 gives 1.645, 0.99 gives 2.326), https://www.itl.nist.gov/div898/handbook/eda/section3/eda3671.htm (0.99 gives 2.326); hand calculation in content.mdx; Python 3 check (statistics.NormalDist) in docs/progress/WP-128/xcheck.py"
    },
    {
      "given": {
        "level": 50,
        "sd": 10,
        "lead": 9,
        "demand": 50
      },
      "expect": {
        "z": 0,
        "safety": 0,
        "whole": 0,
        "reorder": 450
      },
      "source": "NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.7.1 (standard normal quantiles: 0.90 gives 1.282, 0.95 gives 1.645, 0.99 gives 2.326), https://www.itl.nist.gov/div898/handbook/eda/section3/eda3671.htm (the normal median is 0); Abbas and Goosheh, Operations Management (eCampusOntario, 2024), section 13.7 Inventory Models for Uncertain Demand: σL = σd × √L, SS = Z × σL, ROP = d × L + SS, https://ecampusontario.pressbooks.pub/opsmgmt/chapter/13-7-inventory-models-for-uncertain-demand/"
    }
  ],
  "sources": [
    "Azim Abbas and Seyed Goosheh, Operations Management (eCampusOntario, 2024), section 13.7, Inventory Models for Uncertain Demand: σL = σt × √L, safety stock SS = Z × σL for the chosen cycle service level, reorder point ROP = d × L + SS; kiosk example with Z = 1.28 for 90%. https://ecampusontario.pressbooks.pub/opsmgmt/chapter/13-7-inventory-models-for-uncertain-demand/ (retrieved 2026-10-18)",
    "NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.6.7.1, Cumulative Distribution Function of the Standard Normal Distribution (critical values 1.282, 1.645, 1.960 and 2.326 for 0.90, 0.95, 0.975 and 0.99). https://www.itl.nist.gov/div898/handbook/eda/section3/eda3671.htm (retrieved 2026-10-18)"
  ],
  "related": [
    "lead-time"
  ],
  "changelog": []
}
