Safety stock is the quantity you hold above expected demand to absorb the two things that never go according to plan: selling more than forecast, and replenishment arriving later than promised. It isn't "extra" product — it's the price of not running out.
Almost every brand holds some. Few calculate it. The difference shows up the day a supplier runs a week late.
The mistake that makes the formula necessary
Intuition says: "I sell 20 units a day and replenishment takes 10 days, so I reorder at 200." That gives you a reorder point, not safety stock, and it hides an assumption: that both the 20 and the 10 are exact.
They aren't. You sell 20 on average, but there are days of 8 and days of 45. Your supplier takes 10 days on average, but sometimes 7 and sometimes 16. Plan with averages and you'll stock out roughly half the time — because by definition half of all days land above the average.
Safety stock covers that half.
The formula
The version most e-commerce operations use combines both sources of variation:
Safety stock = Z × σD × √LT
Where:
| Symbol | What it is | Where it comes from |
|---|---|---|
| Z | Service level factor | Table below |
| σD | Standard deviation of daily demand | Your daily sales over the last 60–90 days |
| LT | Lead time: days replenishment takes | Real history with your supplier, not what they promise |
The Z factor translates "how often am I willing to run out" into a number:
| Service level | Z | Means |
|---|---|---|
| 90% | 1.28 | You fall short 1 in 10 cycles |
| 95% | 1.65 | 1 in 20 |
| 97.5% | 1.96 | 1 in 40 |
| 99% | 2.33 | 1 in 100 |
Going from 95% to 99% sounds minor. In units it's roughly 40% more product sitting still. That's why service level is set per SKU rather than across the catalog: your hero product deserves 99%, your long tail doesn't.
A worked example
A brand sells a face cream. Over the last 90 days:
- Average sales: 20 units/day
- Standard deviation of daily sales: 7 units
- Actual supplier lead time: 12 days (they promise 10)
- Chosen service level: 95% → Z = 1.65
Safety stock = 1.65 × 7 × √12
= 1.65 × 7 × 3.46
= 40 units
And the reorder point — when to place the order — is built on top:
Reorder point = (daily demand × lead time) + safety stock
= (20 × 12) + 40
= 280 units
When available inventory hits 280, you order. Not before, not after.
Notice the detail that moves the result most: we used 12 days, not 10. Had we used the supplier's promise instead of their history, the reorder point would have been 240 and the brand would come up short in every cycle where the supplier hit their real average.
The four expensive mistakes
- Calculating with the promised lead time. The only valid number is how long it has actually taken, measured by you. If you're not tracking it, start today — three cycles already tell you something.
- One service level for the whole catalog. SKUs aren't worth the same. Segment by turnover and margin — the same exercise you use to decide what to count in a cycle count.
- Never recalculating. Demand variability shifts with seasonality. Safety stock calculated in February won't hold through peak season.
- Confusing it with dead stock. If the buffer goes untouched for 12 months, that isn't safety — it's trapped capital. Check it against your inventory turnover.
When the risk isn't your supplier
The formula assumes lead time variation comes from the supplier. In Mexico there's an additional source that has nothing to do with them: the border. On September 14 and 15, 2026, a failure in the SAT system halted customs clearance for two days, with cargo stuck in both directions.
For a brand that imports, that means your real lead time includes a stretch you can't negotiate with anyone. The practical answer is the same one the formula gives: more buffer, and preferably already nationalized and inside the country — because inventory still sitting on the far side of customs is no safety at all.
Frequently asked questions
Are safety stock and buffer stock the same thing? In practice, yes. Both describe inventory held above forecast demand to absorb variability.
How much history do I need to calculate the deviation? Between 60 and 90 days of daily sales for a stable product. For new or highly seasonal items, use the comparable period from last year and recalculate monthly.
What service level should I choose? 95% is a reasonable starting point for most of the catalog. Go to 99% only for SKUs that concentrate your revenue or where a stockout costs you the customer, not just the order.
Does this apply if I sell on marketplaces? Even more so. A stockout on Amazon or Mercado Libre doesn't just cost the sale — it penalizes your listing position, and recovering that takes longer than restocking.
Safety stock is a risk decision, not a warehouse decision: you're buying the certainty of being able to ship. What is a warehouse decision is where that buffer lives, what it costs to hold, and how fast you can move it when you need it. Ecommex stores and controls inventory for e-commerce brands with cycle counting and real-time visibility — see our warehousing service.