Safety stock is the extra inventory you hold above expected sales during lead time, to cover swings in demand and in how long a PO takes to become sellable. It's calculated per variant with a service level factor, and at a 95% service level it covers 19 of 20 replenishment cycles without a stockout.
How safety stock is calculated
Safety stock = Z × √(L × σd² + d² × σL²). This is the combined formula from Peter King's APICS article, used when demand and lead time vary independently:
- Z: the service level factor. At 95%, Z is 1.65.
- L: average lead time in days, from placing the PO to units showing as Available in Shopify.
- d and σd: average daily unit sales for the variant, and the standard deviation of those daily sales.
- σL: the standard deviation of lead time in days, from your last six to ten POs.
If only demand varies, the formula shortens to Z × σd × √L.
Worked example at 40 units a day
Take a variant that sells 40 units a day (σd of 12) at a brand doing about 4,000 orders a month. The supplier lead time is 30 days, and the 3PL adds 1 day of dock wait and 1 day of receiving before units are Available, so L is 32 days. Lead time has swung by 4 days across recent POs. These are illustrative numbers, not data from any brand.
At 95%: 1.65 × √(32 × 12² + 40² × 4²) = 1.65 × √(4,608 + 25,600) = 1.65 × 173.8 = 287 units, rounded up.
| Cycle service level | Z | Safety stock | Days of sales covered |
|---|---|---|---|
| 90% | 1.28 | 223 units | 5.6 |
| 95% | 1.65 | 287 units | 7.2 |
| 98% | 2.05 | 357 units | 8.9 |
| 99% | 2.33 | 405 units | 10.1 |
Demand swings alone would need 112 units. The 4-day swing in lead time pushes it to 287, so a steadier supplier and a 3PL that receives on a fixed clock lower safety stock more than a better forecast does. Our reorder point and safety stock guide runs the same method at 1,000 to 25,000 orders a month.
What it costs and how it differs from a Shopify buffer
Safety stock is inventory you pay to hold. At an example landed cost of $12 a unit, 287 units ties up $3,444 per variant, plus monthly storage like any other stock. Hero SKUs can justify 98% or 99%, while slow tail variants rarely need more than 90%.
Shopify lets apps set units aside as Unavailable, with safety stock named as one reason, and Unavailable units can't sell. That buffer protects against overselling. Reorder math needs units that can still sell during a late PO, so keep the two separate.
How we handle it at Orderfy
We receive inbound stock within 24 hours of delivery, so count our receiving step as 1 day in L. Our native Shopify app syncs stock to Shopify in real time, so the Available number you compare with your reorder point matches the count in Orderfy WMS, the inventory software we built in-house.
Frequently asked questions
Safety stock is the buffer for swings in demand and lead time. The reorder point is the stock level that triggers the next PO, calculated as lead time demand plus safety stock, so safety stock is one part of the reorder point.
95% is a common starting point (Z of 1.65), which means about 1 replenishment cycle in 20 ends with a stockout. Raise it for hero SKUs that drive first orders and subscriptions, and lower it for slow variants, where extra units mean months of storage fees.
Monthly for fast sellers, and before any seasonal change in demand. Log the actual dates of every PO so lead time and its spread come from real data.
Get a quote from Orderfy
Send your monthly order volume and what you ship, and we'll build an itemized quote.