Engineering
Stockouts down 32%: the maths behind the Cresthaven pilot
Reorder points, demand variance and a forecast that only had to beat a spreadsheet — the working behind the number on our home page.
- inventory
- forecasting
- reorder point
- safety stock
- retail
The 32% on our home page comes from the Cresthaven Retail inventory pilot, and because a percentage without working is just marketing, this post shows the working. The short version: we measured a baseline for 90 days, deployed a reorder-point model a second-year statistics student could audit, and deliberately kept machine learning out of it. The forecast is boring on purpose. Two SKUs beat the model anyway, and the reasons why are the most useful part.
First, measure the baseline
Before writing any code, we spent 90 days defining and counting the problem. A stockout event was defined as: an active SKU with zero sellable units at store opening. Across Cresthaven’s 1,842 active SKUs, the baseline was 118 stockout events per month, concentrated — as always — in the A-class items that drive most of revenue. If you skip this step, you will never know whether your system worked, and neither will your client. The 32% is only credible because the 118 came first.
The model, in plain terms
Each SKU gets a reorder point: when stock on hand drops below it, the system proposes an order. The reorder point is the demand you expect during the resupply window, plus a buffer sized to how jumpy that demand is:
reorder_point = d_avg × L + z × sigma_d × √L
d_avg = 28-day moving average of daily unit sales
L = supplier lead time, in days, per supplier
sigma_d = standard deviation of daily sales, same window
z = service factor: 1.64 for A items (95%),
1.28 for B (90%), 0.84 for C (80%)
That is the whole model. The z values are a business decision dressed as statistics: they encode “how often are we willing to be out of this?”, and Cresthaven’s buyers — not we — chose them, per class, in a one-hour meeting. Higher service costs more shelf capital; that trade belongs to the client.
Why the forecast is deliberately boring
We tested a gradient-boosted model on the same history. On backtest it cut forecast error by about 4% against the moving average. We shipped the moving average anyway, for three reasons that beat 4%:
- The bar was low. The incumbent was an annual planning spreadsheet plus buyer instinct. The moving average beat it comfortably; the extra 4% bought nothing the business could feel.
- Buyers can audit it. Every reorder suggestion shows its arithmetic. In the mock trial week, buyers challenged suggestions, checked the numbers in a spreadsheet, and — crucially — started trusting the ones they could not fault. The boosted model’s suggestions got overridden on instinct because they could not be argued with, only obeyed or ignored.
- Overrides are data. Buyers can override any suggestion with one click and a reason. Overrides run at about 6% and each one is logged — that log is now the roadmap for what to improve.
The result, with its caveat
Over the pilot quarter, stockout events fell from 118 to 80 per month: 32% fewer. The caveat that makes the number honest: total inventory value rose only 2.9%. Anyone can cut stockouts by buying mountains of everything — the constraint that stock stays roughly flat is what makes the reduction mean something. Ask for both numbers whenever someone shows you one of them.
The two SKUs where it failed
The promotion victim. An energy drink went on a two-week promotion. The 28-day average dutifully learned the promotional spike as the new normal and over-ordered for a month afterwards. A moving average cannot tell a promotion from a trend — it has no idea marketing exists. Fix: promo periods are now flagged in the calendar and excluded from the averaging window. Simple, and it should have been in version one.
The imported glassware line. Lead times from the overseas supplier ranged from 18 to 63 days, shipment to shipment. Our formula treats L as a constant; when lead-time variance dominates demand variance, the safety stock is sized against the wrong risk entirely, and this line kept stocking out on schedule. The textbook fix adds a lead-time variance term; the pragmatic fix, which Cresthaven chose, was to move those 14 SKUs to manual ordering with a generous fixed buffer. Knowing where the model does not apply is part of the model.
What we'd tell you to do
- Spend the first month measuring, not building. A baseline you trust is worth more than a feature.
- Treat service level as a business choice made by the people who own the stock budget — never as a statistical output.
- Model demand variance and lead-time variance separately, and check which one dominates per supplier before trusting a formula.
- Ship the simplest forecast that beats the incumbent, make every suggestion auditable, and make overriding it one click. Adoption is the metric that pays.
