Methodology

How the numbers are calculated

Every formula Stockmind uses, in plain terms — including the places where the model is an approximation rather than a truth.

Replenishment tools tend to present their output as fact. In reality every suggestion rests on a chain of assumptions, and a buyer who can't see those assumptions can't tell a reliable number from a fragile one. This page sets out the whole chain.

1. Sales velocity

Velocity is the engine — everything downstream inherits its accuracy. The conventional definition divides units sold by days elapsed:

velocity = units sold ÷ 90 days ← the conventional approach

This assumes the product was available to sell on every one of those days. When it wasn't, velocity is understated — and the products that sell out fastest are punished hardest. Stockmind divides by the days the product was actually in stock:

velocity = units sold ÷ days available

Establishing days available

Stockmind samples historical stock balances from your warehouse at intervals across the period, and counts how many of those snapshots showed stock on hand:

days available = 90 × (snapshots with stock ÷ total snapshots)

A product absent from a snapshot had no stock then — which also means a product launched mid-period is naturally measured from launch, with no special case needed.

A floor of 14 days applies. A product available for only two days can't imply an enormous rate from a tiny sample, so confidence scales with volume rather than with luck.

Where measurement isn't available, Stockmind falls back to inferring the window from the product's age and its most recent sale — better than a flat calendar divisor, but blind to stockouts that have since been refilled.

2. Trend weighting (optional)

A flat average over the full period treats a rising product and a falling one identically. Stockmind can compare the recent rate against the full window and blend them:

velocity = (1 − w) × full-period rate + w × recent rate

The recent window is availability-adjusted in its own right, so a product that spent last month out of stock isn't mistaken for one whose demand collapsed.

The weight w is not fixed. It rises with recent volume, so a well-evidenced shift moves the number and a single sale barely does:

w = maximum weight × recent units ÷ (recent units + 3)
Recent unitsShare of maximum weightEffect
125%Barely moves — one sale is noise
350%Modest influence
1886%Strong influence — a real signal

3. When to reorder

The trigger is the stock level below which an order must be placed to avoid running dry before it arrives:

reorder point = velocity × (lead time + safety stock)

Lead time can be set per supplier, with a global default for anything not overridden — so an overseas supplier and a local one aren't held to the same schedule.

Available stock is compared against it — counting stock already on order, but only what arrives in time to matter:

available = on hand + incoming arriving within (lead time + safety stock)
needs reorder = available < reorder point

A shipment landing after that horizon is tracked and displayed, but it can't mask a stockout that happens before it lands.

4. How much to order

Most tools size an order to cover the lead time. That's not enough: the order has to last until the next order arrives. Stockmind uses the standard periodic-review target:

order-up-to level = velocity × (lead time + review period + safety stock)
suggested quantity = order-up-to level − available (at least the supplier minimum)

The review period is how often you actually place orders. Order weekly and quantities stay lean; order monthly and they scale accordingly, because they have to survive a longer gap.

5. Safety stock (optionally scaled)

By default safety stock is a flat number of days applied to every product. Optionally, it scales to how erratic each SKU's demand actually is, measured as the coefficient of variation across three equal sub-periods:

period rate = units sold in period ÷ days available in that period
variability (CV) = standard deviation ÷ mean of those rates
effective safety days = base × (0.5 + CV) clamped to 0.5×–2.5×

Variability is measured from sales rates, not raw quantities. A product that sold nothing in one period because it was out of stock isn't erratic — it had nothing to sell. Periods with no availability are excluded rather than counted as a collapse in demand.

Demand patternCVBuffer
Steady — 10, 10, 10 units, always in stock0.000.5× base
Mild swing — 12, 10, 8 units0.160.7× base
Steady but out of stock one period — 10, 0, 100.000.5× base — the empty period is excluded
Genuinely spiky — 30, 1, 2 units, always in stock1.221.7× base

This tends to redistribute protection rather than simply add it: predictable products need less cushion, volatile ones more. Products with too few sales to judge keep the flat buffer.

6. Dead stock

Dead stock uses a deliberately different window — a full year, not the 90 days that drive reordering. A seasonal product would look dead on a short window and get cleared right before its peak.

dead = no sales in 365 days

Results split by whether stock is physically present: items in the warehouse need handling, while zero-stock listings are pure catalogue cleanup.

Where the model is approximate

No forecast is neutral, and every one of these choices trades something. Here's what to keep in mind when reading a suggestion.

Sampling resolution

Availability is sampled at intervals, not continuously, so a stockout shorter than the gap between snapshots can be missed. Sampling frequency is configurable — from weekly (roughly ±4 days of uncertainty) to daily (±0.5 days) — traded against how long the analysis takes to run.

Returns aren't deducted

Velocity is based on units shipped. Where returns are material, demand is slightly overstated.

The trigger ignores the review period

An item can hold enough cover to avoid being flagged today, yet run dry before your next scheduled order. Widening the trigger would catch these at the cost of flagging considerably more items.

It is a suggestion, not a decision

Every figure is a statistical estimate from historical data. Supplier behaviour, market shifts, promotions and pricing changes are all outside the model. The output is there to inform your judgement, not replace it.

If any of this matters to how you'd use the system — or you think a different assumption would suit your catalogue better — that's exactly the sort of thing worth raising before you commit.

Questions about the maths?

We're happy to walk through how any of this would apply to your catalogue.

Get in touch →