Inventory Forecasting for Ecommerce: Formulas, Example and How to Prevent Stockouts

Inventory forecasting means estimating how many units of each product you will sell over the coming weeks, so you can reorder before you run out and avoid paying to store stock that doesn’t sell. For an ecommerce seller, a working forecast needs three numbers per SKU: average daily sales, supplier lead time and a safety stock buffer. From those you get a reorder point, the stock level that tells you to place the next order.

This guide shows how to build a simple forecast step by step, with the formulas, a worked example and the extra rules that apply when you sell through Amazon FBA, Walmart WFS and several channels at once.

Why forecasting matters more on marketplaces

  • Stockouts cost rankings, not just sales. When a listing goes out of stock, it stops selling and can lose visibility it took months to build.
  • Too much stock costs fees. Amazon FBA and Walmart WFS charge monthly storage, and Amazon adds an aged inventory surcharge for stock that sits too long.
  • Too little stock can cost fees too. Amazon charges a low-inventory-level fee on some standard-size products when supply runs low. From February 1, 2027, Amazon says it applies only when inventory falls below 28 days of supply (see our Amazon FBA fees 2027 guide).
  • Lead times are long. Inbound shipments to fulfillment centers take time to be received, so you need to reorder earlier than you would for your own warehouse.

How to forecast inventory in 5 steps

1. Get clean sales history per SKU

Export at least 90 days of unit sales per SKU, combined across every channel the same stock sells on. Remove days when the item was out of stock, otherwise those zero-sales days pull your average down and you will under-order.

2. Calculate average daily sales

Average daily sales = units sold ÷ days in stock. Use the last 30 days for fast-moving items and 60 to 90 days for slower ones. For seasonal products, compare with the same period last year.

3. Measure your real lead time

Lead time is the number of days from placing a purchase order until the stock is available to sell. Include supplier production, shipping and, for FBA or WFS, the time to be received and made available.

4. Add safety stock

Safety stock is a buffer for demand spikes and delays. A simple, widely used formula:

Safety stock = (maximum daily sales × maximum lead time) − (average daily sales × average lead time)

5. Set the reorder point and order quantity

Reorder point = (average daily sales × lead time) + safety stock

When available stock falls to this number, place the next order. Order enough to cover the days until the following reorder, adjusted for minimum order quantities and storage limits.

Worked example

InputValue
Average daily sales (all channels)20 units
Highest daily sales in the period30 units
Average lead time25 days
Longest lead time35 days
Safety stock = (30 × 35) − (20 × 25)1,050 − 500 = 550 units
Reorder point = (20 × 25) + 5501,050 units

When this SKU drops to 1,050 units across all locations, reorder. The 550-unit buffer covers a busy month or a late shipment.

Adjust the forecast for real life

  • Seasonality: multiply the average by last year’s change for the same weeks, for example Q4 or back-to-school.
  • Promotions and deals: add the expected extra units for planned deals, coupons or ads.
  • Trends: if the last 30 days are clearly above the 90-day average, weight the recent period more.
  • New products: start from a similar SKU’s sales and review weekly.
  • Multiple locations: if stock is split between FBA, WFS and your own warehouse, forecast each location’s sales separately so one doesn’t run out while another is overstocked.

7 ways to prevent stockouts

  1. Track inventory in real time across every channel that sells the same stock.
  2. Set a reorder point for every best seller and alert yourself when stock reaches it.
  3. Use a forecast, not gut feel, and update it monthly.
  4. Have a backup supplier for key products.
  5. Count stock regularly and reconcile with marketplace inventory reports.
  6. Plan for seasonal peaks weeks ahead, including fulfillment center receiving times.
  7. Automate reorders where your tools allow it.

Common forecasting mistakes

  1. Averaging out-of-stock days into your sales rate, which hides real demand.
  2. Forecasting one channel at a time when Amazon, Walmart and Shopify sell from the same stock.
  3. Ignoring inbound receiving time at fulfillment centers.
  4. Setting safety stock once and never updating it as sales and lead times change.
  5. Keeping slow movers too long and paying storage on stock that doesn’t sell.

Forecast from one inventory view across channels

A forecast is only as good as the stock and sales numbers behind it. Crazy Vendor’s inventory management keeps stock in sync across Amazon, Walmart, eBay, Etsy, Shopify, WooCommerce, Magento and Wix, including FBA, WFS and your own warehouse, so you see total sales and available units per SKU in one place. Profit Analytics shows which SKUs earn enough to restock. Plans start at $29/month with a 21-day free trial. See pricing.

Related: seasonal sales forecasting, avoiding overstock and stockouts and how to calculate inventory turnover.

Frequently asked questions

What is inventory forecasting?

It is estimating future unit sales per product so you can reorder in time and avoid both stockouts and excess stock.

What is the formula for a reorder point?

Reorder point = (average daily sales × lead time in days) + safety stock.

How do you calculate safety stock?

A simple method is (maximum daily sales × maximum lead time) − (average daily sales × average lead time).

How far back should sales history go?

Use 30 days for fast movers and 60 to 90 days for slower items, excluding days when the product was out of stock. For seasonal products, also look at the same period last year.

How do I prevent stockouts on Amazon and Walmart?

Forecast with combined sales from every channel, include inbound receiving time in your lead time, keep a safety stock buffer, and reorder as soon as stock hits your reorder point.

Updated November 9, 2026.

You can also follow us on social media for more e-commerce insights and updates