Economic order quantity (EOQ) is the order size that minimizes total inventory cost by balancing ordering cost against holding cost. The formula is EOQ = the square root of (2 x annual demand x cost per order, divided by holding cost per unit per year), or the square root of 2DS/H.

Order too little at a time and you place orders constantly, racking up ordering cost and risking stockouts. Order too much and you drown in holding cost, tying up cash and warehouse space in stock that sits. EOQ is the century-old answer to the question hiding between those two mistakes: what single order size costs the least overall. This post derives the formula, works a full numeric example, and lays out the assumptions that decide whether you can trust the answer.

What is economic order quantity?

Economic order quantity is the fixed order size that minimizes the combined cost of ordering and holding inventory over a year. It sits at the point where those two costs balance: order in bigger batches and you order less often but hold more; order in smaller batches and you hold less but order more often. EOQ is the batch size where the total of the two is at its lowest.

The model dates to Ford W. Harris, who published it in 1913, and it is often called the Wilson formula after the consultant who popularized it in the following decades. More than a century on, it remains the reference point for lot sizing, less because plants punch the formula into a calculator every day and more because it captures the core trade-off every inventory decision fights: the tension between the cost of transacting and the cost of holding.

What is the EOQ formula and why does it work?

The EOQ formula is Q* = sqrt(2DS/H), where D is annual demand in units, S is the fixed cost of placing one order, and H is the cost to hold one unit for a year. It works because it finds the bottom of a total-cost curve built from two opposing pieces. Annual ordering cost is (D/Q) x S: the more you buy per order, the fewer orders you place. Annual holding cost is (Q/2) x H: average inventory is half the order quantity, so bigger orders mean more stock on the shelf on average.

EOQ sits at the bottom of the total-cost curveEOQ is where total cost bottoms outannual costorder quantity Qordering cost (D/Q)Sholding cost (Q/2)Htotal costEOQ
Ordering cost falls with bigger orders; holding cost rises. Total cost is lowest where the two are equal, which is the EOQ.

There is an elegant fact buried in the math: at the EOQ, annual ordering cost exactly equals annual holding cost. That equality is not a coincidence; it is what defines the minimum of the total-cost curve. It also gives you a quick sanity check. Compute both costs at your chosen order size, and if they are wildly different, you are ordering in the wrong batch.

How do you calculate EOQ, step by step?

Work it as a short procedure. We will run a concrete example alongside: annual demand of 10,000 units, an ordering cost of $50 per order, and a holding cost of $4 per unit per year.

  1. Nail down annual demand (D). Use units per year over a stable window. Here D = 10,000 units.
  2. Nail down ordering cost (S). The fixed cost per purchase order: buyer time, setup, receiving. Here S = $50 per order.
  3. Nail down holding cost (H). The annual cost to carry one unit: capital, storage, insurance, obsolescence. Here H = $4 per unit per year.
  4. Plug into the formula. EOQ = sqrt(2 x 10,000 x 50 / 4) = sqrt(1,000,000 / 4) = sqrt(250,000) = 500 units.
  5. Convert to a cadence. Orders per year = D / EOQ = 10,000 / 500 = 20 orders, roughly one every 18 days on a 365-day year.
  6. Sanity-check the two costs. Ordering cost = 20 x $50 = $1,000; holding cost = (500/2) x $4 = $1,000. They match, confirming 500 is the balance point.

So the total relevant cost at the EOQ is $2,000 a year, and any other order size, larger or smaller, costs more. Order 1,000 at a time and holding cost jumps to $2,000 while ordering cost falls to $500, for a worse total of $2,500. The curve is real money.

Order size QOrders per year (D/Q)Ordering cost (D/Q)SHolding cost (Q/2)HTotal
25040$2,000$500$2,500
500 (EOQ)20$1,000$1,000$2,000
1,00010$500$2,000$2,500

Notice how flat the bottom is. Ordering 400 or 600 instead of exactly 500 barely moves the total, which is good news: EOQ is a target to aim near, not a number to hit to the unit. That flatness is why rounding EOQ to a case pack or a pallet quantity rarely costs much.

How does EOQ change when demand or costs change?

Because the formula lives under a square root, EOQ responds to its inputs slowly, and that surprises people. Double the annual demand and the economic order quantity does not double; it rises by only about 41 percent, the square root of two. Quadruple demand and the order size merely doubles. The same square-root damping applies to ordering cost: cheaper ordering, from automation that drops the cost per purchase order, shrinks the batch, but gently. Holding cost pushes the other way, in the denominator, so more expensive carrying costs pull the batch down.

How EOQ responds to demand, ordering cost, and holding costThe square root damps every inputdemand D upEOQ uporder cost S upEOQ uphold cost H upEOQ downDouble the demand and EOQ rises only ~41%, the square root of two, not double.
EOQ is robust: because it sits under a square root, big swings in demand or cost move the order size only modestly.

The practical upshot is reassuring. You do not need a perfect demand number to get a useful EOQ, because a demand estimate that is off by a fifth moves the order size by only about a tenth. That robustness is a big part of why the century-old formula still earns its keep.

What assumptions does EOQ make?

EOQ buys its clean answer with strong assumptions, and knowing them tells you when to trust it. The model assumes demand is known and steady, lead time is constant, the whole order arrives at once, unit price does not change with quantity, and stockouts do not happen. Under those assumptions inventory follows a perfect saw-tooth: it draws down at a steady rate, hits zero, and instantly refills to the order quantity.

The saw-tooth inventory profile EOQ assumesSteady draw-down, instant refillon-hand unitstimeavg = Q/2order size Qrefill at zero
The idealized saw-tooth: average on-hand is half the order quantity, which is exactly the Q/2 in the holding-cost term. This is the cycle stock EOQ sizes.

Real demand is lumpy, lead times wobble, and suppliers impose minimum order quantities and quantity discounts, so the saw-tooth is never perfect. That is why EOQ pairs with a separate buffer, safety stock, to absorb the variability the model ignores. EOQ sizes the working batch, the cycle stock that turns over each replenishment, while safety stock covers the noise on top. The two decisions are separate and you make them separately.

What do the numbers say?

Some context on why lot sizing is worth getting roughly right:

The takeaway is that EOQ is not a precise oracle; it is a well-anchored starting point that keeps lot sizes from drifting to either expensive extreme.

Where EOQ breaks in practice

The formula is only as good as its three inputs, and in most operations all three are soft. Ordering cost gets guessed, holding cost is rarely measured honestly, and annual demand is pulled from a forecast that is already wrong at the edges. Worse, those numbers live in different systems: demand in an ERP, holding cost buried in finance, ordering effort nowhere at all. When the inputs are stale or scattered, the EOQ you compute is a confident answer to the wrong question. Harmony is an AI-native layer that connects machines, software, and paperwork into one operational layer, with no rip-and-replace, so usage, order history, and stock movements become one live record instead of three. AI search returns cited answers across those records, so a planner can ask what an item's real annual usage has been or which parts are being ordered in uneconomic batches and get a real answer, and Harmony's digital workflows route each reorder to the right person. It is not an inventory-optimization product; it keeps the inputs to EOQ honest by keeping the data in one place, the same paper-to-digital move Harmony makes on the floor (see the CLS case study and the product overview). Trustworthy usage data is also what lets you tier items with ABC analysis so you only sweat the lot sizing that matters, size the safety stock that rides on top of the cycle stock, watch inventory turnover improve, and keep the excess inventory that oversized batches create from piling up in the first place.