What this example is
Everything here is synthetic. One invented product sold the daily numbers shown over 28 days and was out of stock on days 11 to 18. The lead time of 14 days and the 3 days of safety cover are invented.
It shows one effect and is not a forecast method or a promise about any real product.
The script and its output
The script was run on Node.js on 12 October 2026 and printed exactly what is shown. The first rate divides by all 28 days, so sold-out days count as zero demand. The second divides by the 20 days the product could be bought.
If the matrix is wider than the box, scroll horizontally to read every column. Keyboard: focus the matrix and use Left/Right.
// Synthetic example. One invented product over 28 days; the product was out of stock on days 11 to 18.
const sold = [5, 7, 6, 4, 8, 6, 5, 7, 6, 5, // days 1-10, in stock
0, 0, 0, 0, 0, 0, 0, 0, // days 11-18, out of stock
7, 6, 6, 5, 7, 6, 6, 5, 6, 7]; // days 19-28, in stock
const outOfStock = sold.map((_, i) => i >= 10 && i <= 17);
const LEAD_DAYS = 14, SAFETY_DAYS = 3;
const total = sold.reduce((a, b) => a + b, 0);
const inStockDays = outOfStock.filter(x => !x).length;
const naive = total / sold.length; // counts a sold-out day as a day nobody wanted it
const adjusted = total / inStockDays; // counts only the days it could be bought
const point = rate => Math.ceil(rate * (LEAD_DAYS + SAFETY_DAYS));
console.log(`units sold ${total} over ${sold.length} days, ${inStockDays} of them in stock`);
console.log(`naive daily rate ${naive.toFixed(2)} reorder point ${point(naive)}`);
console.log(`adjusted daily rate ${adjusted.toFixed(2)} reorder point ${point(adjusted)}`);
console.log(`difference ${point(adjusted) - point(naive)} units`);
// Printed on 12 October 2026:
// units sold 120 over 28 days, 20 of them in stock
// naive daily rate 4.29 reorder point 73
// adjusted daily rate 6.00 reorder point 102
// difference 29 unitsWhat was and was not exercised
Exercised: the two rates and the two reorder points, by running the script. Not exercised: seasonality, promotions, variable lead times, safety stock built from real variation, or a comparison with a real baseline. A real sheet is tested against a flat average on held-back weeks.
Sources and limits
- Shopify Community: how are you handling inventory reorders Checked 2026-10-12.
- A poster on 21 Sep 2026 says sold-out days count as days nobody wanted a product, so best sellers look slow and get under-ordered again; the poster discloses working on an inventory tool.
- Shopify Help Center: Stocky Checked 2026-10-12.
- Shopify says the Stocky app will no longer be available after 31 August 2026.