The formula
Safety stock = (Maximum daily sales × Maximum lead time) − (Average daily sales × Average lead time).
This formula asks: what's the worst realistic gap between how much you'd sell and how long it'd take to restock, versus your normal case? That gap is the buffer you need to hold so a bad-but-plausible week doesn't turn into a stockout.
Worked example
Average daily sales: 12 units. Maximum daily sales (your worst-case demand spike): 22 units. Average supplier lead time: 14 days. Maximum lead time (accounting for occasional delays): 21 days.
Safety stock = (22 × 21) − (12 × 14) = 462 − 168 = 294 units.
Use the Safety Stock & Reorder Point Calculator to run your own numbers instantly.
Where your "maximum" numbers should come from
Don't guess — pull your actual highest single-day sales figure from the past 6-12 months (adjusted for any one-off anomaly like a viral spike you don't expect to repeat) and your actual longest recent lead time from your supplier's delivery history, not their quoted "typical" lead time. A supplier who quotes 14 days but has shipped as late as 24 days twice in the past year has a real maximum of 24, not 14 — using their marketing number instead of your own receiving records is the single most common way this formula quietly under-protects a seller.
Why "maximum" and not "average plus a little"
It's tempting to soften the formula — using, say, your 75th-percentile daily sales instead of the true maximum — to hold less inventory. That's a legitimate choice, but understand what you're trading: safety stock sized to true maximums protects against every bad week and bad shipment observed in your history; a softened version will, by design, still stock out during the worst weeks. There's nothing wrong with making that trade-off deliberately for a low-margin or low-consequence SKU — the mistake is making it accidentally by not realizing that's what a "typical" or averaged input does to the result.
Sizing safety stock by service level (the statistical approach)
The max-minus-average formula above is a solid, simple starting point, but it treats every SKU's worst historical week as equally likely to repeat, which isn't quite right — some products have wildly variable demand and others are nearly flat. Once you're tracking enough SKUs to make this worthwhile, a service-level (z-score) model gives a more calibrated answer:
Safety stock = Z × σ_LTD
Where Z is the z-score for your target service level (the probability you don't stock out before the next delivery — commonly 1.65 for a ~95% service level, or 2.33 for ~99%), and σ_LTD is the standard deviation of demand during the lead time, which combines both demand variability and lead-time variability.
Simplified worked example (holding lead time roughly constant): if your daily demand has a standard deviation of 4 units and your lead time is 14 days, demand-during-lead-time standard deviation is approximately 4 × √14 ≈ 15 units. At a 95% service level (Z = 1.65):
Safety stock = 1.65 × 15 ≈ 25 units.
Notice this can come out lower or higher than the max-minus-average method, depending on how extreme your historical worst case actually was relative to your normal variability — the statistical method is more precise but also more sensitive to having enough clean data to compute a real standard deviation from.
Choosing a service level deliberately
A higher service level (99%) costs you more in holding cost and ties up more cash; a lower one (90%) frees up cash but accepts more frequent, usually shorter, stockouts. Match the service level to the consequence of stocking out: a hero SKU that drives most of your traffic and reviews deserves a high service level; a low-volume, low-margin long-tail item can usually run leaner without meaningfully hurting the business.
Recalculating on a schedule, not just after a problem
Set a standing reminder — monthly for fast-moving or newly-growing SKUs, quarterly for stable ones — to recompute safety stock with fresh average/maximum figures. Recalculating only after a stockout already happened means you're always one step behind a demand shift, rather than ahead of it.
When this formula isn't enough
The max-minus-average approach is a solid beginner/intermediate approach, and the z-score model above extends it once you have enough data. Once you're managing many SKUs with highly variable, hard-to-model demand (heavy promotional spikes, viral-prone products, multi-modal seasonality), consider dedicated forecasting/inventory software that computes this per-SKU automatically rather than maintaining dozens of spreadsheet formulas by hand.