Bullwhip Effect Simulator
Model how small changes in customer demand amplify upstream across a 4‑stage supply chain (Retailer → Wholesaler → Distributor → Factory).
Simulation Settings
Customer Demand
Policy & Lead Times
Advanced: Stage-specific safety stock multipliers
Override the global safety stock multiplier for individual stages if desired.
Bullwhip Metrics
Variance ratios compare order variability at each stage to end-customer demand. Values > 1 indicate amplification (bullwhip).
| Stage | Order variance |
Bullwhip ratio (Varorders / Vardemand) |
|---|---|---|
| Customer demand | – | 1.00 |
| Retailer orders | – | – |
| Wholesaler orders | – | – |
| Distributor orders | – | – |
| Factory production | – | – |
Time Series (first 40 periods)
Scroll horizontally to compare customer demand with orders placed by each stage.
| t | Demand | Retailer order | Wholesaler order | Distributor order | Factory production |
|---|
What is the bullwhip effect?
The bullwhip effect describes how small fluctuations in end-customer demand can create increasingly larger swings in orders and inventory as you move upstream in a supply chain. Retailers, wholesalers, distributors, and factories all react to demand signals, lead times, and inventory targets – and those reactions can unintentionally amplify variability.
Intuition
- Customers slightly increase demand.
- Retailers see the increase, update their forecast, and raise orders “just to be safe”.
- Wholesalers see the retailer’s higher orders and do the same, often with longer lead times.
- By the time the signal reaches the factory, production swings can be many times larger than the original change.
How this simulator models the bullwhip effect
This tool uses a simplified four‑stage supply chain: Retailer → Wholesaler → Distributor → Factory. Time is discrete (e.g., weeks).
1. Customer demand
End-customer demand in period \(t\) is modeled as:
- \(\mu\) = base demand per period (e.g., 100 units).
- \(\sigma\) = demand standard deviation (variability slider).
- You can optionally truncate demand at zero to avoid negative values.
2. Forecasting with a moving average
Each stage uses a simple moving average forecast of the demand it observes:
where \(w\) is the forecast window (number of periods in the moving average). Short windows react quickly but can overreact to noise; long windows are smoother but slower.
3. Order-up-to inventory policy
Each stage follows a periodic review, order-up-to policy. At each review period, it computes a target inventory position:
- \(L\) = lead time in periods.
- \(k\) = safety stock multiplier (e.g., 1.0 ≈ one standard deviation).
- \(\sigma_D\) = estimated demand standard deviation (from the same window).
The order quantity is then:
Inventory position includes on-hand inventory plus on-order inventory minus backorders.
4. Measuring the bullwhip effect
A common quantitative measure of the bullwhip effect is the variance ratio:
- \(Q^{(i)}_t\) = orders placed by stage \(i\) in period \(t\).
- \(D_t\) = end-customer demand in period \(t\).
If the ratio is:
- < 1 – the stage is smoothing variability.
- = 1 – variability is unchanged.
- > 1 – variability is amplified (bullwhip effect).
How to interpret your simulation results
Typical patterns
- Retailer often has a ratio close to 1 if demand is stable and lead times are short.
- Wholesaler and Distributor usually show higher ratios due to longer lead times and reacting to already‑filtered signals.
- Factory tends to have the highest variance ratio, especially with long lead times and aggressive safety stock.
What drives the bullwhip effect?
- Demand forecasting – reacting too strongly to short-term noise.
- Lead times – longer lead times require more safety stock and larger adjustments.
- Order batching – ordering monthly instead of weekly increases lumpiness.
- Safety stock policies – large \(k\) values amplify swings.
- Information distortion – each stage sees only orders, not true customer demand.
Practical tips: how to reduce the bullwhip effect
- Share real-time demand data (POS data, collaborative planning) across the chain.
- Shorten lead times with better logistics, local sourcing, or faster production changeovers.
- Simplify and stabilize forecasting instead of chasing every weekly fluctuation.
- Reduce order batching by lowering minimum order quantities and using more frequent replenishment.
- Align incentives and promotions so partners don’t over-order just to capture discounts.
- Standardize safety stock policies and review them regularly with updated variability data.
FAQ
Is the bullwhip effect always bad?
Not always. Some amplification is inevitable in multi‑echelon systems. The problem is excessive bullwhip, which leads to stockouts, overtime, rush shipping, and write‑offs. The goal is to keep variability at a manageable level.
Why do my ratios sometimes show “NaN” or very large values?
If demand variability is extremely low (almost constant demand), the variance in the denominator approaches zero, which can make ratios unstable or undefined. Increase demand variability slightly or run the simulation for more periods to get more robust metrics.
Can I use this simulator for teaching?
Yes. The tool is designed for classroom demonstrations and workshops. You can run multiple scenarios live, compare policies, and export the time series by copying the table into a spreadsheet for deeper analysis.