EOQ formula: how to calculate economic order quantity, with a worked example

Economic order quantity (EOQ) tells you how many units to buy per order so that the cost of placing orders and the cost of holding stock add up to the smallest total. Below is the formula, one example worked from start to finish, and the checks I run before trusting the answer.

The EOQ formula

Every time you order, you pay a fixed amount: the delivery, the paperwork, the time someone spends receiving and checking the goods. Every unit you keep on the shelf also costs you something each year: the cash tied up in it, the space, insurance, breakage and items that expire. Big orders mean few deliveries but a lot of stock. Small orders mean little stock but many deliveries. EOQ is the order size where the two costs balance.

EOQ = √( 2 × D × S / H ) D = annual demand (units per year) S = cost of placing one order H = cost of holding one unit for one year

If you only know the holding cost as a percentage of the item price (20% to 30% a year is common), multiply: H = holding % × unit cost.

Worked example: a coffee supplier

A small supplier sells 1 kg bags of roasted coffee to cafés. The numbers:

  • Annual demand D = 4,800 bags (about 400 a month).
  • Each order from the roaster costs S = $45 in transport and handling, whatever the size.
  • Each bag costs $8, and holding stock costs 25% of its value per year, so H = 0.25 × $8 = $2 per bag per year.

Step 1: the order quantity

EOQ = √(2 × 4,800 × 45 / 2) = √216,000 = 464.76 bags. In practice you order about 465 bags at a time.

Step 2: how often you order

Orders per year = D / EOQ = 4,800 / 464.76 = 10.33. That is one order roughly every 35 days. Average stock on the shelf is EOQ / 2 = 232 bags.

Step 3: the yearly costs

Cost per yearFormulaAmount
OrderingD / Q × S$464.76
HoldingQ / 2 × H$464.76
Ordering + holding$929.52
PurchasesD × unit cost$38,400

Notice that ordering cost and holding cost are equal at the EOQ. That is not a coincidence. It is the property that defines the optimum, and it gives you a quick way to check your arithmetic.

Is the exact EOQ worth chasing?

Usually not. Suppose the supplier prefers to order once a month, 400 bags each time. Ordering cost becomes 4,800 / 400 × 45 = $540 and holding cost 400 / 2 × 2 = $400, a total of $940. That is only $10.48 a year more than the EOQ. The cost curve is flat near the bottom, so rounding to a full pallet, a carton multiple or a fixed weekday costs very little. Being far off (ordering 50 bags at a time, or 2,000) is what hurts.

Checking a quantity discount

Now the roaster offers $7.60 a bag instead of $8 for orders of at least 1,000 bags. EOQ alone cannot answer this, because the purchase price changes. Compare the total yearly cost of both options, purchases included:

  • At the EOQ and the normal price: $39,329.52 a year.
  • At 1,000 bags and $7.60: holding cost per bag drops to 25% × $7.60 = $1.90. Ordering = 4,800 / 1,000 × 45 = $216, holding = 500 × $1.90 = $950, purchases = 4,800 × $7.60 = $36,480. Total $37,646.

The discount saves $1,683.52 a year, so it is worth taking, provided you have room for 1,000 bags and the coffee stays fresh for the 76 days it takes to sell them. That last condition matters more than the formula for anything that expires.

Common mistakes

  • Mixing time units. D must be per year if H is per year. Monthly demand with a yearly holding cost gives an EOQ that is far too small (by a factor of √12, about 3.5).
  • Putting the unit price into S. S is the cost of one order, not the cost of the goods in it. The price only enters through H and through the purchase total.
  • Using the full shelf rent as holding cost. Count only costs that change with the amount of stock. Rent you pay anyway is not part of H.
  • Forgetting safety stock. EOQ answers “how much per order”. It does not answer “when to order”. For that you need a reorder point with a buffer for uneven demand.
  • Treating the result as exact. D, S and H are estimates. Round to a practical lot and move on.

Run your own numbers

The free EOQ Calculator does this math as you type and shows each step. No sign-up, and your numbers stay in your browser.

Frequently asked questions

What is the EOQ formula?

EOQ = √(2DS / H), where D is annual demand in units, S is the cost of placing one order and H is the cost of holding one unit for a year. With D = 4,800, S = $45 and H = $2 the EOQ is about 465 units.

Why are ordering cost and holding cost equal at the EOQ?

Ordering cost falls as the order size grows and holding cost rises in a straight line. The total of the two is lowest exactly where the two lines cross, so at the EOQ both costs are the same. If your numbers do not show this, check the arithmetic.

How do I estimate the holding cost?

Add up the yearly costs that grow with the amount of stock: the interest or return you lose on the cash tied up, insurance, spoilage, theft and extra storage. Divide by the value of the average stock. Most businesses land between 15% and 30% of the item cost per year.

Does EOQ work when demand is seasonal?

Only roughly. The formula assumes steady demand. For seasonal items, calculate EOQ per season with that season’s demand rate, or plan orders period by period instead.

Should I always take a bulk discount?

Compare total yearly cost with purchases included, as in the example above. A discount usually wins when the price cut is larger than the extra holding cost, but check storage space, cash flow and shelf life before you sign.

Elio Saliba is an industrial engineering student at LAU in Lebanon. He builds and tests every calculator on this site. About the site

More guides