Economic Order Quantity (EOQ) Calculator

Economic order quantity is the batch size that makes the sum of ordering cost and holding cost as small as it can be. Order in small lots and you pay the fixed cost of placing, receiving and inspecting an order too many times a year; order in huge lots and you pay to finance, store, insure and eventually write down stock that sits. This calculator solves the classic Wilson formula for that balance point, rounds it to your case pack, and shows the ordering, holding and total annual cost at the answer — plus how flat the cost curve is around it.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
DemandUnits you expect to sell or consume over the period selected — use a forward-looking forecast, not last year's actuals alone.12000 units
Fixed cost per orderEverything an order costs regardless of size: buyer time, PO processing, freight minimum, inspection, receiving and put-away.250 $
Landed cost per unitThe value you carry the item at, including freight-in and duty — that is what the carrying-cost percentage applies to.12.5 $
Holding cost given asPercent is how finance normally states carrying cost; dollars per unit is how a warehouse states it.Percent of unit cost per year
Annual carrying cost rateCost of capital plus storage, insurance, shrinkage and obsolescence; 15%–30% a year is the usual range.22 % of unit cost / yr
Annual holding cost per unitDollars it costs to keep one unit in stock for a full year, all causes combined.2.75 $ / unit / yr
Order multiple (case pack)Smallest increment the supplier will ship — inner carton, master carton or pallet quantity. Enter 1 if any quantity is allowed.1 units
Days in the planning yearUsed only to convert orders per year into days between orders. Pick calendar days for retail, working days for a plant.365 calendar days

It returns

  • Economic order quantity — The theoretical minimum-cost lot size, before rounding to a case pack.
  • Order quantity rounded to case pack
  • Orders per year
  • Days between orders
  • Annual ordering cost
  • Annual holding cost
  • Total relevant cost (ordering + holding) — The quantity you choose only affects this figure — purchase cost is the same whatever the lot size.
  • Total annual cost including purchases

The formula

Q*=2DSH
TC(Q)=DSQ+QH2
TC(Q)TC(Q*)=12(QQ*+Q*Q)

In plain text: Q* = √(2 · D · S / H)

  • Q*Economic order quantity — the minimum-cost lot size (units)
  • DDemand over the planning year (units/yr)
  • SFixed cost of placing and receiving one order ($/order)
  • HCost of holding one unit in stock for one year ($/unit/yr)

H is often quoted as a percentage k of unit cost C, so H = k·C. The formula assumes constant demand, instantaneous replenishment, no stockouts and a unit price that does not vary with order size.

Updated Category Inventory, Shipping & Landed Cost Verified against published test cases Reading time 14 min

The question EOQ actually answers

EOQ answers one narrow question well: given steady demand for an item, how many units should be on each purchase order? It does not tell you when to order — that is the reorder point — and it does not tell you how much buffer to keep against variability, which is safety stock. It answers batch size only.

The reason batch size has an optimum is that two costs pull in opposite directions. Every order carries a fixed cost that does not care how many units are on it: the buyer's time raising and chasing the PO, the freight minimum, the inbound inspection, the receiving and put-away labour, the accounts-payable transaction. Order twelve times a year instead of four and you pay that three times as often.

Against that sits holding cost. Stock you own is capital you cannot use elsewhere, plus rack space, insurance, cycle counting, damage, theft and the risk that the item is obsolete before it sells. Holding cost is proportional to the average inventory you carry, and with steady demand average inventory is half the order quantity. Double the order quantity and you double the holding bill.

Ordering cost per year falls as 1/Q; holding cost rises linearly in Q. A falling curve crossing a rising line has a minimum, and the EOQ is where it sits. Ford W. Harris published the derivation in 1913 for a printing company; R. H. Wilson popularised it in the 1930s, which is why practitioners still call it the Wilson formula.

Reading the formula: why a square root, and why the two costs are equal at the optimum

Total relevant cost for a year is the sum of the two curves:

TC(Q) = (D/Q)·S + (Q/2)·H

The first term counts orders — annual demand divided by lot size, times the fixed cost each. The second term prices average inventory — half the lot, times the annual cost of holding one unit. Purchase cost D·C is deliberately absent, because with a flat unit price it is the same whatever Q you choose, so it cannot influence the optimum.

Differentiate and set to zero: −DS/Q² + H/2 = 0, so Q² = 2DS/H and Q* = √(2DS/H). The square root is not a quirk. It is why the answer is so insensitive: to double the EOQ you must quadruple either demand or the order cost, or quarter the holding cost.

Two consequences are worth memorising. First, at Q* the two cost terms are exactly equal — substitute Q* back in and each side comes to √(DSH/2). If your ordering and holding costs are not equal, you are not at the EOQ, and the larger one tells you which way to move. Second, the minimum total is TC(Q*) = √(2DSH), a clean closed form you can check in your head.

Getting H right is the hard part

D and S are usually knowable. H is where estimates go wrong, because most people count only warehouse rent. A defensible carrying rate stacks: cost of capital (your real borrowing rate or hurdle rate), storage and handling, insurance and taxes, shrinkage and damage, and obsolescence or markdown risk. Add them and most product businesses land between 15% and 30% a year — fashion and electronics higher because obsolescence dominates, staple commodities lower. Apply that rate to landed cost, not the supplier's invoice price, because landed cost is what you have tied up.

Worked example: 12,000 units a year, $250 per order, 22% carrying cost

You sell 12,000 units a year of an item that lands at $12.50. Raising and receiving a purchase order costs you $250 all-in. Your finance team puts carrying cost at 22% a year.

  1. Convert the carrying rate to dollars. H = 22% × $12.50 = $2.75 per unit per year.
  2. Build the numerator. 2 × D × S = 2 × 12,000 × $250 = 6,000,000.
  3. Divide by H. 6,000,000 ÷ 2.75 = 2,181,818.
  4. Take the square root. √2,181,818 = 1,477 units. That is the EOQ.
  5. Orders per year. 12,000 ÷ 1,477.1 = 8.12 orders.
  6. Days between orders. 365 ÷ 8.12 = 44.9 days, so roughly every six and a half weeks.
  7. Ordering cost. 8.12 × $250 = $2,031.
  8. Holding cost. (1,477.1 ÷ 2) × $2.75 = 738.5 × $2.75 = $2,031. Equal, as the algebra promised.
  9. Total relevant cost. $2,031 + $2,031 = $4,062. Check against the closed form: √(2 × 12,000 × 250 × 2.75) = √16,500,000 = $4,062. ✓
  10. Total including purchases. $4,062 + 12,000 × $12.50 = $154,062.

Now test the answer against a practical round number. Suppose the supplier ships in pallets of 500 and you order 1,500. TC(1,500) = (12,000 ÷ 1,500) × 250 + (1,500 ÷ 2) × 2.75 = $2,000 + $2,062.50 = $4,062.50 — fifty cents worse than the theoretical optimum on a $154,000 spend. That flatness is the most useful property of the model, and the reason you should never argue about the last twenty units.

How to read the result: the cost curve is flatter than you think

Treat the EOQ as the centre of a comfortable range, not a target to hit. The cost penalty for missing it follows an exact formula: TC(Q)/TC(Q*) = ½(Q/Q* + Q*/Q). Order 20% more than the EOQ and you pay 1.7% more in total relevant cost. Order half as much, or twice as much, and you pay exactly 25% more. Nothing in between is expensive.

That has three practical consequences. Round to the case pack, the pallet or the container without guilt. Prefer the round number that also gives you a clean reorder cycle — a flat 1,500 units, three pallets of 500, beats 1,477 every 44.9 days for a planner who has to live with it. And spend your effort on the inputs instead: because the EOQ varies with 1÷√H, overstating your holding cost by 30% pulls the EOQ down by only 12%, but a wrong order cost — for example, forgetting that a below-minimum freight order carries a surcharge — can be off by a factor of two.

Look next at orders per year and sanity-check it against how you actually buy. More than one order a week says you should be negotiating a blanket order with scheduled releases rather than raising individual POs; the fixed cost per release is much lower than a full PO cycle, which changes S and therefore the EOQ. Fewer than two orders a year says the order cost is dominating and it is worth asking whether it is genuinely fixed.

Finally, convert the answer into a turn rate and see whether it is one your business can live with. With an EOQ of 1,477 on 12,000 units of annual demand and no safety stock, average inventory is 739 units, which is about 16 inventory turns a year. If your category norm is four turns, the EOQ is telling you your competitors are carrying too much — or that their order costs are much higher than yours.

Cost penalty for ordering off the EOQ

Exact values of TC(Q)/TC(Q*) = ½(Q/Q* + Q*/Q). The total-cost curve is quadratic near its minimum, so small errors cost almost nothing.
Order quantity as a multiple of EOQTotal relevant cost vs minimumExtra cost
0.50 ×1.250+25.0%
0.60 ×1.133+13.3%
0.70 ×1.064+6.4%
0.80 ×1.025+2.5%
0.90 ×1.006+0.6%
1.00 × (EOQ)1.0000.0%
1.10 ×1.005+0.5%
1.25 ×1.025+2.5%
1.50 ×1.083+8.3%
2.00 ×1.250+25.0%
3.00 ×1.667+66.7%

The penalty is symmetric in the ratio: ordering half the EOQ costs exactly as much extra as ordering double it. Anything between 0.7 and 1.4 times the EOQ is within 7% of optimal.

If the supplier offers a quantity discount, EOQ alone is the wrong tool

The plain EOQ assumes unit price does not depend on order size. When a supplier offers a price break, the purchase cost term D·C stops being constant and must be brought back into the comparison. The standard procedure is short: for each price tier, compute the EOQ using that tier's unit cost; if the EOQ is not feasible in that tier, use the tier's minimum quantity instead; then evaluate full total cost — purchases plus ordering plus holding — at each candidate and take the cheapest.

Put numbers on it with the worked example below. A 2% break on the $150,000 annual purchase saves $3,000 a year. Total relevant cost at the EOQ is $4,062, and ordering double the EOQ raises that by only 25%, or $1,015. The discount is worth nearly three times the penalty, so you take it. That is the shape of the comparison: the discount is a percentage of a large number, the penalty a percentage of a small one, so the EOQ's job becomes checking that the extra holding cost stays below the discount rather than finding the exact minimum.

Where EOQ estimates go wrong

  • Counting only warehouse rent as holding cost. Capital, insurance, shrinkage and obsolescence usually exceed rent. Understate H and the EOQ comes out too high.
  • Treating variable freight as a fixed order cost. Freight that scales with volume belongs in unit cost, not in S. Only the truly per-order part — the minimum charge, the paperwork, the inspection — is S.
  • Using purchase price instead of landed cost. Carrying cost applies to the money tied up, which includes freight-in and duty.
  • Applying it to lumpy or seasonal demand. EOQ assumes a flat demand rate. For a product with a Christmas peak, use a period order quantity or a lot-sizing heuristic instead.
  • Applying it to perishables or short-life goods. If the item expires, shelf life caps the order quantity regardless of what the formula says.
  • Ignoring the case pack and container fill. An EOQ of 1,477 is useless if the master carton is 240 and a full container is 12,000. Round to what the supply chain can actually ship.
  • Recalculating monthly and chasing the number. The curve is flat; changing lot size every month adds transaction cost and destabilises the supplier. Review quarterly or when an input moves by a third.

The model's assumptions, and what to use when they break

The Wilson EOQ rests on five assumptions: demand is known and constant; the whole order arrives at once; lead time is known and does not vary; unit cost is independent of order size; and stockouts do not happen. Real supply chains violate all five to some degree, which is why the model is a planning aid rather than a control rule.

When an assumption breaks badly, there is a named extension:

  • Replenishment is not instantaneous — you make the item, or the supplier delivers over time. Use the economic production quantity, which multiplies the EOQ by √(1/(1 − d/p)) where d is demand rate and p production rate.
  • Unit cost falls at volume — use the quantity-discount procedure above.
  • Demand is lumpy or time-varying — use the Wagner-Whitin dynamic lot-sizing algorithm, or a period order quantity that covers a fixed number of weeks.
  • Demand and lead time are uncertain — EOQ still sets the lot size, but you must add safety stock and a reorder point on top. The two decisions are separable in the standard continuous-review (Q,R) policy, which is exactly why this calculator and the reorder-point calculator are separate tools.
  • Shelf life or space is binding — treat the constraint as a hard cap and take the lower of the cap and the EOQ.

One more limit worth naming: EOQ optimises cost, not service. It says nothing about fill rate, and following it with no buffer stock guarantees you run out during any demand spike. Cost minimisation and availability are separate objectives, and the second one usually matters more to a customer.

How EOQ fits with the rest of inventory planning

A working replenishment policy needs three numbers, and EOQ is one of them. How much comes from EOQ, adjusted to case pack and container fill. When comes from the reorder point: average daily demand times lead time, plus safety stock. How much buffer comes from a service-level decision against demand and lead-time variability.

Downstream, the lot size you choose drives the financial statements. Average inventory of half the order quantity plus safety stock is what shows up on the balance sheet, feeds days inventory outstanding, and consumes working capital. A planner who doubles every lot size to reduce PO admin has just moved cash out of the bank and into the racks, and the EOQ is the number that tells you whether the trade was worth it.

Lean and just-in-time practice attacks the problem from the other end. Rather than accept S as given and optimise Q, it drives S down — standardised ordering, EDI, kanban pulls, supplier-managed replenishment — so that small lots become economic. The formula agrees: cut the order cost by a factor of nine and the EOQ falls by a factor of three. That is the mathematical case for setup reduction, and it is why EOQ and lean are complements rather than rivals.

Key terms

Ordering cost (S)
The cost of placing and receiving one replenishment order, independent of its size: buyer time, PO administration, freight minimums, inbound inspection, receiving labour and invoice processing.
Holding cost (H)
The annual cost of keeping one unit in stock: cost of capital, storage, insurance and taxes, shrinkage and damage, and obsolescence risk. Often expressed as a percentage of unit value.
Total relevant cost
Ordering cost plus holding cost — the only two costs the lot-size decision changes. Purchase cost is excluded because a flat unit price makes it identical at every quantity.
Order cycle
The time between two consecutive replenishments: order quantity divided by the demand rate. Equivalently, the planning year divided by orders per year.
Economic production quantity
The EOQ variant for items produced rather than purchased, where stock builds up gradually during a production run instead of arriving all at once.
Period order quantity
A lot-sizing rule that orders a fixed number of weeks of forecast demand rather than a fixed number of units. Handles seasonality that EOQ cannot.

Frequently asked questions

What is a good carrying cost percentage to use?

Between 15% and 30% a year covers most product businesses, and 20%–25% is the common default. Build it rather than guess it: add your real cost of capital, warehouse space and handling, insurance and property taxes on inventory, shrinkage and damage, and an obsolescence or markdown allowance. Fast-moving fashion and consumer electronics belong above that band because obsolescence dominates the stack; stable industrial commodities that never go out of date belong below it.

Why does my EOQ come out larger than a whole year of demand?

Because your order cost is very large relative to the value of the stock — typically a high fixed freight or setup charge on a cheap item. The model is correctly telling you to buy once a year, but check two things first: whether that order cost is really fixed per order rather than partly variable with volume, and whether shelf life, cash or warehouse space caps the quantity. When the EOQ exceeds annual demand, cap it at annual demand and treat the result as a signal to renegotiate the ordering process.

Should I use annual demand in units or in dollars?

Units. The formula compares a per-order cost against a per-unit-per-year holding cost, so D must be a unit count and the answer comes out in units. If you only have revenue, divide by unit price to get units first. Keep the period consistent as well — if you enter demand per month, this calculator scales it to a year for you, but the holding cost must still be an annual figure.

Does EOQ include safety stock?

No. EOQ sets the size of each order; safety stock sets the buffer that absorbs demand and lead-time variability. In a standard continuous-review policy the two decisions are independent: you order Q* units whenever inventory position falls to the reorder point, and the reorder point is where safety stock lives. Adding safety stock does not change the EOQ, though it does raise average inventory and therefore your total holding bill.

How far off can I be before it costs real money?

Further than most people expect. The penalty is ½(Q/Q* + Q*/Q), so ordering 25% above the EOQ costs 2.5% more in ordering-plus-holding cost, and ordering double costs 25% more. On the worked example above, 25% extra total relevant cost is about $1,000 a year against a $154,000 spend. Round confidently to the case pack, pallet or container; do not chase the last few units.

What do I do about supplier quantity discounts?

Compare full total cost at each price tier, not the EOQ alone. For every tier, compute the EOQ at that tier's unit cost; if it falls below the tier's minimum quantity, test the minimum quantity instead. Then evaluate purchases plus ordering plus holding cost for each candidate and pick the lowest. The purchase term normally dwarfs the total relevant cost — in the worked example above it is $150,000 against $4,062, some 37 times larger — so even a 1%–2% discount often justifies ordering well above the plain EOQ.

Can I use EOQ for seasonal products?

Not directly — the model assumes a flat demand rate, and applying it to a Christmas item will size lots for the average rather than the peak. Two workable alternatives: split the year into periods with roughly constant demand and run the EOQ separately within each, or switch to a period order quantity that covers a fixed number of weeks of forecast. For genuinely lumpy demand, dynamic lot-sizing such as the Wagner-Whitin algorithm gives the true least-cost schedule.

How often should I recalculate the EOQ?

Quarterly, or when an input moves by a third or more. Because the answer varies with the square root of demand and order cost, a 10% forecast change moves the EOQ by under 5% — inside the flat part of the cost curve. Recalculating monthly produces churn in lot sizes, which raises transaction cost, upsets supplier scheduling and gives the appearance of precision the model does not have.

Why are ordering cost and holding cost identical in my result?

Because that is the defining property of the optimum. Substituting Q* = √(2DS/H) into either cost term gives √(DSH/2), so at the EOQ the two are exactly equal and the total is √(2DSH). It is a useful audit: if you order a quantity where holding cost exceeds ordering cost, your lots are too large, and if ordering cost exceeds holding cost, they are too small.

References

  • How Many Parts to Make at Once, Factory: The Magazine of Management, vol. 10 (1913) — Ford W. Harris
  • Inventory Management and Production Planning and Scheduling, 3rd ed. — Wiley (Silver, Pyke & Peterson)
  • Production and Operations Analysis, 6th ed. — McGraw-Hill (Steven Nahmias)
  • Factory Physics, 3rd ed. — Waveland Press (Hopp & Spearman)