Inventory forecasting for ecommerce means turning a prediction of customer demand into a stock plan: how many units of each SKU to hold, and when to reorder them. You do it with clean sales history by SKU, measured supplier lead times, a safety stock buffer and a monthly check of forecast against actuals. Get it right and you stop choosing between stockouts that kill your ad performance and overstock that eats your cash.
This guide walks through the difference between demand and inventory forecasting, the data you need, the methods worth using, the reorder math with a worked example, and how to keep improving. It is written for DTC brands on Shopify that are growing and feeling the strain.
TL;DR
- Demand forecasting predicts what customers will buy. Inventory forecasting converts that into units to hold and dates to order, using lead times and safety stock.
- Start with unit sales by SKU, with stockout periods removed, plus promo history, real supplier lead times, on-hand stock and open purchase orders.
- Use simple methods (moving average, exponential smoothing) for stable SKUs, seasonal methods for recurring peaks, and judgment for new products.
- Reorder point = demand during lead time + safety stock. Review accuracy and bias monthly and feed the result back in.
- A forecast is only useful if your store, ERP and warehouse data agree, so fix the plumbing early.
Table of Contents
- Demand forecasting vs. inventory forecasting
- Why accurate forecasting matters when you scale
- The data you need before you forecast
- Choosing a forecasting method
- From forecast to reorder: the math
- Seasonality, promotions and uncertain lead times
- Measuring accuracy and improving over time
- Connect the forecast to the systems that act on it
- Where we can help
- FAQ
- Sources
Demand forecasting vs. inventory forecasting
People use the two terms interchangeably, and in a small store that is mostly harmless. The distinction still helps you decide what to build first.
Demand forecasting predicts how much customers will want to buy, based on sales history and market trends. Inventory forecasting takes that estimate and adds lead time, safety stock, on-hand inventory and inventory already on order to produce a stock position. Put simply, demand forecasting is a statement about your customers. Inventory forecasting is a statement about your business, because it includes your suppliers, your warehouse and your cash.
Shopify draws one more line: replenishment uses the forecast plus current inventory to decide when and how much to reorder and where the stock should go. So the chain looks like this:
- Demand forecast: units customers will likely buy per period.
- Inventory forecast: units you need on hand and on order to serve that demand.
- Replenishment: the actual purchase orders and transfers.
If you search for demand forecasting, you are looking at step one. Most DTC operators who feel pain are actually stuck at steps two and three, where a decent forecast fails to become the right purchase order.
Why accurate forecasting matters when you scale
At small volume you can reorder by feel. At scale, the same instincts get expensive.
Accurate forecasting protects cash flow: it prevents stockouts that damage brand trust and ad performance, and it avoids excess stock that raises storage fees and slows growth. The same source notes that stockouts also cost you search rank, and overstock ties up capital in slow-moving products.
Scale also magnifies mistakes. Small percentage miscalculations become major capital lockups when you are ordering at volume. A 10% overbuy on a $20,000 purchase order is an inconvenience. On a $300,000 order, it is a cash problem that limits what you can spend on ads and new products.
The operating rhythm changes too. As brands grow, forecasting shifts from a static finance exercise to a daily operational metric that has to line up with marketing calendars, warehouse capacity and carrier performance. If your marketing team plans a big email push and operations hears about it a week before, no model will save you.
Research from North Carolina State University’s Supply Chain Resource Cooperative points the same way: most supply chain glitches stem from a lack of alignment between demand and supply planning. Alignment is a process problem as much as a math problem.
The data you need before you forecast
A forecast is only as good as its inputs. For most Shopify brands, the minimum set is:
- Unit sales by SKU and period. Weekly is a good grain for most brands. Track units, not revenue, because price changes distort revenue.
- Stockout periods. If a SKU was out of stock for nine days, those nine days of zero sales are not zero demand.
- Promotion and campaign history. Dates, discount depth, channel and offer type.
- Measured supplier lead times. Use what actually happened on the last several orders, not what the supplier quoted.
- Accurate on-hand stock and open purchase orders.
This list follows guidance on clean historical unit sales by SKU, stockout periods, promotions, lead times, on-hand stock and open orders. Shopify’s own guidance on AI demand forecasting adds external signals such as weather and search data, alongside internal sources like orders, promotional calendars and pricing history.
Clean the history first
The most common error we see in DTC forecasting is feeding raw sales history into a model. Removing stockout periods matters because a model that learns from artificially low sales will keep underbuying, and underbuying creates the next stockout. Forecasting guidance for SKU-level work recommends stripping stockout periods from historical demand for exactly this reason.
Also flag one-off spikes: a viral post, a wholesale order, a restock after a long outage. Mark them so they do not inflate the baseline.
Make sure your systems agree
If Shopify says you have 120 units, your warehouse says 104 and your spreadsheet says 131, the forecast starts from fiction. Inventory drift between systems is usually the real reason reorder math fails. We cover the fix in three setup steps for Shopify inventory management, and the limits of native syncing in our breakdown of Shopify inventory sync.
Choosing a forecasting method
You do not need machine learning on day one. Match the method to the product.
| Situation | Typical method | Why it fits |
|---|---|---|
| Mature SKU, steady volume | Moving average or exponential smoothing | Simple, stable, easy to explain |
| Recurring seasonal peaks | Seasonal decomposition | Separates trend from the yearly pattern |
| Many SKUs, many signals, promotions | Machine-learning models | Handle complex inputs and flag anomalies |
| New product, no history | Judgmental: analogs, pre-orders, retailer commitments | No data to extrapolate |
The method guidance comes from a review of moving averages, exponential smoothing, seasonal decomposition and ML-based approaches, where the choice depends on product maturity, volume and variability. The same source notes that new product forecasting relies on analog forecasting, pre-orders and retailer commitments because history does not exist.
Pick a few analogs for launches
For a new SKU, find two or three past products that resemble it in price, category and audience. Take their first 8 to 12 weeks of sales, scale for your current traffic and email list size, and use that as the range. Then order conservatively for the first batch and reorder fast if it sells.
Keep the forecast separate from the buffer
It is tempting to bump the forecast up because stockouts feel worse than overstock. Forecasting textbooks treat that differently: raising a forecast on purpose to buffer against lost sales is a planning decision, not a forecasting adjustment. Keep the unbiased forecast, and put your risk appetite into safety stock and order quantities where you can see and measure it.
Machine-learning tools can also flag anomalies rather than blending them into averages, which lets your planner spend time on exceptions and launches instead of every SKU.
From forecast to reorder: the math
Once you have a weekly demand forecast per SKU, two numbers drive the purchase order.
Reorder point = (average daily demand × lead time in days) + safety stock
Safety stock = Z × standard deviation of demand × square root of lead time (all in the same time unit)
Safety stock exists to protect against demand and lead-time variability, and the Z-factor sets your service level. Academic safety stock tutorials give Z = 1.65 for a 95% cycle service level. A higher Z means a bigger buffer and more cash tied up.

A worked example
These numbers are illustrative, not benchmarks. Say a skincare SKU sells 40 units a day on average, with a daily standard deviation of 12 units. Your supplier’s lead time, measured over the last five orders, is 25 days.
- Demand during lead time: 40 × 25 = 1,000 units.
- Safety stock at 95%: 1.65 × 12 × √25 = 1.65 × 12 × 5 = 99 units.
- Reorder point: 1,000 + 99 = 1,099 units.
When your available stock plus open orders drops to about 1,099 units, you place the order. If the supplier’s lead time swings between 20 and 35 days, the safety stock has to rise, which is why measuring real lead times pays off more than perfecting the demand model.
Count what is already on order
The stock position is on-hand plus on-order, minus committed orders. Trigger the reorder on that position, not on on-hand alone, or you will double-order every time a shipment is in transit.
Seasonality, promotions and uncertain lead times
Seasonality. Use at least two years of weekly data when you have it, so the model can separate a real trend from a calendar pattern. With less history, apply a seasonal index from a comparable product and revise it as actuals arrive.
Promotions. Treat promo lift as its own input. Deloitte’s retail planning guidance says to determine promotional lift by comparing baseline demand with actual sales during the promotion, using details such as timing, discount, offer, type and channel. In practice, tag every campaign in your data so that next quarter’s forecast can say what a 20% email-only discount did to a specific SKU, not just to the store.
Lead times. Track promised versus actual lead time for each supplier. Use the actual average for the reorder point and its variability for safety stock. Where a supplier is unreliable, a second source or a smaller, more frequent order often costs less than a large buffer.
Launches. Plan a first order, a checkpoint at two to three weeks, and a pre-agreed trigger for a rush reorder. Sell-through in those first weeks is your best forecast.
Measuring accuracy and improving over time
A forecast you never score will never get better. Compare forecasts with actuals, and watch bias, meaning whether you consistently over- or under-predict. Guidance on SKU-level forecasting recommends closing the loop monthly and removing stockout periods from the history you score against.
A simple monthly review:
- Export forecast and actual units per SKU for the past month.
- Calculate the absolute percentage error per SKU, then weight by revenue so your top sellers dominate the view.
- Check bias. If most SKUs run over or under, your model or your planning inputs have a systematic problem.
- Review the five biggest misses. Was it a stockout, an untagged promotion, a lead time change or a viral spike?
- Update the inputs and write down what changed.
Forecast quality also depends on who contributes. Deloitte’s view is that quality improves when marketing, sales, suppliers, distributors and planners collaborate around a shared view of demand rather than relying only on historical sales. A thirty-minute weekly sync between marketing and operations is often the cheapest accuracy upgrade available.
Some teams find that reaction speed matters more than prediction accuracy as they scale. A forecast that is 85% accurate but triggers a reorder the same day it should beats a 95% model that sits in a spreadsheet for two weeks.
Connect the forecast to the systems that act on it
A forecast creates value only when it reaches your purchasing, warehouse and storefront. That usually means your Shopify store, ERP and warehouse management system share one source of truth for stock, orders and purchase orders. If you are planning that kind of work, a primer on CRM and ERP integration shows how a staged proof of concept can de-risk the project before you commit to a full rollout.
On our side, we have written step-by-step guides on a 7-step Shopify ERP integration runbook and on how to map the four objects of Shopify WMS integration to warehouse workflows. Both are good reading before you brief a developer or vendor.
If you are also building the team that owns this data, see our guide to setting up an ecommerce data team.
Our perspective
Most DTC brands we talk to believe they have a forecasting problem. Usually they have a data trust problem. The model is fine, but the stock count in Shopify does not match the warehouse, lead times are guesses and nobody told operations about next month’s campaign.
So we start with the plumbing. Clean inventory records, an ERP and warehouse flow that updates in near real time, and a marketing calendar operations can see. Only then does it make sense to tune a model. A simple moving average on trustworthy data beats a sophisticated model on drifting data every time.
We also like fixed scopes. You should know what an integration or an inventory optimization costs and what you get before the work starts, so that scaling does not become an open-ended consulting bill.
Jason
Where we can help
If your forecast is sound on paper but purchase orders still miss, the gap is usually in the systems. We offer fixed-fee engagements for exactly this: Shopify ERP Integration & Optimization at $999, Shopify WMS & Inventory Optimization at $1,199, and Ecommerce Operations Efficiency at $999, each a one-time fee.
You can see all of our technology engagements on the ecommerce technology page, or browse our Shopify ERP, inventory and operations services.
FAQ
What is the difference between inventory forecasting and demand forecasting?
Demand forecasting estimates how many units customers will want in a period. Inventory forecasting takes that estimate and adds lead time, safety stock, on-hand units and open orders to tell you how much to hold and when to order. Demand is the outward-looking input, and inventory is the operational plan built on it.
How much historical data do I need?
More is better, but you can start with what you have. For seasonal products, two years of weekly data lets a model separate trend from seasonality. For newer SKUs, use analogs from similar past products, pre-orders or retailer commitments, and revise as real sales come in.
What is a good safety stock level?
It depends on how much demand and lead time vary, and on the service level you want. A common starting point is a 95% cycle service level, which uses a Z-factor of 1.65. Raise it for hero products where a stockout is costly, and lower it for slow, low-margin items.
Do I need AI software to forecast inventory?
Not to start. Moving averages and exponential smoothing handle stable products well. Machine-learning tools become useful when you have many SKUs, frequent promotions and several demand signals, mainly because they flag anomalies and save planner time.
How often should I review my forecast?
Check inventory position daily or weekly, and score forecast accuracy and bias monthly. Brands that scale well treat inventory as a daily operating metric tied to cash flow, not a quarterly task.
Sources
- NetSuite: Inventory Forecasting, Types, Best Practices, and Benefits
- Conative: Inventory Forecasting vs Demand Forecasting
- Shopify: Inventory Forecasting, Methods, Formulas & Tools
- Cin7: E-commerce Inventory Forecasting
- Base: How Inventory Cash Flow Impacts D2C Growth at Scale
- Product Fulfillment Solutions: Supply Chain Forecasting for Ecommerce Brands
- NC State Supply Chain Resource Cooperative: Aligning Demand and Supply Management
- Conative: What Data Do You Need to Forecast Demand?
- Shopify: AI Demand Forecasting for Ecommerce
- Forthcast: SKU Demand Forecasting Guide
- Stack Influence: Inventory Demand Forecasting for Ecommerce Sellers
- Forecasting: Principles and Practice, Key principles
- NC State: Safety Stock Analysis tutorial
- Deloitte: Retail Planning, Demand Forecasting and Supply Chain
- Ampersand: CRM and ERP integration

