How to Use Demand Forecasting to Reduce Stockouts and Overstock | OpsStack
Fractional COO

How to Use Demand Forecasting to Reduce Stockouts and Overstock

How to Use Demand Forecasting to Reduce Stockouts and Overstock

Running out of stock costs you sales. Sitting on too much inventory ties up cash. Demand forecasting is the operational discipline that lets you walk the line between those two failure modes — and in our experience, it’s one of the highest-leverage improvements an e-commerce operator can make.

This guide covers how demand forecasting works, the methods best suited for small and mid-size e-commerce brands, and how to build a practical forecasting routine without a data science team.

What Is Demand Forecasting?

Demand forecasting is the process of estimating future customer demand for your products over a defined time period. It draws on historical sales data, seasonality patterns, marketing plans, and market trends to project how much inventory you’ll need — and when.

For e-commerce businesses, accurate demand forecasting directly affects:

  • Stockout rate — the percentage of orders you can’t fulfil due to zero inventory
  • Inventory carrying costs — warehousing, insurance, and capital tied up in unsold goods
  • Cash flow — poor forecasting creates either a cash crunch (over-purchasing) or lost revenue (under-purchasing)
  • Supplier relationships — predictable purchase orders let suppliers plan production and prioritise your account

The Main Demand Forecasting Methods

1. Naive Forecasting

Use last period’s actual sales as the forecast for the next period. Simple and surprisingly accurate for stable, non-seasonal products. Breaks down badly when demand is volatile.

2. Moving Average

Average the last N weeks (e.g., 4-week or 12-week rolling average). Smooths out noise. Works well for products with gradual, predictable demand. A 4-week average weights recent periods more than older ones, which suits fast-moving categories.

3. Weighted Moving Average

Assign higher weights to more recent periods. If your last four weeks sold 100, 120, 140, 160 units, a weighted average emphasising recent weeks will forecast more accurately than a simple average.

4. Seasonal Decomposition

Separate your historical sales into three components: trend (long-run direction), seasonality (recurring highs and lows), and residual (random noise). Apply the seasonal index to your baseline forecast. This is essential for any business with a meaningful seasonal pattern — apparel, outdoor goods, gifts, back-to-school products.

5. Regression-Based Forecasting

Model demand as a function of external variables: ad spend, temperature, promotions, competitor pricing. More powerful but requires clean data and some analytical capability. Tools like Google Sheets with LINEST, or Excel’s Data Analysis Toolpak, make this accessible without code.

Building a Practical Forecasting Process

Step 1: Clean Your Historical Data

Before forecasting, audit your data. Remove or adjust anomalies — a promotional spike, a stockout period (which understates true demand), or a one-time bulk order. Export your Shopify, Amazon, or ERP order history into a spreadsheet segmented by SKU.

Step 2: Segment Your SKUs by Demand Pattern

Not every product needs the same forecasting method. Use ABC-XYZ analysis:

  • A items — high-revenue, high-focus SKUs → use weighted moving average or seasonal decomposition
  • B items — moderate revenue → simple moving average
  • C items — low revenue or long-tail → naive forecast or reorder point model
  • X items — stable demand
  • Y items — variable demand
  • Z items — erratic demand → keep safety stock, accept forecast error

Step 3: Calculate Your Seasonal Indices

If you have at least two years of data, calculate how each month or week compares to the annual average. For example, if December typically accounts for 18% of your annual sales and the equal-share benchmark is 8.3%, your December seasonal index is 2.16. Multiply your baseline monthly forecast by that index.

Step 4: Overlay Your Marketing Calendar

Planned promotions, new product launches, and paid advertising campaigns all affect demand. Add these as manual adjustments on top of your statistical forecast. In our experience, brands that integrate their marketing calendar into demand planning cut overstock events by 20–30%.

Step 5: Set Safety Stock Levels

Safety stock is the buffer you hold to absorb forecast error and supplier lead time variability. A simple formula:

Safety stock = Z × σ(demand) × √(lead time in periods)

Where Z is your desired service level (1.65 for 95%, 2.05 for 98%) and σ is the standard deviation of weekly demand. For most small e-commerce operators, a rule-of-thumb 2–3 weeks of average demand as safety stock is a reasonable starting point.

Step 6: Build a Weekly Review Cadence

Demand forecasts go stale. Schedule a weekly 30-minute review: compare last week’s actual sales to the forecast, update your rolling averages, flag any SKUs with a sharp acceleration or deceleration, and adjust purchase orders accordingly. Consistency here matters more than sophistication.

Tools for E-commerce Demand Forecasting

  • Google Sheets / Excel — sufficient for brands with under 100 SKUs; free and fully customisable
  • Inventory Planner — purpose-built for Shopify and WooCommerce; connects directly to your store data and generates forecasts automatically
  • Cin7 — inventory and order management with built-in demand planning for growing brands
  • Brightpearl — retail operations platform with demand forecasting and multi-channel inventory sync
  • Foresight / Streamline — dedicated supply chain planning tools for mid-market operators

Common Demand Forecasting Mistakes

  • Forecasting at the product level, not SKU level — A hoodie in Size Small and Size 2XL can have wildly different demand; aggregate forecasts hide this
  • Ignoring stockout periods — When you ran out of stock, your recorded sales were zero, not actual demand; adjust your historical data for these periods
  • Over-relying on a single forecast — Blend quantitative forecasts with qualitative input from your merchandising or marketing team
  • Setting and forgetting — Demand patterns shift; a forecast that was accurate in Q1 may be badly wrong in Q3 without updates
  • Using total revenue instead of units — Forecast in units, then multiply by price for financial planning; price changes will distort revenue-based forecasts

Measuring Forecast Accuracy

Track these metrics monthly:

  • Mean Absolute Percentage Error (MAPE) — average of |(actual − forecast) / actual| × 100. Below 20% is strong for most e-commerce categories.
  • Bias — is your forecast systematically over or under? Persistent over-forecasting leads to overstock; persistent under-forecasting leads to stockouts.
  • Fill rate — percentage of customer orders fulfilled from available stock on the first attempt. Target 95%+ for high-velocity SKUs.

Frequently Asked Questions

How much historical data do I need to start demand forecasting?

A minimum of 12 months is recommended to capture one full seasonal cycle. Two or more years of data allows you to calculate reliable seasonal indices and identify trend direction.

What is a good MAPE for e-commerce demand forecasting?

A MAPE below 20% is generally considered strong for e-commerce. High-velocity, stable SKUs should target under 10%. Erratic or new-product SKUs may run 30–40% and still be usable with appropriate safety stock buffers.

Should I forecast by SKU or by product?

Always forecast at the SKU level (size, colour, variant). Product-level forecasts mask variant imbalances that lead to stockouts on popular variants and overstock on slow ones.

Can Shopify generate demand forecasts automatically?

Shopify’s native analytics are limited for forecasting. Apps like Inventory Planner, Foresight, or Cin7 connect to Shopify and provide automated SKU-level demand forecasts with reorder recommendations.


Demand forecasting doesn’t require a data science team or expensive software. A disciplined spreadsheet process reviewed weekly will outperform most ad-hoc buying decisions. If you’re ready to build a more systematic inventory and demand planning operation, OpsStack can help you design the right process for your business size and product mix.

Scroll to Top