How to stop losing money on stockouts (The exact math for "Safety Stock")

Hey guys. I’m seeing a lot of store owners panicking about exactly how much inventory to order.

Most people just guess or reorder when their Shopify dashboard drops to 10 units. That’s a massive mistake. If you run out of your best-seller for even a week, the opportunity cost (and the hit to your ad algorithm) is brutal.

To do this like a professional warehouse, you need to calculate your Safety Stock. Here is the exact formula you should build into your spreadsheets today:

(Max Daily Sales x Max Lead Time) - (Average Daily Sales x Average Lead Time) = Safety Stock.

Here is what that actually means:

  1. Max Daily Sales: What did you sell on your single busiest day? (e.g., 20 units).

  2. Max Lead Time: How long did your supplier take during their worst historical delay? (e.g., 40 days).

  3. Average Daily Sales: What do you normally sell per day? (e.g., 5 units).

  4. Average Lead Time: How long does your supplier normally take? (e.g., 30 days).

(20 x 40) - (5 x 30) = 800 - 150 = 650 units.

In this scenario, you should ALWAYS have 650 units sitting in your warehouse as a buffer. If your total inventory drops below 650 + what you will sell before the next shipment arrives, you need to pull the trigger and reorder IMMEDIATELY.

Doing this math manually for 100+ SKUs across a massive catalog is an absolute headache

Good breakdown of the formula. One thing worth adding is that this assumes your demand is relatively stable. If you’re running flash sales or seasonal products, your max daily sales might be 10x your average, which inflates the safety stock number way beyond what makes sense.

For seasonal stuff, I’d run the formula on a rolling 30-60 day window instead of all-time data. Otherwise you end up sitting on 650 units of a product that’s only hot during Q4.

The other piece most people miss is carrying cost. Holding 650 extra units ties up cash and warehouse space. For a $15 product that’s almost $10K just sitting there as insurance. Worth doing for your top 5-10 SKUs, probably overkill for the long tail.

What kind of products are you working with? Domestic vs overseas suppliers is a completely different game when it comes to lead time variance.

Great points especially on seasonal demand and carrying costs, that’s something a lot of formulas tend to ignore.

This is a solid starting point, and lumine’s pushback is the right one — a couple of things that helped me when I hit the same wall:

  1. Safety stock and the reorder POINT are two different jobs. The formula here sizes the buffer; it doesn’t tell you WHEN to act. Pair it with: reorder point = (avg daily sales x avg lead time) + safety stock. When on-hand crosses that number, it’s time to order — the safety stock is just the cushion baked into it.
  2. On lumine’s carrying-cost worry: the fix usually isn’t to drop the formula, it’s to apply it selectively. Run it on your A-items — the ~20% of SKUs that drive most of your revenue and hurt most when they’re out — and use a cruder flat buffer for the long tail. Holding “max lead time” worth of safety stock across your whole catalog is what ties up the cash; across your top 30 SKUs it’s cheap insurance.
  3. The variable most people under-weight is lead-time variability, not demand. In my experience most stockouts came from the supplier being late, not a demand spike. If your lead time swings from 12 to 25 days, that spread dominates the formula. Worth logging your last few POs’ actual arrival dates vs. what was promised — that “max lead time” number is often bigger than people assume.

For seasonal items the average-daily-sales input is the trap — I’d compute velocity off the comparable season last year rather than a trailing 30/60-day average, or the number lags the ramp every time.

Curious how others handle the seasonal SKUs specifically — do you recompute per season, or just widen the buffer and accept some overstock?