Volver al blog
23 de abril de 2026 - Stockful

How to Calculate Safety Stock for Your Shopify Store

Safety stock prevents stockouts when demand spikes or suppliers run late. Here's how to calculate it for your Shopify products.

Every Shopify merchant has experienced it: a product sells faster than expected, or a supplier delivers late, and suddenly you are staring at a stockout. Customers leave, revenue disappears, and if you are selling on marketplaces, your rankings take a hit.

Safety stock is the buffer that prevents this. It is extra inventory you keep on hand specifically to absorb the unexpected, whether that is a demand spike, a delayed shipment, or both at once.

The question is: how much safety stock should you carry? Too little and you still stock out. Too much and you are tying up cash in inventory that sits idle. Here is how to get the number right.

What safety stock actually is

Safety stock is not your regular inventory. Your regular (or cycle) stock is the inventory you expect to sell between reorders. Safety stock sits underneath that as a buffer.

Think of it this way: if your average daily sales are 10 units and your supplier takes 14 days to deliver, you need at least 140 units of cycle stock to cover the lead time. Safety stock is the extra inventory on top of that 140 to protect against things not going according to plan.

Those "things" fall into two categories. Demand variability is when customers buy more than your average. Lead time variability is when your supplier takes longer than expected. Safety stock needs to cover both.

The simple formula (and when to use it)

If you want a quick, practical starting point, use this formula:

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

Here is a worked example. Say you sell a product that averages 20 units per day but has peaked at 35 units on busy days. Your supplier normally delivers in 10 days, but has taken as long as 16 days.

Safety Stock = (35 x 16) - (20 x 10) = 560 - 200 = 360 units

This formula is sometimes called the "max-max" method because it protects against the worst case: maximum demand happening at the same time as maximum lead time. It is conservative by design, which means it tends to overestimate the safety stock you need.

For most Shopify merchants with a manageable number of SKUs and relatively stable demand, this formula is a perfectly reasonable starting point. If you find yourself carrying too much buffer, you can dial it back.

A more precise approach for variable demand

If your sales are highly variable (seasonal products, trending items, products driven by promotions), the max-max formula can produce an unnecessarily large buffer. In that case, a statistical approach gives you more control.

The statistical formula is:

Safety Stock = Z x Standard Deviation of Daily Demand x Square Root of Lead Time

Z is a "service level factor" that represents how confident you want to be that you will not stock out. Common values: 1.28 for 90% confidence, 1.65 for 95%, and 2.33 for 99%.

Standard deviation of daily demand measures how much your daily sales vary from the average. You can calculate this in a spreadsheet: list your daily sales figures for the past 60-90 days and use the STDEV function.

Square root of lead time converts the daily variability into the variability over your full lead time period.

Worked example: your product averages 20 units per day with a standard deviation of 8 units. Lead time is 10 days. You want 95% confidence (Z = 1.65).

Safety Stock = 1.65 x 8 x sqrt(10) = 1.65 x 8 x 3.16 = about 42 units

Compare that to 360 units from the max-max formula. The statistical approach is dramatically more efficient because it does not plan for the absolute worst case, just a very likely range of outcomes.

Where to get the data from Shopify

To calculate safety stock, you need two things: sales history and lead time data.

Sales data. Export your sales by product from Shopify's Analytics section. You want daily unit counts for each product over at least 60 days (longer is better). Calculate both the average daily sales and the standard deviation.

Lead time data. Shopify does not track supplier lead times natively. You will need to record this yourself: note the date you place each purchase order and the date inventory arrives. After a few order cycles, you will have a reliable average and maximum lead time.

The challenge is doing this for every SKU. For stores with 50+ products, manually calculating safety stock in a spreadsheet is time-consuming and goes stale quickly. This is where inventory tools earn their keep by automating the calculation against live data.

Matching safety stock to product importance

Not every product needs the same level of protection. Carrying 99% confidence safety stock on your entire catalogue is expensive and unnecessary.

Use your ABC analysis (if you have done one) to set different service levels:

A items (top revenue drivers): 95-99% service level. You cannot afford to stock out on these. The safety stock investment is justified by the revenue they generate.

B items (mid-tier): 90-95% service level. Important but not critical. A slightly lower buffer saves cash without major risk.

C items (long tail): 85-90% service level, or no safety stock at all. If a C item stocks out for a few days, the financial impact is minimal. Some C items may not be worth reordering at all.

This tiered approach lets you protect your most valuable products while keeping your overall inventory investment reasonable.

Common safety stock mistakes

Setting it once and forgetting it. Demand changes. Lead times change. Suppliers improve or get worse. Recalculate safety stock at least quarterly, or use a tool that updates it dynamically.

Using the same buffer for every product. A blanket "keep 2 weeks of extra stock for everything" approach over-invests in slow movers and under-invests in fast movers.

Ignoring lead time variability. Many merchants focus on demand swings but forget that a supplier delivering in 21 days instead of 14 is just as dangerous. Factor both into your calculation.

Not accounting for stockout periods. If a product was out of stock for a week last month, your average daily sales for that month are artificially low. Adjust the calculation to reflect what demand would have been if you had stock available.

Safety stock is an investment, not a cost

It is easy to see safety stock as dead inventory. But when it prevents a stockout on your best-selling product during a demand spike, it pays for itself many times over. The key is being deliberate about how much you carry and for which products, rather than guessing or applying the same rule everywhere.

Start with the simple formula for your top 10 products. See how the numbers compare to what you are actually carrying. Adjust from there.

Stockful's reorder report factors in your sales velocity, current stock levels, and lead times to help you set smarter safety stock levels for every product. Get started free at [stockful.app](https://stockful.app).