How Recommendations Are Calculated
This page explains every formula Smart Reorder uses, with worked examples, so you can check any number on the page by hand. The settings mentioned (lead time, order cycle, safety stock...) are described in Set up Smart Reorder.
The terms
| Term | Meaning |
|---|---|
| Sales speed (Avg/day) | Average units sold per day while the product was in stock |
| Lead time | Days from ordering to receiving |
| Order cycle | Days between two orders to the same supplier |
| Safety stock | Extra units to cover surprises = sales speed × safety stock days |
| Reorder point | The stock level at which you should order |
| Target stock | The stock level an order should bring you up to |
| Available | On hand + incoming |
1. Sales speed
For each period of 30, 60 and 90 days, the app divides the units sold by the number of days the product was in stock:
speed (period) = units sold in the period ÷ (days in the period − days out of stock)
Days out of stock are left out so that a product that ran out doesn't look like a slow seller. To keep the result stable, the divider is never less than 7 days.
With the default Weighted method, the three periods are combined, giving recent sales the most weight:
sales speed = 50% × speed (30 days) + 30% × speed (60 days) + 20% × speed (90 days)
If you pick Last 30 days, Last 60 days or Last 90 days in Settings, only that period is used.
Example: a steady seller. Sold 60 / 120 / 180 units in the last 30 / 60 / 90 days, never out of stock.
- speed (30) = 60 ÷ 30 = 2.0, speed (60) = 120 ÷ 60 = 2.0, speed (90) = 180 ÷ 90 = 2.0
- sales speed = 0.5 × 2.0 + 0.3 × 2.0 + 0.2 × 2.0 = 2.0 per day
Example: a product picking up. Sold 60 / 90 / 105 units.
- speed (30) = 2.0, speed (60) = 1.5, speed (90) = 1.17
- sales speed = 1.0 + 0.45 + 0.23 = 1.68 per day. The last month counts the most, so the result is closer to 2.0 than a plain 90-day average (1.17) would be.
Example: a product that ran out. Sold 30 units in the last 30 days, but was out of stock for 10 of them.
- speed (30) = 30 ÷ (30 − 10) = 1.5 per day, not 1.0. It sold 1.5 a day whenever it was available.
A day counts as "out of stock" when the nightly stock snapshot was 0 or less and nothing sold that day. The app starts taking snapshots when Smart Reorder is turned on for your shop, so stock-outs before that aren't known.
2. Safety stock, reorder point, target stock
safety stock = sales speed × safety stock days
reorder point = sales speed × lead time + safety stock (at least your min stock)
target stock = sales speed × (lead time + order cycle) + safety stock
then capped at your max stock, and never below the reorder point
The reorder point covers sales while you wait for the delivery, plus a cushion. The target stock also covers sales until the next order arrives, one order cycle later.
Example (sales speed 2.0/day, lead time 14 days, order cycle 30 days, safety stock 7 days):
- safety stock = 2 × 7 = 14
- reorder point = 2 × 14 + 14 = 42
- target stock = 2 × (14 + 30) + 14 = 102
With a max stock of 80, the target stock becomes 80. With a min stock of 120, both the reorder point and the target stock become 120.
No recent sales but a min stock is set: the target stock is your max stock (or your min stock if you have no max), so these products are still topped up.
3. Status
The app checks these rules in order and uses the first one that matches:
| # | Rule | Status |
|---|---|---|
| 1 | No sales speed, and available is below min stock | Recommended |
| 1b | No sales speed otherwise | No sales |
| 2 | Available ÷ sales speed ≤ lead time (stock runs out before an order placed today arrives) | Need to order |
| 3 | Available ≤ reorder point | Recommended |
| 4 | On hand ÷ sales speed > overstock threshold | Overstock |
| 5 | Anything else | Healthy |
Example (sales speed 2.0, lead time 14, reorder point 42):
- On hand 20, incoming 0: 20 ÷ 2 = 10 days ≤ 14, so Need to order.
- On hand 30, incoming 0: 15 days > 14, but 30 ≤ 42, so Recommended.
- On hand 30, incoming 20: 50 > 42, so Healthy.
- On hand 300: 150 days > 120, so Overstock.
4. Recommended quantity
Only for Need to order and Recommended:
quantity = target stock − on hand − incoming
rounded up to a whole number of packs (pack size)
then raised to the MOQ if lower
then rounded up to a whole unit
Example (target stock 102, on hand 30, incoming 0):
- 102 − 30 − 0 = 72
- pack size 10: 72 → 80 (8 packs)
- MOQ 100: 80 → 100
5. Days of stock and stock-out date
days of stock = on hand ÷ sales speed
stock-out date = today + days of stock (rounded down)
Incoming stock isn't included here, because you can't sell it until it arrives. With 30 on hand at 2.0 a day: 15 days.
6. Revenue at risk
The sales you could lose if you order today, because the goods arrive after you run out:
revenue at risk = sales speed × days without stock before the delivery × selling price
days without stock before the delivery = lead time − (available ÷ sales speed), never below 0
Example (sales speed 2.0, lead time 14, on hand 20, incoming 0, price 25.00):
- stock lasts 20 ÷ 2 = 10 days, the delivery takes 14 days: 4 days without stock
- revenue at risk = 2 × 4 × 25.00 = 200.00
A product with stock lasting longer than the lead time has no revenue at risk. The What happens if I don't order? section of the Why? window then tells you how many days you have left to order: (available ÷ sales speed) − lead time.
7. Estimated cost and recommended purchase
estimated cost = recommended quantity × unit cost
recommended purchase = sum of the estimated costs of Need to order and Recommended products, per currency
8. Sales trend
trend = (sold in the last 30 days − sold in the 30 days before) ÷ sold in the 30 days before
Sold 60 in the last 30 days and 100 in the last 60 days: the 30 days before sold 40, so the trend is (60 − 40) ÷ 40 = +50%. The Why? window mentions the trend when it's 10% or more either way.
9. Supplier, lead time and unit cost
Supplier, when a product has several:
- The only supplier, if there's just one.
- Otherwise, the supplier of your most recent purchase order for this product.
- Otherwise, the supplier with the lowest price for this product.
- Otherwise (no PO history and no prices), the first supplier. Add prices to let the app choose.
Lead time: the supplier's lead time, otherwise the shop default. Order cycle: the supplier's order cycle, otherwise the shop default.
Unit cost: the supplier's price for the product, in the supplier's currency. Otherwise the product's cost in Shopify, only when the supplier uses your shop currency. Otherwise none ("—").