Jolene.pro

How to Calculate Daily Inventory When Stockouts Lose Sales in Excel

If unfilled demand expires at the end of the day, a weekly stock total can subtract that demand from a delivery that arrives days later. Calculate fulfilled demand and stock one day at a time. In the synthetic example below, a weekly net calculation gives zero even though 20 units are left.

This workflow applies when a stockout means a lost sale. If customers can backorder, track outstanding orders separately and use your own rules for allocating the next delivery. Oracle’s inventory spreadsheet model documents the lost-sales calculation when inventory falls short.

Prepare one dated row per SKU and warehouse

Start with a verified opening quantity, dated receipts and demand. The example uses one item and one warehouse, with receipts available before that day’s demand. If a receipt arrives after demand, use finer timestamps and the actual event order. Sort by date, use one row per day and reconcile missing dates. Check that opening stock, receipts and demand are nonnegative whole numbers. Enter 0 only when the source confirms zero, and investigate a blank before calculating.

Copy the five synthetic source rows into A1:C6 in Excel. If the CSV lands in one column, import it as a comma-delimited file. Put the opening stock of 40 in K2.

Date,Receipts,Demand
2026-11-16,0,30
2026-11-17,0,40
2026-11-18,100,20
2026-11-19,0,50
2026-11-20,0,10

Calculate fulfilled demand, shortfalls and closing stock

Label D through G Opening, Fulfilled, Lost and Closing. In the first row, Opening comes from K2. In each later row, Opening is the previous day’s Closing. Excel’s MIN function limits fulfillment to the lower of demand and available stock.

D2  =$K$2
D3  =G2
E2  =MIN(D2+B2,C2)
F2  =C2-E2
G2  =D2+B2-E2

Fill D3 down through D6 and fill E2:G2 down through row 6.

DateOpeningReceiptsDemandFulfilledLostClosing
Nov 164003030010
Nov 171004010300
Nov 1801002020080
Nov 198005050030
Nov 203001010020

On November 17, 40 units are requested and only 10 are available. The other 30 expire. The November 18 receipt then covers 20 units of that day’s demand and leaves 80. Across the five days, 120 units are fulfilled, 30 are lost and closing stock is 20.

Check both sides of the balance

The stock and demand checks below should both return zero. The last formula shows the misleading whole-period calculation, which also returns zero here. It subtracts all 150 units of demand even though only 120 could be fulfilled.

Stock check   =K2+SUM(B2:B6)-SUM(E2:E6)-G6
Demand check  =SUM(C2:C6)-SUM(E2:E6)-SUM(F2:F6)
Period-only   =MAX(0,K2+SUM(B2:B6)-SUM(C2:C6))

Use reported customer demand or a forecast if that is what your workflow measures. A sales export usually shows completed sales. If a customer walked away without placing an order, their demand may be absent from that export. Label any forecast-based shortfall as projected lost sales.

Trace a stock discrepancy to the daily records

If your dashboard shows zero, upload the Excel workbook with dated receipts, demand, opening stock and the shortfall rule to Jolene.pro. Ask it to find the first day when stock fell short, identify the later receipt, and point to the date, receipt, demand and opening-stock cells that explain the difference. Verify those cells against the export. Save the prompt and repeat it on the next planning file for the same SKU and warehouse.

For a separate planning check before the next receipt, see how to test whether stock will last until delivery.

Leave a comment