How to calculate safety stock for your Shopify store
Try the free reorder-point calculator to see how daily demand, lead time and safety stock change your ordering trigger.
A fixed buffer is a useful starting point. To refine it, look at how much demand varies and how reliably suppliers deliver. This guide shows a statistical planning example and the practical data to collect before changing your reorder settings.
What safety stock is actually for
Safety stock is the inventory you hold to absorb uncertainty. There are two sources of uncertainty in any replenishment cycle:
- Demand uncertainty - sales in the lead-time window are higher than expected.
- Supply uncertainty - your supplier ships late, short, or both.
A fixed buffer day rule handles neither systematically. A SKU that sells 10 units/day with a standard deviation of 1 unit needs far less safety stock than one that sells 10/day with a standard deviation of 8 units, even though they have the same average.
The formula
With independent daily demand and lead times, a normal approximation gives this planning estimate:
Safety Stock = Z × √(LT × σ_d² + D² × σ_lt²)
Where:
- Z - service-level Z-score. For a target 95% cycle service level, Z = 1.645. For 98%, Z = 2.054. For 99%, Z = 2.326.
- LT - average lead time in days (time from PO to warehouse receipt).
- σ_d - standard deviation of daily demand over the measurement window.
- D - average daily demand.
- σ_lt - standard deviation of lead time (how much your supplier's delivery timing varies).
A worked example
Suppose you have a SKU with:
- Average daily demand: 12 units/day
- Demand standard deviation: 4 units/day
- Average lead time: 21 days
- Lead-time standard deviation: 5 days
- Target service level: 95% (Z = 1.645)
Plugging in:
Safety Stock = 1.645 × √(21 × 4² + 12² × 5²)
= 1.645 × √(21 × 16 + 144 × 25)
= 1.645 × √(336 + 3,600)
= 1.645 × √3,936
= 1.645 × 62.7
≈ 103.2 units; round up to 104 units
A 30-day buffer at 12 units/day is 360 units. The illustrative 104-unit estimate is about 71% lower. It targets a 95% chance of avoiding a stockout during a replenishment cycle under these assumptions; compare actual delivery and stockout results before changing the buffer.
The reorder point
Add expected lead-time demand to your safety stock to calculate the reorder point (ROP):
ROP = (Average Daily Demand × Average Lead Time) + Safety Stock
In this example: ROP = (12 × 21) + 104 = 356 units. Review replenishment when inventory position (on hand plus on order minus backorders) reaches this level. Account for open orders before adding another PO.
Service level segmentation
Not every SKU deserves a 98% service level. The Z-score is not free - higher service levels require more safety stock. An illustrative starting point to test:
- A-tier SKUs (largest cumulative revenue contribution) → 98–99% service level
- B-tier SKUs (middle contribution) → 95% service level
- C-tier SKUs (remaining contribution) → 90% service level
Choose service targets using revenue contribution, margin, substitutability, and the cost of a stockout. A low-revenue spare part may still be essential to a customer, so ABC class is a starting point for review.
Where merchants get this wrong
Three common mistakes:
- Using average lead time only, ignoring variance. If your supplier is on time 90% of the time but arrives 2 weeks late 10% of the time, the average masks the real risk. The standard deviation of lead time is the number that matters.
- Measuring demand variance over too short a window. A 30-day demand window during a slow period dramatically underestimates the variance you'll see during a sale or seasonal ramp. Use 52 weeks of history where possible.
- Never recalculating. A SKU's demand variance changes over time. A product that was predictable for two years can become volatile after a single viral moment or a competitor stockout. Recalculate safety stock monthly for A-tier SKUs.
Getting supplier lead-time variance
Useful lead-time data lives in your PO history: date PO sent, date goods received. The gap between those two dates, across all POs for a vendor, gives you average lead time and standard deviation.
Use any saved Stocky records or spreadsheet order dates you already have, then record subsequent receipts consistently. Keep the sample count visible: a supplier with two deliveries offers less evidence than one with dozens of comparable shipments.
How skubase handles this
Skubase uses demand variability, configured supplier lead times, and safety-buffer settings to help prioritize reorder decisions. Recorded PO receipts support supplier scorecards and lead-time review. The example above includes variable lead time; Skubase's current reorder calculation uses a configured lead time, so review that setting when your supplier's delivery pattern changes.