For greengrocers, bakeries, butchers, and restaurant suppliers โ the daily order or production-quantity decision balancing stockouts and waste (in the literature, the Newsvendor problem).
In plain words
Sound familiar?
- Each morning the answer to 'how much do we make or buy today' is 'last Monday we sold this much'
- 10โ25% of product is thrown out, marked down, or given to staff at end of day โ eating into annual profit
- Around 18:00 a couple of popular items run out; customers walk to the competitor and don't come back
- On a rainy day, the same quantity was produced as on a sunny day; one side is waste, the other is short
- For holidays, Mother's Day, weather swings, 'should we order more or less' is debated from scratch every time
- Staff note 'customer asked, we didn't have it' but those notes are lost; there's no systematic analysis
- The production team makes the same amount every day; demand variability doesn't match production, so stock either builds up or runs out
Why it matters
How it's solved
Technical depth
How it's solved
Technical depthOne-liner: Order a bit more of high-margin items (stockout penalty is heavy); order a bit less of high-spoilage items (zero salvage when it spoils). Don’t aim for a single ‘middle’ quantity โ set a different balance per item.
What the software is really doing is this: for each item it numerically computes the optimum order quantity that balances ‘spoilage cost’ against ’lost-sale cost’; then it learns the demand distribution from sales history and recommends a daily quantity. Three stages:
1. It collects cost and demand data. Per item: purchase/production cost, sale price, salvage value of an unsold unit (often zero or very low), lost-margin cost if you stock out, and demand variability (8โ12 weeks of daily history). Weather, calendar events (holidays, weekends, school terms), and local events feed in as additional factors.
2. It computes the optimum order quantity. The classical Newsvendor formula rests on the ‘critical fractile’ (the ‘aim to not stock out on this percentage of days’ threshold) principle: optimum service level = margin / (margin + spoilage cost). That is, a high-margin item economically supports over-ordering; a high-spoilage item economically supports under-ordering. For each item, the software finds the demand quantity that meets this critical fractile from the historical distribution โ that’s the optimum order quantity. The distribution can be normal, lognormal, or the real empirical data.
3. The daily recommendation lands on the desk. At opening, or at order time, the software produces a per-item list: ‘Today: apples 45 kg, bread 180 units, beef 18 kg.’ Weather or campaign overrides apply automatically. End-of-day, the software compares actual sales to its prediction and updates โ it learns over time. Manual override is always available: ‘It’s raining today, take bread 15% lower’ โ the manager’s call wins.
It does not replace experience; think of it as a calculator that scales ‘a bit more, a bit less’ decisions from 20 items to 200 โ with a numerical justification per item. The decision is still yours, but the ‘optimum’ figure for each product is on the desk.
Alternatives
Intuition + last week's notebook
FreeFree
Who it fits: 10โ30 items, stable demand, small shop
- + Zero cost
- + Flexible โ instant decision changes
- + No capex decision
- โ Past 30 items, optimum quantities can't be held in someone's head
- โ Demand variability (weather, campaigns, events) stays in the gut
- โ Last year's Mother's Day numbers aren't remembered
- โ Shrinkage and lost sales aren't tracked numerically
Spreadsheet + manual daily tracking
FreeFree (your own time)
Who it fits: 20โ60 items, willing to log averages in writing
- + Zero software cost
- + Custom formulas to your operation
- + All data in one place
- โ Applying the probabilistic Newsvendor formula by hand is hard
- โ Daily manual entry needed
- โ No self-learning model
POS-ordering software with built-in forecasting
Enterprise$200โ800 setup + $50โ200/month (regional SMB pricing)
Who it fits: 50โ300 items, POS in place at grocer/bakery/butcher
- + Local-language interface and support
- + POS-orders integrated
- + Daily recommendation pushed by email/SMS
- โ Forecast engine is usually 'last week's average'; no real Newsvendor math
- โ Cost parameters (margin, spoilage) can't be set per item
- โ Weather and event factors not built in
International specialized fresh-produce demand-forecast software
Enterprise$20โ100/item/year, or $25,000โ150,000/year licence
Who it fits: 300+ items, grocery chain, restaurant network, food manufacturer
- + Mature: Newsvendor + machine-learning forecast, multi-category, weather and event factors
- + POS and warehouse integration ready
- + Algorithms hardened over years
- โ High licence and consulting cost
- โ Rollout takes 2โ4 months
- โ Local product and supplier adaptation needed
Custom build on open-source libraries
Open SourceLicence free; 4โ8 weeks of internal development, or $20,000โ80,000 of consulting
Who it fits: Chain with a data team, or tech-led operator
- + No licence cost
- + Fully customizable to your product and cost structure
- + Cloud or on your own server
- โ Requires data-science capacity in-house
- โ Ongoing maintenance is real work
- โ Bad historical data leads to misleading results
Recommendation
Ask in the meeting
- Does the forecast engine apply real Newsvendor math (optimum order via critical fractile), or just historical averages?
- Can spoilage cost, margin, and shelf life be set as separate parameters per item, or are all items treated under one 'safety stock'?
- Do weather, calendar events (holidays, weekends), and local events automatically feed the forecast?
- Are stockout periods automatically corrected in historical sales data (censored-demand correction)?
- Is product substitution modeled (e.g. plain bread sold out, customer takes whole-wheat)?
- Are supplier minimum order quantities (MOQ) and price breaks fed into the recommendation?
- How do you structure the pilot โ how many items, how many weeks, what is the success bar?
- If we stop working with you, how do we get our product history, shrinkage records, and order recommendations back? Is there a standard export format?
Technical details
Editor’s note
On the shop counter this problem is known as ‘how much do we order today,’ ‘shrinkage reduction,’ or ‘daily production’. The academic name is the Newsvendor Problem โ single-period stochastic inventory. The name comes from a newspaper vendor who orders the morning print run; whatever sells, profits; whatever doesn’t, is scrapped. The same structure appears in fresh food, seasonal apparel, event tickets, blood inventory, even airline overbooking. Without that vocabulary, in a software demo you cannot tell whether the ‘demand forecast module’ is genuinely optimizing the shrinkageโstockout trade-off, or just averaging the past.
The point most often overlooked in this segment: many products advertise ‘demand forecasting’ but underneath they only run moving averages โ ‘past 4 weeks’ average ร 1.1’. That’s fine when variability is low; but in fresh food, demand can swing 20โ50% day-to-day, and the cost on each side (stockout vs spoilage) is asymmetric. A real Newsvendor computes the ‘critical fractile’ as margin / (margin + spoilage cost). In any demo, insist on a worked example: ‘margin $5, spoilage cost $8, mean demand 100, std dev 30 โ what’s the optimum order?’
A step-by-step path for an SMB
Stage 1 โ Measure first, plan later. Over 8โ12 weeks, log four things:
- Daily actual sales per item
- End-of-day shrinkage: thrown out, marked down, or returned
- Stockout hours (e.g. ‘bread ran out at 18:00, with 4 hours of buyers’)
- Weather and calendar notes (holidays, school terms, local events)
Without this baseline you can’t tell which software will deliver which result.
Stage 2 โ Build the cost table. Per item: purchase cost, sale price, margin (price minus cost), spoilage-unit cost, ratio of margin to spoilage cost. That ratio defines the ‘critical fractile’ โ the main parameter behind any honest recommendation. This table is your knowledge capital โ any serious vendor will ask for it first.
Stage 3 โ Pilot. Start with the 10โ30 most important items for 6โ10 weeks. Define the success criterion in writing, before the pilot: e.g. “in 60 days, A-group shrinkage down 25%, stockouts down 30%.” If the bar is missed, the pilot ends โ keep that exit right in the contract.
Stage 4 โ Rollout. If the pilot lands, scale to the whole product range over 2โ3 months. Staff training runs 1โ2 weeks; each morning, a ‘system recommended, accept’ tap should be enough.
Risks โ what can go wrong
- Bad historical data. Records like ‘sold’ / ’thrown’ are too coarse; Newsvendor can’t compute properly. Before the pilot, standardize daily + per-item sales and shrinkage records.
- Lost stockout data. When the system records a stockout as ‘zero sales,’ demand history misleads (censored demand). A good system tracks stockout hours separately.
- Substitution effect. When a customer can’t find one product, they take an alternative (no plain bread, take whole-wheat). If unmodeled, you’ll conclude ‘plain bread demand is low’.
- Vendor lock-in. Software that stores product history and cost parameters in a proprietary format makes migration hard. Put a clause in the contract: “We can export our data in standard open formats (CSV or similar) at any time, on request.”
Related cautionary lesson (will be linked once published): “A mid-sized grocery chain that dropped its order recommendation software at month 9 โ what they missed.”
A technical view of the solution method
This section holds what you’ll need when talking to a software team or a consultant. It is not what the operator sees on the daily screen โ it is the engine behind the curtain.
The main approaches for perishable ordering:
| Approach | Typical use | Data need | Decision logic |
|---|---|---|---|
| Moving average | History exists, demand stable | Low | Average of last N days |
| Classical Newsvendor | Perishable, single-decision | Medium | Critical fractile ร demand distribution |
| Multi-period with carryover | 2โ7 day shelf life | Medium | Dynamic programming |
| Machine-learning forecasts | Many items + weather + events | High | Regression trees, neural nets |
| Stochastic MIP | Multi-product + supplier constraint | High | Full optimization |
In practice: under 30 items, classical Newsvendor is enough. With 100+ items, multi-category, season-driven operation, ML demand forecast + Newsvendor blend is preferred. With supplier MOQ and multi-product constraints, stochastic MIP.
Objective function choice changes the shape of the solution:
- Expected profit (spoilage + lost-sale balance): “Maximize net profit” โ fits high-margin products
- Total shrinkage: “Minimize what’s thrown out” โ fits sustainability-oriented operations
- Service level (e.g. 95% no stockouts): “Customer always finds it” โ fits market-share strategy
- Cost asymmetry: “Lost-sale cost is 3ร spoilage cost” โ fits thin-margin products
Most real deployments use a weighted blend of all four โ most commonly expected profit ร service level.
Academic references
Listed in the sources block of this page’s frontmatter. The Newsvendor problem was formalized in 1951 by Arrow, Harris, and Marschak and has been one of the oldest, still active, areas of operations research; current work extends it with machine-learning demand forecasting and multi-product substitution models.
Sources
- Arrow, K. J., Harris, T. and Marschak, J. (1951). Optimal inventory policy. Econometrica, Vol. 19 โ the paper that established the mathematical foundation of the Newsvendor problem.
- Khouja, M. (1999). The single-period (news-vendor) problem: literature review and suggestions for future research. Omega, Vol. 27 โ comprehensive review of the field.
- Porteus, E. L. (2002). Foundations of Stochastic Inventory Theory. Stanford University Press. The standard text on stochastic inventory theory.
- INFORMS Interfaces โ case studies of Newsvendor deployments in fresh food and retail. informs.org/Publications/Interfaces
Glossary
- Newsvendor
- Classical single-period inventory model that gives the optimal order quantity for perishables, balancing spoilage and lost-sale costs.
- Service Level
- The probability that a customer finds what they want when they ask โ a numeric target for inventory and ordering decisions.
- MIP
- An optimization model where some decision variables are forced to be whole numbers (e.g. number of trucks, number of shifts).