Under deterministic and constant demand, fixed order cost, and fixed unit holding cost, the closed-form solution for how much to order each time. Academic name: Economic Order Quantity (EOQ); closed-form is the Wilson formula Q* = sqrt(2DS/H). Foundational: Harris (1913); Wilson (1934).
In plain words
Sound familiar?
- We are a wholesale distributor or mid-size manufacturer; we order the same 50-500 SKUs continuously; the purchasing decision is made intuitively by the rule 'buy one month's stock' or 'fill the truck'.
- Per-order transport + customs + processing cost is not cleanly accounted; we do not know the true setup cost S per order with each supplier (typically in the $50-500 band but undocumented).
- Per-unit-year holding cost H is not cleanly computed; the sum of capital-tied (25-40%/year financing), warehouse (rent + labour + insurance) and spoilage/obsolescence components is fuzzy; intuitively '15-25% of unit price' is used.
- Two different employees order the same product at different frequencies; one prefers 'weekly small', the other 'monthly large'; which is actually cost-correct is not numerically compared.
- The supplier offers a quantity discount (5% above 100 units, 10% above 500); 'buy more, pay less per unit' pressure exists but a holding-cost-inclusive sensible order quantity is not computed.
- When the order is large the warehouse overflows; when small the transport cost balloons; we get stuck at one of two extremes and have no middle-ground formula.
- At year-end inventory count we complain of either 'too much stock' or 'constant stockouts'; but the mathematical link between order-quantity choice and that outcome is not drawn.
Why it matters
How it's solved
Technical depth
How it's solved
Technical depthIn one sentence: The Wilson formula Q* = √(2DS/H) — given annual demand D, per-order setup S and per-unit-year holding cost H, sets each order quantity to Q*, the single number that minimises ordering cost plus holding cost together.
This problem is known in the Operations Research (the discipline that uses math and computers to solve business decisions) and inventory management literature as Economic Order Quantity (EOQ). The formula was derived by Harris in 1913 and brought into practice by Wilson in 1934 — hence the “Wilson formula” name. EOQ is three-staged:
1. Modelling. Assumptions (classical EOQ): (a) demand rate constant and deterministic (annual D units known), (b) setup cost per order S constant (independent of order size — order processing, transport, customs, invoicing included), (c) per-unit-year holding cost H constant (annual capital-tied rate × unit cost + per-unit-year warehouse + spoilage + insurance), (d) instantaneous delivery (zero or known constant lead time), (e) no shortage allowed (stock replenished the moment it hits zero), (f) single product (multi-product coordination is #050 JRP). Data inputs: annual demand D (12-month rolling historical consumption average), per-order setup cost S (sum of purchasing + logistics + accounting cost items per order — $50-500 typical for an SMB), per-unit-year holding cost H (unit cost × annual financing rate + warehouse labour+rent per-unit share + spoilage + insurance). Decision variable: order quantity Q. Objective: minimise annual total cost TC(Q) = (D/Q) × S + (Q/2) × H. The first term is annual order cost (orders-per-year × setup), the second is holding cost (average inventory Q/2 × per-unit-year holding).
2. Solver-driven decision — the Wilson formula. Closed-form solution (closed-form — solvable in one line of formula): TC(Q) is convex (U-shaped); differentiating with respect to Q and setting to zero (dTC/dQ = -DS/Q² + H/2 = 0) yields the optimum order quantity: Q = sqrt(2DS/H)*. This closed-form is known as the Wilson formula. Optimum annual order count N* = D/Q* = sqrt(DH/2S). Optimum annual total cost TC* = sqrt(2DSH). Annual average inventory Q*/2. Sensitivity analysis (cost-flatness — the cost curve is flat around the optimum): the most beautiful practical property of EOQ — a ±20% deviation from Q* increases total cost by only 2-5%; a ±50% deviation by 10-25%. Practical meaning: even when supplier MOQ or transport-unit constraints prevent hitting Q* exactly, getting close is enough. Extensions — required in practice: (a) Quantity discounts — all-units QD (if total order is above threshold, discount applies to all units) and incremental QD (discount only on units above threshold). Solution: compute Q* for each discount tier, check feasibility (is Q* below or above the tier threshold), compare costs, table-search for the global optimum. (b) Planned shortage / backordering — if stockouts are consciously allowed (customer waits, backorder cost b/unit-year), Q* expands to sqrt[(2DS/H) × ((H+b)/b)]; the planned-shortage fraction is 1 - b/(H+b). (c) Finite replenishment rate (EPQ — Economic Production Quantity) — if delivery is not instantaneous but accumulates at production rate P > D: Q* = sqrt[(2DS/H) × (P/(P-D))]; because replenishment is gradual, average inventory becomes (Q/2)(1-D/P) instead of Q/2. (d) Perishable / shelf-life constraint — if the product expires within a known time, add Q ≤ demand × shelf-life as an upper bound on top of the classical EOQ. (e) Inflation-adjusted EOQ — for high-inflation economies the time-varying component of H is opened up; in high-inflation periods the capital-tied piece of the classical formula is re-parameterised. (f) Multi-product joint replenishment for shared setup uses the #050 JRP model (separate problem).
3. Field integration. Output is four-layered: (a) per-SKU Q, N, average inventory and annual total cost table** — a master decision document for the purchasing + inventory team, refreshed monthly, (b) supplier order schedule — order dates derived from N* (e.g. 12 orders/year → monthly, 4 orders/year → quarterly), aligned with capacity + transport planning, (c) quantity-discount decision matrix — per supplier, the discount thresholds and at which threshold ordering is the composite Q* + discount optimum, (d) sensitivity-band report — based on uncertainties in D, S, H, the ±20% band of Q*; even if the actual order cannot hit Q* exactly, staying inside the band keeps cost deviation small. Upstream integration: ERP inventory module (demand data D, price data → H component), purchasing module (supplier MOQ, discount tiers), finance-accounting (annual financing rate → H component), warehouse management (per-unit warehouse cost → H component). Quarterly purchasing + inventory committee: re-computation of Q* across the SKU portfolio, field-validation of S and H parameters, renegotiation of quantity-discount contracts, review of SKUs outside the sensitivity band, inflation refresh (monthly in high-inflation periods).
Alternatives
Intuitive rule (monthly stock target or fill-the-MOQ)
FreeZero licence
Who it fits: Very small business, <50 SKUs, single dominant supplier
- + Zero software cost
- + Simple to understand, no training required
- + Supplier MOQ is the direct trigger
- + Acceptable error at low SKU counts
- − Setup vs holding trade-off is not mathematically computed
- − 20-50% deviation from optimum → 10-25% extra annual cost
- − Quantity-discount opportunity missed or wrongly taken
- − H component is not refreshed in a high-inflation environment
- − Above 50 SKUs the employee gets mentally tired, errors multiply
- − $50K-300K/year of missed optimisation
Spreadsheet + economic order quantity formula template (in-house)
FreeZero licence; 1-3 weeks in-house build, employee time
Who it fits: Small-medium business, 50-300 SKUs, a numerate purchasing officer
- + The closed-form calculation runs in 2 minutes
- + Zero software cost, fast start
- + Sensitivity analysis (±20% band) easy in a spreadsheet
- + Quantity-discount tier table can be added
- + Low training need (high-school maths is enough)
- − Manual updates required (demand, setup, holding-cost changes)
- − No automatic integration with the ERP inventory module
- − Weak multi-user synchronisation
- − Insufficient for stochastic demand (#004) or dynamic lot-sizing (#016) — only classical calculation
- − Weak version control and audit trail
ERP inventory module + EOQ configuration
Enterprise$30K-200K licence + $8K-50K/year maintenance (regional SMB ERP market)
Who it fits: Mid business, 200-2000 SKUs, existing ERP backbone
- + Integrated with ERP — demand drawn automatically (sales history), holding-cost components (finance, warehouse) pulled
- + Bulk order-quantity computation across the SKU portfolio
- + Quantity discount, supplier MOQ, lead time fields configurable
- + Automatic purchase requisition trigger
- + Strong audit trail + version control
- − The EOQ module is usually a basic version — extensions (planned shortage, finite production rate, inflation-adjusted) are limited
- − Stochastic (#004) and dynamic lot-sizing (#016) need a separate module
- − Parameter calibration (setup, holding) is still the user's responsibility — wrong input → wrong output
- − ERP licence + rollout 6-12 months
Open-source solver + custom inventory optimisation module
Open SourceLicence free; in-house build 8-20 weeks or $50K-200K consulting
Who it fits: Business with a tech team, ERP integration, multiple EOQ extensions
- + No licence cost
- + Classical calculation + extensions (quantity discount, planned shortage, finite production rate, inflation-adjusted) in one module
- + ERP API integration customisable
- + Setup-vs-holding balance formulations well-defined for open-source solvers
- + Can be extended with stochastic (#004) and dynamic lot-sizing (#016)
- − In-house OR / inventory specialist + software team required
- − Academic prototype to production system: 8-20 weeks
- − Maintenance and version updates are the team's workload
- − Training and operational documentation are in-house
Recommendation
Ask in the meeting
- How is the classical economic order quantity (the closed-form that balances setup against holding cost) implemented in the system — via the formula, or via an intuitive rule (e.g. monthly stock target, min/max)?
- How are the per-order setup cost and per-unit-year holding cost defined — does the user enter them manually, or are they pulled automatically from the ERP's purchasing + finance + warehouse modules?
- Are quantity-discount models (all-units discount and incremental discount) supported, or only the single-price classical calculation?
- Are extensions like planned shortage / backordering, finite production rate (economic production quantity), and perishable shelf-life constraint supported?
- Is an inflation-adjusted variant supported for high-inflation environments — or a time-varying parameterisation of holding cost? Is the capital-tied component dynamic?
- Is sensitivity analysis (±20% band around the optimum, cost-increase report) produced by the system automatically, or does the user compute it manually?
- Is there integration with the reorder-point policy (#004) — are the order-quantity sizing and the timing decision produced jointly, or are they two separate modules?
- If the contract ends, in what standard format (CSV, JSON) can we export the SKU-portfolio order-quantity table, setup and holding-cost parameter history, quantity-discount tier data, and analysis history?
Technical details
Editor’s note
In plain speech this problem is called “how much should I order each time” or “how many months of stock should I hold”. The academic name is Economic Order Quantity (EOQ); the closed-form solution is the Wilson formula Q* = sqrt(2DS/H). Foundational: Harris (1913) derived the formula first in Factory magazine; Wilson (1934) brought it into practice in Harvard Business Review and lent it his name. Modern references: Zipkin (2000) Foundations of Inventory Management; Silver-Pyke-Peterson (1998) Inventory Management and Production Planning and Scheduling; Hadley-Whitin (1963) Analysis of Inventory Systems. The Harris and Wilson papers are considered the birth certificates of inventory management in economic history.
Distinction from other inventory problems: #004 (s,S) reorder point policy addresses stochastic demand + reorder trigger — when to order + how much safety stock. #016 Wagner-Whitin solves period-by-period lot-sizing under time-varying (dynamic) demand — no constant-demand assumption. #011 newsvendor handles single-period perishables (newspaper, fresh flowers, daily meals) — single day, not year. #050 Joint Replenishment Problem (JRP) coordinates multi-product shared setup. #049 Multi-Echelon optimises a depot chain. EOQ is the single-product + deterministic + constant-demand baseline; the four problems above are built by relaxing EOQ’s assumptions. This is why EOQ is the foundation stone of inventory theory — the first formula taught in every inventory course, the first question on every certification exam.
Most-skipped point in the sector: the quantity-discount tier-dependent modification. In practice the supplier offers 5% off above 100 units, 10% off above 500; single-tier classical EOQ is insufficient because the discount threshold artificially pulls Q upward. The right approach: compute Q* per discount tier (H depends on unit cost, so Q* shifts inside each tier), check feasibility (is Q* below or above the tier threshold), compare costs, table-search for the global optimum. All-units quantity discount EOQ (if total order is above threshold, discount applies to all units) and incremental quantity discount EOQ (only units above threshold are discounted) are the two classical variants. The practitioner usually takes the discount intuitively under ‘buy more, pay less per unit’ pressure; this is $20K-100K/year of lost opportunity.
Second skipped point: the cost-flatness property of EOQ is not known, so the intuitive distance from the optimum is tolerated. The most beautiful practical feature of the Wilson formula: the total cost curve is flat around Q* (cost surface flat around the optimum). A ±20% deviation from Q* gives only 2-5% cost increase. This is very practical value: even when supplier MOQ or transport-unit constraints (full truckload, full container) prevent hitting Q* exactly, a nearby quantity gives an acceptable cost deviation. If the practitioner does not know this, they say “we cannot hit Q* exactly, the formula is useless” and revert to the intuitive rule — when in fact the formula’s real value is staying inside the band. Third skipped point: dynamic refresh of the H component in a high-inflation environment. In high-inflation periods the capital-tied rate climbs to 25-45%/year; this component of H changes fast. The classical formula assumes H constant; under that assumption, a Q* computed 6 months ago can be 30-40% above or below today’s real optimum. Fix: inflation-adjusted EOQ (Buzacott 1975, Bierman-Thomas 1977) or monthly recalibration of H.
A step-by-step path for an SMB
Stage 1 — Measure first, compute later. At least 12 months of order + inventory data: per SKU the annual demand D (12-month consumption total), per-order setup cost S (sum of purchasing + logistics + accounting items per order — $50-500 typical for an SMB), per-unit-year holding cost H (unit cost × annual financing rate + per-unit warehouse share + spoilage + insurance). A written documented definition of S and H is critical: which cost items are inside, which are outside; cross-validate with internal audit. Also record the annual total cost outcome of the existing intuitive rule (monthly stock target, fill-the-MOQ) — the baseline for the pilot comparison.
Stage 2 — Build the knowledge capital. Compute the Wilson formula Q* = sqrt(2DS/H) for each SKU (2 minutes in a spreadsheet). Annual order count N* = D/Q*, average inventory Q*/2, annual total cost TC* = sqrt(2DSH). Sensitivity analysis: ±20% band of Q* and the corresponding cost deviation (2-5%). For SKUs with quantity discounts a tier-table: per tier the Q*, tier-bound feasibility, total cost (order + holding + unit cost) — global optimum selected by table-search.
Stage 3 — Pilot. 3-6 months. Apply the Wilson formula on a subset (e.g. the top 30-50 highest-volume SKUs or a single category); keep the rest under the current intuitive rule. The decision still rests with the purchasing officer; the formula recommends. Success criteria written upfront: in the pilot SKUs, setup + holding total cost -15% minimum, tied capital -10% minimum, quantity-discount opportunity capture +5% minimum. Monthly committee monitors plan-vs-actual deviation.
Stage 4 — Rollout. 6-12 months to extend across the full SKU portfolio + ERP inventory module integration + quarterly purchasing committee. Monthly H refresh procedure in a high-inflation environment. Renegotiation of quantity-discount contracts (formula-supported bargaining). SKUs with stochastic demand signals migrate to #004 (s,S); SKUs with dynamic demand signals to #016 Wagner-Whitin; multi-product shared setup to #050 JRP. EOQ is the baseline; the others are layered on top.
Risks — what can go wrong
Demand uncertainty — the deterministic assumption collapses. The most critical assumption of classical EOQ is that demand is constant and deterministic. In the real world demand swings ±20-50% (seasonality, campaigns, customer loss, economic cycle). Static EOQ Q* under ±20% demand swings gives an annual cost deviation of 5-15%. Fix: for SKUs with stochastic demand signals (CV = std-dev/mean > 0.5), migrate to #004 (s,S) reorder point + add safety stock. Use EOQ only on low-CV (CV < 0.3) SKUs.
Inflation — H and S proportion breaks. In high-inflation environments the capital-tied component of H climbs to 25-45%/year; the transport+customs component of S also rises 20-40%/year; but if the two do not move at the same rate, the Q* = sqrt(2DS/H) ratio drifts. A Q* computed 6 months ago can be 30-40% above or below today’s real optimum. Fix: monthly H and S recalibration procedure, inflation-adjusted EOQ extension (Buzacott 1975, Bierman-Thomas 1977), inflation-indexed H component.
Supplier MOQ constraint — Q < MOQ.* If the supplier’s minimum order quantity (MOQ — e.g. full truckload, full container, palletised unit) is below Q*, there is no issue; if above, MOQ is taken by necessity. In that case Q = MOQ is used and the cost deviation is small thanks to cost-flatness (±50% deviation is 10-25% cost rise). But if supplier MOQ is much larger than Q* (e.g. Q* = 200, MOQ = 1000) the cost deviation is serious. Fix: negotiate supplier MOQ (formula-supported), search for alternative suppliers, pool orders within a sector association or group company.
Single-supplier ERP / software lock-in. If the EOQ configuration, S and H parameter history, quantity-discount tier table and EOQ analysis history live in the ERP system, and the contract has no “annual standard-format export (CSV, JSON)” clause, leaving the software means losing years of inventory-optimisation memory. The contract should explicitly cover ownership of the SKU-portfolio Q* table, S/H parameter history, discount tier data and EOQ analysis history.
Solution method — technical view
| Approach | Typical scale | Solve time | Guaranteed optimum? |
|---|---|---|---|
| Intuitive rule (monthly stock target, fill-MOQ) | Very small, <50 SKUs | instant | No, 50-70% optimum |
| Classical Wilson formula (closed-form) | Small-medium, 50-300 SKUs | minutes | Yes, if assumptions hold |
| Quantity-discount EOQ (table-search) | Medium, multi-tier discount | minutes | Yes, within tiers |
| Planned-shortage EOQ | Backorder allowed | minutes | Yes (closed-form) |
| EPQ — Economic Production Quantity (finite rate) | Known production rate, in-house | minutes | Yes (closed-form) |
| Inflation-adjusted EOQ (Buzacott 1975) | High-inflation environment | minutes-hours | Yes (parameters current) |
| Perishable shelf-life EOQ | Short shelf-life product | minutes | Yes (if constraint inactive) |
| Integrated with #004 s,S (stochastic) | Uncertain demand | hours | Stochastic optimum |
Objective function choice:
- Objective 1 — Minimum total annual cost (setup + holding): Classical EOQ objective; most common.
- Objective 2 — Minimum tied capital (working capital): For cash-constrained businesses; lower average inventory Q*/2.
- Objective 3 — Annual order count within a target band: For supplier-relationship management or operational simplicity (e.g. monthly cadence).
- Objective 4 — Service level (stockout rate) within a target band: Integrated with #004; EOQ + safety stock together.
Multi-objective: weighted sum (cost + tied capital) or hierarchical (first the service-level constraint, then total cost).
EOQ variants — pick by the field:
- Classical EOQ (Harris 1913, Wilson 1934): Single-product, deterministic, constant demand, instant delivery, no shortage.
- Quantity-discount EOQ (all-units / incremental): When the supplier offers a discount tier; table-search gives the global optimum.
- Planned-shortage / backordering EOQ: Stockouts consciously allowed; backorder cost b/unit-year.
- EPQ — Economic Production Quantity (Taft 1918): Not instantaneous delivery, production rate P > D.
- Perishable / shelf-life EOQ: For expiring products: Q ≤ demand × shelf-life as a constraint.
- Inflation-adjusted EOQ (Buzacott 1975, Bierman-Thomas 1977): Time-varying component of H for high-inflation.
- EOQ + safety stock (bridge to #004): For demand uncertainty, EOQ Q* sizing + (s,S) timing + safety stock together.
Academic references
Listed in the page frontmatter under sources. Harris (1913) and Wilson (1934) foundational; Zipkin (2000) and Silver-Pyke-Peterson (1998) modern references; Hadley-Whitin (1963) the mathematical foundation; Buzacott (1975) and Bierman-Thomas (1977) the inflation-adjusted extension.
Sources
- Harris, F. W. (1913). How many parts to make at once. Factory, The Magazine of Management, 10(2), 135-136, 152. The foundational paper that first derives the EOQ formula.
- Wilson, R. H. (1934). A scientific routine for stock control. Harvard Business Review, 13(1), 116-128. The work that brought EOQ into practice and gave it its name.
- Zipkin, P. H. (2000). Foundations of Inventory Management. McGraw-Hill. Modern reference book on inventory theory.
- Silver, E. A., Pyke, D. F. and Peterson, R. (1998). Inventory Management and Production Planning and Scheduling (3rd ed.). Wiley. Practical handbook on inventory management.
- Hadley, G. and Whitin, T. M. (1963). Analysis of Inventory Systems. Prentice-Hall. Mathematical analysis of inventory systems.
- Buzacott, J. A. (1975). Economic order quantities with inflation. Operational Research Quarterly, 26(3), 553-558. Inflation-adjusted EOQ extension.
- Bierman, H. and Thomas, J. (1977). Inventory decisions under inflationary conditions. Decision Sciences, 8(1), 151-155. Inventory decision under inflationary conditions.
- YÖK Thesis Center — keyword: ’ekonomik sipariş miktarı’ or ‘EOQ’ or ‘Wilson formülü’ — 40+ theses from TR academia (one of the most-published inventory topics). tez.yok.gov.tr
Glossary
- EOQ
- The classic inventory formula for the most economic order quantity to place with a supplier.
- Wilson Formula
- The closed-form solution Q* = sqrt(2DS/H) derived by Wilson (1934) for the EOQ problem, giving the cost-minimising order quantity under deterministic constant demand D, fixed setup cost S, and per-unit-year holding cost H.
- EOQ Extensions
- The family of relaxations and extensions to the classical Economic Order Quantity model — quantity discounts (all-units / incremental), planned shortages / backordering, finite replenishment rate (EPQ), perishable / shelf-life constraints, multi-item joint ordering, and inflation-adjusted variants.
- Safety Stock
- Extra stock held against demand and lead-time uncertainty — protects against stockouts during unexpected swings.
Related problems
A New Part Order Arrives — How Do I Get the Optimal Operation Sequence + Machine Choice + Setup?
If you are an SMB CNC manufacturer, tooling shop or engineering workshop producing 50-500 different parts, every new order puts the same decision in front of you: you take the customer's CAD model and have to work out on which machine, in which order, with which tool and fixture, and in how many setups the part will be made. If you simply write down the first feasible sequence that comes to mind, setup time grows 3-5x and parts that miss tolerance are reworked; finding the right sequence means comparing several alternative routings for the same part. When the decision lives only in one engineer's head, the similar-part memory walks out of the door when that engineer leaves, and routings of older parts are not refreshed when a new machine is bought. This page is for production-engineering teams who want to make the operation sequence and the machine assignment written and comparable as the bridge from design to make.
Backward from the Customer Order — Which Raw Material, When, and How Much Should I Order?
For mid-size manufacturing SMBs running 50-500 end items and 200-2,000 raw materials and sub-components (automotive Tier-2, white-goods component shops, furniture and assembly, machinery). With each product's parts list (BOM) and each part's procurement or production lead time on file, the question is: a customer orders 200 units of product X with a fixed delivery week — which raw materials in what quantity must be ordered which week, and which sub-parts must enter assembly when? Material requirements planning (academic name MRP) answers this question backwards from the delivery date and is the core logic underneath every ERP. Done on paper or by 'my supplier always takes 3 weeks' rules of thumb, you either run out and stop the line, or burn cash on excess stock.
Five Suppliers Quote the Same Part — How Much Do I Buy from Each?
You run a manufacturer with 20-200 staff and buy the same raw material or component from 4-8 different suppliers. Each supplier differs on price, quality, lead time, capacity, payment terms, and financial stability; deciding who stays on the approved list and how much of each order goes to whom are two separate calls. A wrong pick can trigger a months-long quality crisis or stop the line when a single supplier fails; the 'cheapest bid wins' approach hides quality, late-delivery, and compliance costs and ends up 15-40% more expensive. Scoring 5-15 bids across 8-12 criteria by hand in a spreadsheet becomes inconsistent fast.