Safety Stock Calculation: The Complete Guide for E-commerce

Every Forecast Is Wrong. Safety Stock Is How You Deal With It.
Your forecast says you will sell 10 units per day. You will not sell exactly 10 units per day. Some days it will be 7. Some days 14. Your supplier says they ship in 30 days. Sometimes it is 25, sometimes 38.
Safety stock absorbs these misses. Without it, any deviation from plan -- demand spike, late shipment, forecast error -- leads directly to a stockout. I learned this the hard way on a product that sold out four days before the next shipment arrived. Four days of zero sales on a best-seller. The revenue loss was bad. The Amazon ranking damage took three weeks to recover.
Why the Simple Answer Is Not Simple Enough
Consider this scenario:
- Your forecast says 10 units/day
- Lead time is 30 days
- You order when you have exactly 300 units
What happens when you actually sell 12 units/day? Stockout on day 25. What if your supplier takes 35 days? Stockout on day 30. Both happen at once? Stockout on day 21.
Safety stock prevents all three. The question is how much.
The Basic Formula
Start here. This works for most sellers with stable products:
Safety Stock = Daily Sales x Safety Days
Example:
Daily Sales: 10 units
Safety Days: 14 days
Safety Stock: 10 x 14 = 140 units
Two weeks of buffer. How do you pick the right number of safety days?
| Risk Level | Safety Days | When to Use |
|---|---|---|
| Low (1 week) | 7 days | Stable demand, domestic suppliers, reliable shipping |
| Medium (2 weeks) | 14 days | Most e-commerce products |
| High (4 weeks) | 28 days | Seasonal products, overseas suppliers, variable demand |
For 80% of SKUs, 14 days is the right answer. Seriously. If you stop reading here and use 14 days across the board, you will be better off than most sellers who either carry zero buffer or hoard three months of inventory "just in case."
The Statistical Formula
When you want more precision -- for your top 20 SKUs by revenue, or for products with highly variable demand -- use the statistical approach:
Safety Stock = Z x od x vL
Where:
- Z = service level factor (how often you are willing to stock out)
- od = standard deviation of daily demand
- vL = square root of lead time in days
Service Level Factors
| Service Level | Z Value | What It Means |
|---|---|---|
| 90% | 1.28 | You accept stocking out 10% of reorder cycles |
| 95% | 1.65 | You accept stocking out 5% of reorder cycles |
| 99% | 2.33 | You accept stocking out 1% of reorder cycles |
Use 95% for most products. Use 99% only for your absolute best sellers where a stockout would be catastrophic. The jump from 95% to 99% increases safety stock by about 40% -- that is a lot of extra capital for a small improvement.
Worked Example
Your data:
- Average daily sales: 10 units
- Standard deviation of daily demand: 3 units
- Lead time: 30 days
- Target: 95% service level
Safety Stock = 1.65 x 3 x v30
Safety Stock = 1.65 x 3 x 5.48
Safety Stock = 27 units
27 units of safety stock for 95% service level. Compare that to the basic formula's 140 units (14 safety days). The statistical formula is more capital-efficient because it uses your actual demand variability instead of a blanket buffer. If your demand is predictable (low standard deviation), you need less safety stock. If it is erratic, you need more.
When Your Supplier Is Unreliable
The formula above assumes your supplier ships on time. If their lead time varies, you need the expanded version:
Safety Stock = Z x v(L x od² + d² x oL²)
Where oL is the standard deviation of lead time and d is average daily demand.
Example with Lead Time Variability
Your data:
- Average daily sales: 10 units
- Demand standard deviation: 3 units
- Average lead time: 30 days
- Lead time standard deviation: 5 days
- Target: 95% (Z = 1.65)
Safety Stock = 1.65 x v(30 x 9 + 100 x 25)
Safety Stock = 1.65 x v(270 + 2500)
Safety Stock = 1.65 x v2770
Safety Stock = 1.65 x 52.6
Safety Stock = 87 units
Lead time variability tripled the safety stock requirement -- from 27 units to 87. This is why I track actual supplier delivery dates against promised ones. A supplier who is "usually on time" but sometimes 10 days late needs meaningfully more buffer than one who delivers within a 2-day window every time.
Different Products, Different Buffers
Fast movers (high velocity, lots of data points): 1-2 weeks of safety stock. You have enough sales data to forecast accurately and you reorder frequently, so each order corrects quickly.
Slow movers (low velocity, sporadic demand): 3-4 weeks. Less data means less accurate forecasts. Fewer reorder cycles mean fewer chances to correct errors. A single demand spike can wipe out your stock.
Seasonal products: build extra buffer before peak season, reduce after. If your December is 3x your average month, your November safety stock should reflect December's expected velocity, not October's.
New products with no history: start with 3-4 weeks and reduce as you collect data. I have launched products with a month of safety stock and been glad for it when initial demand exceeded my estimates by 60%.
FBA Complicates Everything
Amazon adds layers to the safety stock calculation.
FBA receiving is not instant. Budget 1-2 weeks between shipping inventory to Amazon and it being available for sale. That means your effective lead time is longer than your supplier lead time alone -- you need to account for FBA check-in time in your safety stock math.
Amazon also limits your FBA inventory. You may not be able to maintain your ideal safety stock level if your IPI score is low or your restock limits are tight. Prioritize FBA space for your fastest sellers and use merchant fulfilled as a backup for lower-velocity products.
And watch for long-term storage fees. Excess safety stock at FBA incurs monthly storage fees and long-term surcharges at 181 and 365 days. There is a balance between stockout prevention and storage costs. For most sellers, the stockout cost far exceeds the storage cost -- but not if you are holding six months of a slow mover at FBA.
Multi-Channel Safety Stock
When selling on multiple channels, your approach depends on your inventory strategy.
Shared inventory pool (Shopify and Amazon drawing from the same stock): calculate safety stock from combined demand across both channels. One buffer protects both. More efficient but requires fast sync between channels.
Split inventory (separate stock for each channel): calculate safety stock per channel separately. Total safety stock is higher but each channel is independently protected. Simpler to manage.
FBA + warehouse hybrid: safety stock at FBA sized for Amazon demand, safety stock at warehouse sized for Shopify demand, plus a transfer buffer between them. This is what most sellers running both channels should use.
Mistakes I See Constantly
Using average demand instead of standard deviation. A product selling 8, 9, 10, 11, 12 units per day is very different from one selling 2, 5, 10, 15, 18 -- even though both average 10. The second product needs roughly 3x the safety stock. Averages hide the variability that safety stock exists to protect against.
Ignoring supplier lead time variability. We showed this above: a 5-day standard deviation in lead time tripled the safety stock requirement. If your supplier is sometimes on time and sometimes two weeks late, factor that in or accept periodic stockouts.
Using the same buffer for every SKU. A best-seller that generates $5,000/month in profit needs different treatment than a tail product doing $200/month. Segment your catalog by velocity and importance. Your top 20% of SKUs deserve the statistical formula. The rest can use the basic formula.
Never recalculating. Demand patterns shift. A product that sold steadily at 10/day might now swing between 5 and 20 after a competitor enters the market. Last quarter's safety stock calculation might be wrong today. Review at least quarterly.
Hoarding inventory out of fear. More safety stock is not always better. Every extra unit ties up cash and pays storage costs. Use the data to set levels, not anxiety.
A Practical Framework
For most sellers, this three-tier approach works:
- Top 20 SKUs by revenue: use the statistical formula, target 95% service level, include lead time variability, review monthly
- Middle 60%: use the basic formula with 14 safety days, review quarterly
- Bottom 20%: use the basic formula with 7 safety days, accept higher stockout risk on low-impact products
This allocates your capital and your attention where they matter most.
An AI agent connected to your inventory can monitor safety stock levels across every SKU and flag when any position drops below the buffer -- so the tiered approach above runs on autopilot instead of relying on your quarterly review.
Automating Safety Stock
Running the statistical formula by hand is fine for 10 SKUs. For 100+, it becomes a spreadsheet project you will maintain for two months before it starts decaying. The standard deviation calculation alone requires pulling and processing 30-90 days of daily sales data per SKU.
We built this into ReplenishRadar because we got tired of our own spreadsheet breaking. The system pulls your sales history, calculates demand variability by SKU, tracks actual supplier lead times from your PO history, and recommends safety stock levels that adjust as your data changes. When demand on a product starts swinging wider, the recommended buffer increases. When a supplier tightens up their delivery window, the buffer decreases.
Try ReplenishRadar free for 14 days ->
Safety stock is insurance. Like all insurance, the right amount depends on what you are protecting and what you can afford. Use the math. Then trust it.
Related Reading:
Frequently Asked Questions
See what your inventory is really doing
Doing $5M+ in revenue? Talk to our team
Related Posts
Ask Your Inventory a Question. Get a Real Answer.
Ask ReplenishRadar queries your live inventory data in plain English. Not a chatbot. Real numbers from your real stores, in seconds.
FBA Long-Term Storage Fees: Complete Guide to Avoiding Them in 2026
Amazon charges extra for inventory sitting in FBA too long. Learn the fee structure, how to identify at-risk inventory, and strategies to avoid the charges.
ReplenishRadar Is Live
ReplenishRadar unifies Shopify and Amazon inventory, predicts stockouts, and automates purchase orders. Now live with a 14-day free trial.