Order too little at a time and ordering costs eat you; order too much and holding costs do. Between the two sits one optimal lot size, and it has a formula — the economic order quantity, the most famous square root in operations management. This EOQ calculator takes annual demand, the cost of placing an order, and the annual holding cost per unit, and returns the optimal order quantity, the orders per year it implies, the cycle time, and the minimum yearly cost of the ordering-plus-holding system.
The EOQ Formula
EOQ = √( 2DS ÷ H ), where D is annual demand in units, S the fixed cost of placing one order, and H the cost of holding one unit for one year. The derivation is a balance: ordering cost per year (D ÷ Q) × S falls as the lot Q grows, holding cost per year (Q ÷ 2) × H rises as it grows, and the total is minimized where the two curves cross. At that crossing, annual ordering cost exactly equals annual holding cost — a built-in check on any EOQ answer, and the reason the minimum total cost equals √(2DSH).
Worked Example: 10,000 Widgets a Year
Demand D = 10,000 units, ordering cost S = 50, holding cost H = 2 per unit per year. EOQ = √(2 × 10,000 × 50 ÷ 2) = √500,000 ≈ 707 units per order. That means about 14.14 orders a year — a fresh order every 25.8 days — and a minimum combined annual cost of √2,000,000 ≈ 1,414.21, split evenly: 707.11 of ordering cost and 707.11 of holding cost. Order 500 at a time instead and the total rises to about 1,500; order 1,000 and it is about 1,500 the other way. The curve is forgiving near the optimum and punishing far from it.
Reading the Inputs Honestly
The formula is exact; the inputs are estimates, and their honesty decides everything. Ordering cost S is the full cost of one order cycle: purchasing staff time, receiving, inspection, invoice processing, and any per-delivery freight — not just a courier fee. Holding cost H bundles the cost of capital tied up in stock (the biggest piece, often 8 to 15 percent of unit value per year), warehouse space, insurance, shrinkage and obsolescence; practitioners estimate total holding at 20 to 30 percent of inventory value annually. Demand D should be a forecast for the coming year, not last year’s actuals by default.
The Square Root’s Mercy
Because EOQ scales with the square root of demand, errors are damped: if demand doubles, the optimal lot grows only by √2 ≈ 41 percent, and if your demand estimate is off by 20 percent, the lot size is off by under 10 percent — and the cost penalty for ordering the slightly wrong quantity is smaller still, since the total-cost curve is flat near its minimum. EOQ is robust to the messy inputs real businesses feed it, which is a large part of why a 1913 formula (Ford Whitman Harris) still runs warehouses today.
Assumptions and Their Modern Extensions
Classic EOQ assumes constant demand, instant replenishment, no stockouts allowed, and no quantity discounts. Reality relaxes each in turn: the production order quantity model handles gradual replenishment (you make it while you use it), safety stock formulas layer a buffer over lead-time demand variability, quantity-discount EOQ compares the optimum at each price break because a cheaper unit price can justify a bigger lot, and perishables cap the lot at shelf life regardless of what the square root says. The base model in this calculator is the reference point all of those adjust from.
Common Mistakes
Feeding monthly demand into an annual-cost formula (or the reverse) scales the answer by √12. Using the purchase price as the holding cost, instead of the carrying rate times the price, inflates H and shrinks lots toward stockout territory. Ordering exactly the EOQ when pack sizes, truck capacities, or shelf space dictate nearby round numbers is false precision — the flat cost curve means the nearest practical quantity is almost as good, and this calculator’s cost readout lets you price the rounding. Finally, computing EOQ once and framing it: demand and costs drift, and the optimum should be recomputed when they do.
Related Tools
Operations and finance continue in the Finance Calculators hub — pair EOQ with the Moving Average Calculator for demand smoothing and the Burn Rate Calculator for the cash that inventory consumes.
Frequently Asked Questions
How do you calculate EOQ?
EOQ = square root of (2 × annual demand × ordering cost / holding cost per unit per year). For D = 10,000, S = 50 and H = 2, EOQ is about 707 units.
What costs does EOQ balance?
Ordering costs, which fall per year as lots get bigger and orders get rarer, against holding costs, which rise as average inventory grows. The optimum sits where annual ordering cost equals annual holding cost.
What is the total cost at the EOQ?
Minimum annual ordering-plus-holding cost = square root of (2 × D × S × H) — about 1,414 for the worked example — excluding the purchase cost of the goods themselves, which does not depend on lot size unless discounts apply.
How many orders a year does the EOQ imply?
Annual demand divided by EOQ. 10,000 / 707 is about 14.14 orders a year, a cycle of roughly 26 days between orders.
What if my demand estimate is wrong?
EOQ forgives: the lot size scales with the square root of demand, so a 20 percent demand error moves the optimal lot by under 10 percent, and the flat total-cost curve near the optimum keeps the cost penalty smaller still.
Does EOQ account for safety stock?
No — the classic model assumes steady demand and certain lead times. Businesses add safety stock on top of the EOQ cycle stock, sized from demand variability and the service level they target.
What holding cost rate should I use?
A common planning range is 20 to 30 percent of the item’s value per year, covering capital cost, space, insurance, shrinkage and obsolescence. Multiply the unit value by your rate to get H per unit per year.