Supply Chain Analytics — Formulas & Case Studies
Supply Chain Analytics — Formulas & Case Studies
OTIF, Fill Rate, RTO, Safety Stock, EOQ, Inventory Turnover, MAPE aur Bullwhip Effect — complete formula sheet with worked case studies. Metric decomposition trees, must-know SCM terms aur practice question bank. Supply Chain Analyst interview ready.
📑 Is Article Mein Kya Hai:
🧭 PART 0 — Case Study Answer Karne ka FRAMEWORK
Har case study me yeh 5 steps follow karo. Interviewer structure dekh ke impress hota hai, answer se zyada.
STEP 1 CLARIFY → "Kya yeh OTIF order-level hai ya line-level?" (1-2 question poocho)
STEP 2 DECOMPOSE → Metric ko formula me todo (OTIF = On-Time × In-Full)
STEP 3 HYPOTHESIZE → 3-4 possible reasons bolo (MECE — no overlap)
STEP 4 VALIDATE → Data slice karo — "main COD vs Prepaid split karunga"
STEP 5 RECOMMEND → Impact + Effort ke hisaab se prioritise karo, ROI batao
🔑 Golden Rule
Metric ka formula pehle bolo. Agar Fill Rate = Units Delivered / Units Ordered bol diya, toh aadha case wahi solve ho gaya — kyunki ab pata hai numerator dekhna hai ya denominator.
📐 PART 1 — Complete Formula Sheet
1.1 Delivery / Service Metrics
| Metric | Formula | Good benchmark |
|---|---|---|
| OTIF | On-Time AND In-Full lines ÷ Total lines | > 95% |
| On-Time Delivery (OTD) | On-time shipments ÷ Total shipments | > 95% |
| Fill Rate (Line) | Lines filled complete ÷ Total lines | > 97% |
| Fill Rate (Unit) | Units delivered ÷ Units ordered | > 98% |
| Perfect Order % | On-time × In-full × Damage-free × Correct docs | > 90% |
| SLA Breach % | Breached ÷ Total | < 5% |
| Average TAT | Σ(delivery date − order date) ÷ orders | Category dependent |
| First Attempt Delivery % | Delivered in 1st attempt ÷ Total | > 85% |
🚨 OTIF vs Fill Rate — verified math
Total order lines = 1000
In-full lines = 920 → Line Fill Rate = 92.00%
On-time lines = 850 → On-Time Rate = 85.00%
On-time AND In-full lines = 780 → OTIF = 78.00%
Key insight: OTIF (78%) hamesha min(On-Time, In-Full) se kam hoga — kyunki yeh intersection hai, average nahi. Interview me yeh line bolna = tumhe concept clear hai.
🏆 The Classic: "Fill Rate 97%, OTIF 82% — kya problem hai?"
Fill Rate 97% → inventory availability THEEK hai, stock-out nahi hai
OTIF 82% → bottleneck ON-TIME component me hai
Answer:
OTIF 82% matlab problem On-Time side me hai. Main milestone TAT breakdown karunga:
Order-to-Dispatch TAT → Dispatch-to-Hub → Hub dwell time → Last-mile SLA breach.
Jis stage pe sabse zyada variance milega, wahi root cause hai."
RCA dimensions:
- Hub-wise SLA breach rate (top 5 hubs)
- Rider capacity vs assigned shipments
- Pincode clustering (remote areas)
- Time-of-day dispatch (peak hour backlog)
- Weather / festival spike days
1.2 Inventory Metrics ⭐
| Metric | Formula | Verified example |
|---|---|---|
| Days of Stock (DOS) | Current Stock ÷ Avg Daily Sales | 45 ÷ 9 = 5.00 days |
| Days of Inventory (DOH) | 365 ÷ Inventory Turnover | 365 ÷ 8 = 45.62 days |
| Inventory Turnover | COGS ÷ Avg Inventory Value | 12,00,000 ÷ 1,50,000 = 8.00x |
| Reorder Point (ROP) | (Avg Daily Sales × Lead Time) + Safety Stock | 9×10 + 54.4 = 144.4 |
| Safety Stock | Z × σ(demand) × √Lead Time | 1.64 × 12.5 × √7 = 54.4 |
| EOQ | √(2 × D × S ÷ H) | √(2×12000×500÷60) = 447.2 |
| Stock-out Rate | Lost sales ÷ Total demand | |
| Shrinkage % | (Book stock − Physical stock) ÷ Book stock | |
| Inventory Accuracy % | Correct SKUs ÷ Total SKUs counted | Target 99%+ (example value — yeh tera personal result NAHI hai) |
| Carrying Cost % | (Holding + Insurance + Obsolescence) ÷ Inventory Value | 20–30%/yr |
Service Level → Z-score (verified)
| Service Level | Z-score | Safety Stock (σ=12.5, LT=7) |
|---|---|---|
| 90% | 1.282 | 42.4 units |
| 95% | 1.645 | 54.4 units |
| 97% | 1.881 | 62.4 units |
| 99% | 2.326 | 76.9 units |
(54.4 → 76.9). Isliye main ABC-wise differentiated service level rakhta hoon —
A items 99%, B items 95%, C items 90%."
EOQ Sensitivity (verified — yeh table interview me gold hai)
| Order Qty | Orders/year | Total Cost |
|---|---|---|
| 300 | 40.0 | ₹29,000 |
| 400 | 30.0 | ₹27,000 |
| 447 (EOQ) | 26.8 | ₹26,833 ← minimum |
| 500 | 24.0 | ₹27,000 |
| 600 | 20.0 | ₹28,000 |
Insight: EOQ curve flat hota hai — ±20% deviation pe cost sirf ~0.6% badhta hai. Isliye practical me MOQ (Minimum Order Quantity) aur truck-load constraints ke saath adjust karte hain.
1.3 Cost Metrics
| Metric | Formula | Verified |
|---|---|---|
| Landed Cost | Item + Freight + Duty + Handling + Insurance | 500+60+45+25 = ₹630 |
| Cost per Delivery | Total logistics cost ÷ Deliveries | 9,00,000 ÷ 10,000 = ₹90 |
| Cost per Attempt | Total cost ÷ Total attempts | 9,00,000 ÷ 11,300 = ₹79.6 |
| Cost per Order (CPO) | Fulfillment cost ÷ Orders | |
| Cost as % of Revenue | Logistics cost ÷ Revenue × 100 | |
| Wasted on failed attempts | Failed attempts × Cost per attempt | 1,300 × 79.6 = ₹1,03,540 |
1.4 Returns / RTO
| Metric | Formula |
|---|---|
| Return Rate | Returned orders ÷ Total orders |
| RTO % | RTO orders ÷ Total orders |
| RTO Cost | RTO count × (Forward freight + Reverse freight + Handling) |
| Refund TAT | Avg days from delivery-fail to refund |
1.5 Warehouse Ops
| Metric | Formula | Verified |
|---|---|---|
| Lines per Hour | Lines picked ÷ Labor hours | 3,200 ÷ 40 = 80 LPH |
| Pick Accuracy | Correct picks ÷ Total picks | |
| Dock-to-Stock Time | Receiving to putaway hours | |
| Space Utilization | Used slots ÷ Total slots | |
| Order Cycle Time | Order received → shipped |
1.6 Forecast Accuracy ⭐
| Metric | Formula | Verified example |
|---|---|---|
| MAPE | avg(\ | Actual−Forecast\ |
| MAD | avg(\ | Actual−Forecast\ |
| Bias | avg(Forecast − Actual) | +0.0 (unbiased) |
| RMSE | √(avg((A−F)²)) | Penalises big errors |
| WAPE | Σ\ | A−F\ |
Actual = [1000, 1200, 900, 1100, 1300]
Forecast = [1050, 1100, 950, 1000, 1400]
MAPE = 7.13% MAD = 80.0 Bias = 0.0
isliye main WAPE use karta hoon. Aur Bias check karta hoon: agar consistently positive hai
matlab hum over-forecast kar rahe hain, jisse excess inventory banegi."*
1.7 Bullwhip Effect (verified)
Customer demand CV = 0.043
Retailer order CV = 0.053
Factory order CV = 0.056
Variance amplification (retail demand → factory order) = 1.46x
Causes: demand signal processing, order batching, price fluctuation, rationing/shortage gaming Fixes: information sharing (POS data), EDI/API integration, VMI, smaller batch sizes, EDLP (Everyday Low Pricing), reduce lead time
🎯 PART 2 — Worked Case Studies
CASE 1 — Fill Rate 97% but OTIF 82% ✅ (see Part 1.1)
CASE 2 — RTO 8% → 21% after Big Billion Days (Flipkart)
Context: Har RTO pe ₹60–120 reverse logistics cost. Festival ke baad spike.
Step 1 — Data Slicing (yeh bolo sabse pehle)
1. Payment mode → COD vs Prepaid RTO rate
2. Time → Pre-festival vs festival vs post-festival
3. Category → Fashion/Apparel vs Electronics
4. Geography → Pincode tier (metro vs tier-3)
5. Delivery TAT → SLA breach vs on-time
6. Rider / Hub → Fake attempt detection
7. Order value → High value vs low value
Step 2 — Root Causes (MECE)
| Bucket | Cause |
|---|---|
| Customer | Impulse COD buys, buyer's remorse, address galat, ghar pe nahi tha |
| Logistics | Peak load pe capacity short, delivery late night, fake "customer unavailable" |
| Product | Size/color mismatch (Fashion), damaged in transit |
| System | No pre-delivery confirmation, no live tracking, no reschedule option |
Step 3 — Verified Cost Impact
RTO 21% → 12% on 200,000 annual orders, ₹90 per RTO
Saving = 9% × 200,000 × ₹90 = ₹16,20,000 / year
Investment (WhatsApp confirmation + geo-fencing) = ₹4,00,000
Payback = 3.0 months ROI = 305%
Step 4 — Recommendations (Impact × Effort matrix)
| Action | Impact | Effort |
|---|---|---|
| WhatsApp/SMS 1-click address confirmation before dispatch | 🔥 High | Low ⭐ |
| COD risk scoring (new user + high value + remote pincode = friction) | High | Medium |
| Geo-fencing on delivery scan (fake attempt block) | High | Medium |
| Live tracking + 2-hour delivery slot | Medium | Medium |
| Reschedule option instead of RTO | Medium | Low ⭐ |
| Size guide + AR try-on (Fashion) | Medium | High |
CASE 3 — Hub-wise SLA Breach Spike (Flipkart/Ekart)
Task: Last 30 days me top 5 hubs with highest SLA breach.
SQL Answer ⭐ (verified — _verify/mysql_run_all.py)
SELECT s.hub_id,
COUNT(*) AS shipments,
ROUND(100.0 * SUM(CASE WHEN o.actual_delivery_date > o.promised_delivery_date
THEN 1 ELSE 0 END) / COUNT(*), 2) AS sla_breach_pct
FROM shipments s
JOIN orders o ON s.order_id = o.order_id
WHERE o.order_date >= CURDATE() - INTERVAL 30 DAY
GROUP BY s.hub_id
HAVING COUNT(*) >= 500
ORDER BY sla_breach_pct DESC
LIMIT 5;
Verified output:
hub_id shipments sla_breach_pct
H1 3 66.67
H2 2 50.00
Milestone TAT Breakdown (RCA ka core) ⭐
SELECT s.hub_id,
ROUND(AVG(TIMESTAMPDIFF(HOUR, s.dispatch_time, s.hub_arrival_time)),1) AS dispatch_to_hub_hr,
ROUND(AVG(TIMESTAMPDIFF(HOUR, s.hub_arrival_time, s.out_for_delivery_time)),1) AS hub_dwell_hr,
ROUND(AVG(TIMESTAMPDIFF(HOUR, s.out_for_delivery_time, s.delivered_time)),1) AS last_mile_hr
FROM shipments s
GROUP BY s.hub_id
ORDER BY hub_dwell_hr DESC;
Yeh query bata dega bottleneck kahan hai:
dispatch_to_hubzyada → mid-mile / line-haul problemhub_dwellzyada → hub sorting capacity / backloglast_milezyada → rider capacity / pincode remoteness
CASE 4 — Inventory Optimization (Amazon)
Scenario: 3,000 SKUs, kuch pe stockout, kuch pe 90+ days inventory.
Approach
1. ABC analysis karo (Pareto 80/95/100)
2. Har class ke liye service level set karo (A=99%, B=95%, C=90%)
3. Safety stock recalculate karo class-wise
4. EOQ/MOQ se order quantity optimise karo
5. Slow-mover (DOH > 90) identify karke liquidation plan
ABC Analysis — verified
category_name revenue cumulative_pct abc_class
Fashion 59000.0 45.31 A
Electronics 44400.0 79.42 A
Grocery 20800.0 95.39 C
Accessories 6000.0 100.00 C
Insight: 2 categories (Fashion + Electronics) = 79.4% revenue — inpe focus karo. Accessories 100% cumulative pe hai but sirf ₹6,000 — inka service level kam rakho.
Stockout Risk Query (Python — verified)
df["days_of_stock"] = df["current_stock"] / df["daily_avg_sales"]
df["reorder_point"] = df["daily_avg_sales"] * df["lead_time_days"]
df["reorder_status"] = np.where(
df["days_of_stock"] <= df["lead_time_days"],
"Critical - Reorder Now", "Safe")
Verified output:
sku_id current_stock daily_avg_sales lead_time_days days_of_stock reorder_point reorder_status
S1 120 12 7 10.0 84 Safe
S2 45 9 10 5.0 90 Critical - Reorder Now
S3 300 20 14 15.0 280 Safe
S4 0 5 5 0.0 25 Critical - Reorder Now
CASE 5 — Fraud Detection (Mastercard)
Red Flags (professional terms me bolo) ⭐
| Pattern | Professional Name |
|---|---|
| Naye account se badi transaction | Account Age Velocity Anomaly / Bust-Out Fraud |
| Chhoti-chhoti payments phir ek badi | Card Testing → Cash-Out Escalation |
| 2–4 AM high amount | Off-Hour / Temporal Anomaly |
| Baar-baar OTP fail | Brute-Force OTP Velocity / Account Takeover |
| Ek card, multiple devices/locations | Device Fingerprint Mismatch / Impossible Travel |
| Merchant pe sudden volume spike | Merchant Collusion / Laundering |
SQL (verified)
WITH transaction_velocity AS (
SELECT card_number, transaction_id, transaction_amount, transaction_time,
LAG(transaction_time,1) OVER (PARTITION BY card_number ORDER BY transaction_time) AS prev_time,
AVG(transaction_amount) OVER (PARTITION BY card_number) AS avg_card_spend
FROM transactions
)
SELECT card_number, transaction_id, transaction_amount,
TIMESTAMPDIFF(MINUTE, prev_time, transaction_time) AS mins_gap,
'High Risk' AS risk_flag
FROM transaction_velocity
WHERE TIMESTAMPDIFF(MINUTE, prev_time, transaction_time) <= 10
AND transaction_amount > (3 * avg_card_spend);
🧠 Pro Insight (verified math)
max(txn / card_avg) kabhi (n−1) se zyada nahi ho sakta.Matlab "5× average" rule kam se kam 6 transactions wale card pe hi fire karega.
Production me: threshold card-history size ke hisaab se dynamic rakho, ya
rolling average (last 30 txn) use karo — full-card average nahi.
CASE 6 — Warehouse Productivity (Wipro/3PL)
Lines picked = 3,200
Labor hours = 40
Lines per Hour (LPH) = 80
Agar travel time 55% hai:
Productive pick time = 18 hrs
Effective pick rate = 178 lines/hr
Insight: "LPH improve karne ka sabse effective tareeka picker ki speed badhana nahi, travel time kam karna hai. Isliye slotting optimization karta hoon — A-class items ko golden zone (waist-height, pack station ke paas) me rakhta hoon."
🌳 PART 3 — Metric Decomposition Trees
OTIF Tree
OTIF %
│
┌─────────────┴─────────────┐
On-Time % In-Full %
│ │
┌─────────┼─────────┐ ┌────────┼────────┐
Order-to- Mid-Mile Last-Mile Stock Pick Pack
Dispatch Transit Delivery Avail. Accuracy Accuracy
│ │ │ │ │ │
Backlog Line-haul Rider cap ROP/SS Slotting Label
Pick TAT Route plan Pincode Forecast LASA Scanner
RTO Tree
RTO %
│
┌───────────┬───────┴────┬────────────┐
Customer Address Delivery Product
│ │ │ │
Impulse buy Incomplete Late slot Size mismatch
COD remorse Wrong pin Fake attempt Damaged
Not available No phone Remote area Wrong item
Inventory Cost Tree
Total Inventory Cost
│
┌───────────────┬───┴────────┬──────────────┐
Ordering Cost Holding Cost Stockout Cost Obsolescence
│ │ │ │
PO processing Warehouse rent Lost sales Write-off
Freight Insurance Margin loss Markdown
Receiving Capital cost Churn Expiry (FEFO)
🗣️ PART 4 — Must-Know SCM Terms
| Term | Matlab |
|---|---|
| SKU | Stock Keeping Unit — unique product identifier |
| FEFO / FIFO | First Expiry/In First Out — pharmacy/FMCG me critical ⭐ |
| LASA | Look-Alike Sound-Alike — similar dikhne wali medicines ⭐ |
| MOQ | Minimum Order Quantity |
| VMI | Vendor Managed Inventory |
| 3PL / 4PL | Third/Fourth Party Logistics |
| Cross-docking | Bina storage ke direct inbound→outbound |
| Slotting | Warehouse me item placement optimization |
| Golden Zone | Waist-height picking area (fastest access) |
| Cycle Count | Continuous partial inventory audit ⭐ |
| Bottleneck / TOC | Theory of Constraints — system ka limiting step |
| Lead Time | Order place → receive ka time |
| Safety Stock | Buffer against demand/lead-time variability |
| Bullwhip Effect | Demand variance ka upstream amplification |
| Milk Run | Multiple suppliers se ek hi vehicle me pickup |
| Dead Stock | JO sell hi nahi ho raha |
| WIP | Work In Progress |
| SLA | Service Level Agreement |
| POD | Proof of Delivery |
| RTO | Return to Origin |
| COD | Cash on Delivery |
| AOV | Average Order Value |
| Landed Cost | Item + sab logistics/duty costs |
| Incoterms | FOB, CIF, EXW — international shipping terms |
📋 PART 7 — Case Study Question Bank (Practice karo)
Easy
- Fill Rate 97%, OTIF 82% — kya issue hai?
- Inventory Turnover 4x se 6x kaise karoge?
- RTO 8% → 21% — investigate karo
- Stockout badh raha hai par purchase budget fixed hai — kya karoge?
- Warehouse me picking slow hai — kaise diagnose karoge?
Medium
- Ek hub ka SLA breach 40% hai — RCA karo
- Safety stock badhane se kya-kya impact hoga?
- Bullwhip effect kaise detect karoge data me?
- Forecast MAPE 25% hai — kaise improve karoge?
- COD RTO 21%, Prepaid 8% — COD band kar do? (Trade-off answer do)
Hard
- Naya warehouse kahan kholo? Kaunse factors dekhoge?
- 3PL vs in-house fulfillment — kaise decide karoge?
- Service level 95% → 99% ka business case banao
- Peak season (BBD) ke liye capacity plan karo
- Supplier consolidation — kitne suppliers optimal?
✅ PART 8 — Quick Revision (Interview se 1 ghanta pehle)
Formulas jo zubaani aane chahiye:
OTIF = On-Time ∩ In-Full lines ÷ Total lines
Fill Rate = Units delivered ÷ Units ordered
DOS = Current stock ÷ Daily avg sales
ROP = (Daily sales × Lead time) + Safety stock
Safety Stock = Z × σ × √Lead Time
EOQ = √(2DS/H)
Turnover = COGS ÷ Avg inventory
DOH = 365 ÷ Turnover
RTO Cost = RTO count × (fwd + rev freight + handling)
MAPE = avg(|A−F|/A) × 100
Cost per Delivery = Logistics cost ÷ Deliveries
Answer structure:
Clarify → Decompose (formula) → Hypothesise (MECE) → Validate (data slice) → Recommend (ROI)
5 lines jo har case me bolo:
- "Pehle main metric ko formula me todta hoon — isse pata chalta hai numerator dekhna hai ya denominator."
- "Main MECE hypotheses banata hoon — customer, logistics, product, system."
- "Data ko COD vs Prepaid, tier, category aur TAT me slice karunga."
- "Recommendations ko Impact × Effort matrix pe prioritise karunga."
- "Har recommendation ka ROI aur payback period calculate karunga."
Math Python me run karke verify kiya gaya hai (_verify/scm_math_check.py). SQL queries DuckDB pe execute ki gayi hain.
Supply Chain Analytics — Complete!
Is file ke saare numbers Python me actually calculate karke verify kiye gaye hain. Service-level Z-scores, EOQ sensitivity, OTIF math, bullwhip amplification aur MAPE — sab real output hai.
Happy Learning & Keep Exploring! 🚀
💬 Comments (0)
Loading comments...