Guide
Safety stock calculator for online stores: two methods that work
A safety stock calculator for online stores, with the days-of-cover method, the standard deviation formula, and a worked example for each.
Safety stock is the stock you keep so that a late delivery or a busy week does not leave you out of a product. Too little and you sell out while the next order is still on a ship. Too much and your cash sits on a shelf. For an online store with suppliers who take weeks, it is the number that decides whether a slow supplier is an annoyance or a stockout.
This guide covers two ways to calculate it: a simple one based on days of cover, which suits most small stores, and the textbook formula based on how much your sales vary. Both come with a worked example and a spreadsheet formula.

What safety stock covers
Two things go wrong between placing an order and receiving it:
- You sell faster than usual. A product gets mentioned somewhere, a holiday arrives early, or a competitor sells out.
- The supplier is late. Production slips, a container waits at port, or the order sits a few days before anyone confirms it.
Safety stock is sized to absorb both. It sits on top of the stock you expect to sell during the lead time, which is why the reorder point is:
Reorder point = daily sales × lead time + safety stock
If you want the rest of that calculation, our reorder point calculator guide walks through it with a spreadsheet.
Method 1: days of cover
Decide how many extra days of sales you want on hand, then multiply by daily sales.
Safety stock = daily sales × safety days
How many days? Start from the supplier, not a rule of thumb:
- How many days late has this supplier been on recent orders? If the worst recent delay was five days, a week of safety stock covers it with some room.
- How much does your weekly pace swing? If your best week in the last two months was 30% above average, that extra selling across the lead time needs to be covered too.
- How bad is running out? A best seller that drives repeat orders deserves more cover than a slow add-on.
Worked example
You sell sage tissue wrap, one sheet per order, about 44 orders a day. Your packaging supplier has been up to five days late.
| Input | Value |
|---|---|
| Daily use | 44 sheets |
| Safety days | 7 |
| Safety stock | 44 × 7 = 308 sheets |
The appeal of this method is that it is easy to explain, easy to adjust supplier by supplier, and stays correct as your sales grow, because it scales with daily sales automatically.
Spreadsheet formula
With daily sales in D2 and safety days in E2:
=ROUNDUP(D2*E2,0)
Method 2: the standard deviation formula
If your sales vary a lot from day to day and you have enough history, you can size safety stock to the variation itself. The common textbook version, which assumes the lead time is steady and demand varies, is:
Safety stock = Z × σ × √(lead time in days)
- σ (sigma) is the standard deviation of daily sales: how far a typical day lands from the average.
- Lead time is in days. The square root is there because good and bad days partly cancel out over a long lead time.
- Z is the service level factor: how often you want to get through a lead time without running out. Common values:
| Target: lead times without a stockout | Z |
|---|---|
| 90% | 1.28 |
| 95% | 1.65 |
| 98% | 2.05 |
| 99% | 2.33 |
Worked example
You sell about 50 mailers a day, but the count moves around: some days 35, some days 70. Over the last 56 days the standard deviation of daily sales is 12. The supplier's lead time is 21 days, and you want to get through 95% of lead times without running out.
- √21 ≈ 4.58
- Safety stock = 1.65 × 12 × 4.58 ≈ 91 mailers
Notice how much smaller that is than 7 days of cover (350 mailers). The formula only covers day-to-day noise in demand. It assumes the supplier is never late and that the average itself is not shifting. In practice, late deliveries and a pace that drifts upward cause more stockouts than random daily noise, which is why many small stores get better results from Method 1.
Spreadsheet formulas
With 56 days of daily unit sales in B2:B57 and lead time in days in E2:
=1.65*STDEV.S(B2:B57)*SQRT(E2)
Change 1.65 to the Z value for the service level you want.
Which method to use
| Situation | Use |
|---|---|
| A few hundred products, a handful of suppliers, one person ordering | Days of cover |
| A supplier who is often late | Days of cover, with the days set from their recent delays |
| Steady suppliers, very spiky daily sales, years of history | Standard deviation formula |
| Packaging and other per-order supplies | Days of cover on your daily order count |
You can also combine them: use the formula for demand noise, then add a few days of cover for the supplier's typical delay.
Mistakes that make safety stock useless
- Setting it once and forgetting it. A fixed number of units goes stale as your sales grow. A number of days does not.
- Spending it. If you treat safety stock as normal stock and only reorder when it is gone, you have no safety stock. Your reorder trigger has to include it.
- Ignoring stock already on order. If an order is confirmed and on its way, count it before deciding you are short. Otherwise you double order.
- Computing pace across a stockout. Days with zero stock show zero sales. Including them makes the product look slower than it is, and shrinks both the safety stock and the order.
- One number for every supplier. A local supplier who delivers in four days and an overseas factory at six weeks need different cover.
A weekly routine
- Update daily sales from the last four to eight weeks of orders.
- Check each supplier's recent delivery dates against what they promised. Raise safety days for anyone slipping.
- For each product, compare stock plus stock on order against what you will sell over the lead time, the time until your next order, and the safety days.
- Order what falls short, rounded up to the supplier's case pack.
Where Reorder Day fits
Reorder Day uses the days-of-cover method. Each supplier has a lead time, an order cycle and safety days (7 by default) that you set. Every week it compares each product's days of stock left, counting the purchase orders you have marked sent or Shopify's Incoming, against those numbers, and emails you a draft purchase order per supplier for what needs ordering now. Products that were out of stock recently are flagged, because their pace is understated.
Know what to reorder before you run out
Reorder Day compares each product's sales pace with your supplier's lead time and the stock already on order, and emails a draft purchase order per supplier every week.
$49/ month
Get startedCancel any time.