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

Economic order quantity (EOQ) is the order size that minimizes the combined cost of placing orders and holding inventory for one item. The EOQ formula is EOQ = √(2DS ÷ H), where D is annual demand in units, S is the cost of placing one order, and H is the annual cost of holding one unit in stock.

Most guides on the first page of results stop there, with the formula and one example. We run one SKU through the formula below, then ask the question those guides skip: what happens when the demand number you fed into it is wrong? The answer, which the square root guarantees, is that very little happens. A 20% forecast error moves the order quantity by under 10% and the total cost by less than half a percent. EOQ is the most forgiving number in your replenishment setup. The reorder point, which decides when that quantity gets ordered, is not forgiving at all, and that is where this post ends up.

What is economic order quantity (EOQ)?

Every order you place costs money twice. Placing it costs money (purchasing time, receiving, inspection, freight minimums), and holding what arrives costs money (capital, space, insurance, shrinkage, obsolescence). Large batches mean rare orders and a lot of stock. Small batches mean little stock and constant ordering.

EOQ is the batch size where those two costs, added together, are lowest. Ford W. Harris published the formula in 1913, and it is still sometimes called the Wilson formula after R. H. Wilson, who marketed it to industry in the 1930s. A century on, it sits inside most ERP systems as the default way to set an order quantity, which is a good reason to know what it assumes.

The EOQ formula

EOQ = √(2DS ÷ H)

VariableWhat it isWhere it comes from
DAnnual demand in unitsYour forecast for the item, converted to a yearly figure
SCost per order (also called setup cost)Fixed cost of placing and receiving one order, whatever the quantity
HAnnual holding cost per unitUsually unit cost × carrying cost rate; a $24 item at 25% a year costs $6 to hold

Multiply annual demand by the order cost, double it, divide by the holding cost, and take the square root. The result is a quantity in units. D is the only variable you forecast. The other two are cost facts you can look up, which is part of why the formula behaves so well under uncertainty.

One practical note on H: carrying cost rates are usually quoted as a percentage of unit value, somewhere between 20% and 30% a year for most goods, as our guide to inventory optimization levers lays out when it walks through what excess stock costs. Multiply that rate by the unit cost to get H in dollars.

How to calculate EOQ: a worked example

Take one SKU with the following inputs.

InputValue
Annual demand (D)12,000 units
Cost per order (S)$90
Unit cost$24
Carrying cost rate25% a year
Holding cost per unit (H)$24 × 25% = $6

Step 1. Multiply. 2 × 12,000 × 90 = 2,160,000.

Step 2. Divide by H. 2,160,000 ÷ 6 = 360,000.

Get started today and let your data drive results in weeks

Step 3. Take the square root. √360,000 = 600 units.

Step 4. Check what that means in practice. 12,000 ÷ 600 = 20 orders a year, one roughly every 2.6 weeks.

Step 5. Check the two costs. Ordering cost is 20 orders × $90 = $1,800 a year. Holding cost is average inventory (600 ÷ 2 = 300 units) × $6 = $1,800 a year. Total: $3,600.

Notice that ordering cost and holding cost come out identical. That’s the signature of the EOQ optimum and the quickest way to sanity-check a calculation. If the two costs are far apart at your chosen quantity, you aren’t at the minimum.

Free EOQ calculator

Enter your own numbers and the calculator returns the order quantity, the number of orders a year, the interval between orders, and the split between ordering and holding cost. The defaults are the worked example above, so you can confirm the 600 before you change anything.

EOQ calculator

Enter annual demand and three cost facts. The calculator returns the economic order quantity, the ordering cadence, and the split between ordering and holding cost. Defaults are the worked example from the article.

units

$ per order

$ per unit

% a year

Typical range is 20% to 30% of unit value a year.

600 units per order

EOQ = √(2DS ÷ H), with H = unit cost × carrying rate. In Excel: =SQRT(2*D*S/H)

Holding cost per unit (H)

$6.00

Orders per year

20.0

Weeks between orders

2.6

Annual ordering cost

$1,800

Annual holding cost

$1,800

Total annual cost

$3,600

At the optimum, ordering cost and holding cost are equal. If they differ here, it is only rounding to whole units.

What if the demand forecast is wrong?

Drag to set how far the forecast you fed into D is from true demand. The calculator reruns EOQ on the wrong number and prices it at the true demand.

+20%

Forecast above true demand is positive. The worked example uses +20%.

EOQ from the wrong forecast

657

Change in order quantity

+9.5%

True total cost at that quantity

$3,615

Cost penalty

+0.4%

Assumes constant demand, fixed lead time, no quantity discounts, no stockouts and full replenishment at once. The reorder point and safety stock are separate calculations.

The total cost curve: why EOQ is forgiving

Plot total cost against order size and you get a curve with a wide, flat bottom. Ordering cost falls as the batch grows, holding cost rises in a straight line, and their sum dips to a minimum at 600 and then climbs slowly on either side.

Order sizeOrdering costHolding costTotal costVersus EOQ
300$3,600$900$4,500+25%
450$2,400$1,350$3,750+4.2%
540$2,000$1,620$3,620+0.6%
600$1,800$1,800$3,6000%
660$1,636$1,980$3,616+0.4%
750$1,440$2,250$3,690+2.5%
1,200$900$3,600$4,500+25%

Go 10% off the optimum, in either direction, and total cost rises by about half a percent. Go 25% off and it rises by 2.5% to 4%. You have to double the quantity, or halve it, before the penalty reaches 25%.

This flatness is the most useful thing to know about the EOQ model, and almost no guide mentions it. You can round 600 up to a pallet quantity of 640 or down to a case pack of 576 and lose almost nothing. The precision of your demand forecast also matters far less here than elsewhere. The square root compresses error: the input has to be wrong by a lot before the output is wrong by a little.

Order size does bite in one place: average inventory. Half the order quantity sits in stock on average, and that number flows straight into your inventory turnover ratio. Doubling the batch to 1,200 doubles average inventory from 300 to 600 units and halves turns on this item. Read the flat curve as permission to stop agonizing over the last 5%, and nothing more generous than that.

The assumptions behind the EOQ model

The formula is exact only when five conditions hold, and each fails in a recognizable way.

  1. Demand is constant and known. The model sees D as a steady drip of 231 units every week. In practice, demand is seasonal, promoted, and uncertain, which is why D should be a forecast you actually trust rather than last year’s total.
  2. Lead time is fixed. The formula does not care how long replenishment takes, because it assumes the order arrives exactly when planned. Lead time only enters when you set the reorder point, which is the next section’s subject.
  3. No quantity discounts. Unit cost is the same whether you buy 100 or 10,000. If suppliers offer price breaks, EOQ needs an extension that compares total cost at each break point.
  4. No stockouts. Every unit of demand is served from stock, so the model never prices a lost sale. It is optimizing cost, not service.
  5. Instant, complete replenishment. The whole order lands at once. For items produced in-house over several days, the production order quantity variant adjusts H for stock that is consumed while it is still being built.

None of these assumptions make the formula useless. They tell you which parts of your business the formula is quietly ignoring.

Where EOQ breaks in real demand

The model breaks in five common situations. Most planning teams live in at least two of them.

Seasonal and promotional demand. A SKU that sells 231 units a week on average but 600 in the promotion week and 150 in the week after does not have one EOQ. It has a quantity that is right on average and wrong most weeks. Teams handle this by recalculating EOQ per season or, more often, by treating EOQ as the base order and letting the forecast drive the timing.

Quantity discounts. When a supplier drops the unit cost at 1,000 units, the 600-unit EOQ may lose to the 1,000-unit order once the lower price and the lower H are counted. Compare total annual cost at each price break, purchase cost included, and take the cheapest.

Shared truckloads and container builds. The order cost S is rarely fixed per order when a dozen SKUs ride the same truck. Joint replenishment, where you order a family of items together, replaces the single-item EOQ.

Perishables and short life cycles. An item with a six-week shelf life cannot carry an order quantity that takes ten weeks to sell. Here the newsvendor model, which prices overstock against lost sales, is the right tool.

Forecast error. This is the case everyone worries about and the one the formula handles best. Suppose the forecast for the worked SKU is 20% high, so you run the formula on D = 14,400 instead of 12,000. EOQ comes out at 657 instead of 600. Run the business at the true demand of 12,000 with that 657-unit order, and total cost is $3,615 instead of $3,600. A 20% miss in the input cost you 0.4% in the output.

Now run the same 20% miss through the reorder point. At 231 units a week and a two-week lead time, expected lead-time demand is 462 units. If true demand runs 20% above forecast during those two weeks, you need 554 units and have planned for 462. The 92-unit gap is a stockout unless safety stock covers it. Same forecast error, same SKU, two very different consequences. The quantity decision absorbed the miss. The timing decision passed it straight through to the shelf.

So the useful measure of a demand forecast for replenishment is how well it predicts demand over the lead time, rather than how close the annual total lands. Our guide on how to measure forecast accuracy covers the metrics that make that visible at SKU level, and the 2026 Demand Forecasting Accuracy Report shows what AI versus incumbent forecast accuracy looked like across 15 head-to-head deployments. At portfolio scale, the point sharpens: an EOQ per SKU needs a forecast per SKU, and the report’s deployments ran to forecasting 100,000+ SKUs, where the per-SKU forecast is the only version of D that exists.

EOQ, reorder point and safety stock: how they fit together

Three numbers run a replenishment policy, and they answer three different questions.

Get started today and let your data drive results in weeks

EOQ answers how much. It is the batch size, set from annual demand and two cost facts, and it changes slowly.

The reorder point answers when. Reorder point = expected demand during lead time + safety stock. When on-hand plus on-order inventory drops to that level, you release an order for the EOQ quantity.

Safety stock covers the error. It is the buffer that protects service when demand during lead time runs above the forecast or lead time runs long. The safety stock formula sizes it from the variability of demand and lead time and the service level you want, and it is where forecast error turns directly into inventory.

Put together: the forecast feeds D into the EOQ formula, where a square root compresses the error, and it feeds expected lead-time demand into the reorder point, where the error passes through at full strength and safety stock has to absorb it. Improving the forecast therefore does very little to your order quantity and a great deal to the stock you hold against uncertainty. In the Accuracy Report, that is the mechanism behind what a better forecast is worth: overstock cut by up to 50% in deployments where the forecast improved, with the order quantities barely moving.

DemandForecast.ai enters a replenishment setup at exactly this point. The platform produces a per-SKU forecast and a per-SKU error estimate, which are the two inputs the reorder point and safety stock need and the two inputs an annual EOQ calculation quietly assumes you already have. The order quantity can stay in the ERP exactly as it is.

See how AI forecasts performed against incumbent methods across 15 deployments in

EOQ vs MOQ

Your EOQ belongs to you. A minimum order quantity (MOQ) belongs to the supplier: the smallest order they will accept, set by their production run, packaging, or freight economics. When the MOQ is below your EOQ, it is irrelevant and you order the EOQ. When the MOQ is above your EOQ, you are forced to order more than is economic for you, and the difference shows up as holding cost. In the worked example, a 1,000-unit MOQ would push total cost from $3,600 to $4,080 a year, a 13% penalty, which is a useful figure to carry into the next supplier negotiation.

Your order quantity is settled. The number worth your attention this quarter is the one that decides when the order goes out, and how much stock you are holding to protect it. If you would like to see what a per-SKU forecast and error estimate look like against your own items, request a demo and we will walk you through it.

FAQ

What is EOQ and its formula?

What does EOQ stand for, and what is another name for it?

What is EOQ vs MOQ?

Is there an EOQ formula in Excel?

What are the assumptions of the EOQ model?

Contents