The Economic Order Quantity (EOQ) is calculated with the formula Q* = √(2DS/H), where D is annual demand in units, S is the fixed cost per order in one currency, and H is the annual holding cost per unit in the same currency. This continuous optimum is the order size that minimizes annual relevant cost TC(Q) = DS/Q + HQ/2, the sum of ordering and holding components, by balancing them against each other. At the mathematical optimum those two cost components are equal, a property that can be used as a built-in check on any EOQ result. The basic model assumes constant demand, constant known ordering and holding costs, instantaneous complete replenishment, no shortages, no safety stock, no quantity discounts, and no capacity or cash constraint, and it does not tell you when to reorder. The calculation itself is simple, but its reliability depends entirely on the quality of the three inputs and on whether the assumptions still match your operating environment. A basic EOQ Calculator applies the formula, displays the cost-balance invariant, and reports cycle metrics alongside the relevant cost so the answer can be sanity-checked before any order is placed.

What the EOQ Calculation Actually Does
The calculation answers one narrow question: given how often and how expensively you order, and given how expensive it is to keep stock on hand, what single order quantity minimizes the sum of those two costs. The trade-off is straightforward. As order quantity Q grows, the number of orders per year D/Q falls, so annual ordering cost DS/Q falls. At the same time, the average inventory on hand rises toward Q/2, so annual holding cost HQ/2 rises. The two curves cross at the EOQ, and their sum is at its minimum there.
Minimizing TC(Q) = DS/Q + HQ/2 with respect to Q and setting the derivative to zero produces the square-root formula Q* = √(2DS/H). Because this comes from calculus on a continuous variable, Q* can take any positive real value, including fractions. University operations-management materials document the same derivation and the same cost-balance interpretation, including the SUNY New Paltz EOQ notes that walk through the same minimization used here. The relevant cost being minimized excludes the unit purchase price, on the assumption that unit price does not change with Q; quantity discounts require a different model that adds the purchase term.
Inputs the Calculation Requires and Why They Must Match
The calculation takes three numbers and rejects anything that would corrupt the result. Annual demand D must be in units per year, such as units sold or units consumed in twelve months. Fixed cost per order S is the administrative, transportation, receiving, and inspection cost of placing a single order, expressed in currency per order. Annual holding cost per unit H is the cost of carrying one unit in stock for one year, including capital, storage, insurance, and shrinkage, expressed in currency per unit per year.
All three inputs must share one annual basis. Mixing weekly demand with annual holding cost, or dollars per order with euros per unit, produces a meaningless number. When holding cost is quoted as a percentage of unit price rather than as a currency amount, it must be converted to currency per unit per year before entry; the calculation does not perform that conversion itself. Zero, negative, non-finite, or excessively large inputs are rejected, since each would either drive the square root to zero, undefined, or unstable territory. The output cost is reported in whatever consistent currency was entered, with no exchange rate inferred.
How to Run an EOQ Calculation Step by Step
- Convert demand to one annual number. Express D in units per year so it matches the annual basis used for the other two inputs. Annualize monthly or weekly demand rather than leaving the figure in its native period.
- Express ordering cost in currency per order. Sum the fixed administrative, transport, receiving, and inspection cost of placing one purchase order. Leave variable purchase cost out, since it is assumed independent of Q in the basic model.
- Express holding cost in currency per unit per year. If the figure is a percentage of unit price, multiply by price to convert. Include capital, storage, insurance, and shrinkage components if you want a realistic H rather than a textbook number.
- Compute Q*, orders per year, cycle days, and the two annual cost components. Use Q* = √(2DS/H), then D/Q orders per year, 365Q/D cycle days, DS/Q annual ordering cost, and HQ/2 annual holding cost. Verify that the two annual cost components are equal at the optimum.
- Compare feasible quantities immediately around Q*. Real orders are usually whole units, cases, pallets, or supplier pack multiples. Plug the nearest whole-quantity candidates into TC(Q) and pick the cheapest feasible one before committing.
Why Ordering Cost and Holding Cost Match at the Answer
The cost-balance property is a direct consequence of the minimization. Setting the derivative of TC(Q) equal to zero gives DS/Q² = H/2, which rearranges to DS/Q = HQ/2. At the continuous optimum the annual ordering cost and the annual holding cost are exactly the same number, each contributing half of the minimum relevant cost. This is a useful invariant: if you compute both components and they do not match, the inputs are inconsistent or the optimization has been rounded.
As a worked example, take D = 1,200 units per year, S = 5 currency per order, and H = 1.2 currency per unit per year. The formula gives Q* = √(2 × 1,200 × 5 / 1.2) = √(12,000 / 1.2) = √10,000 = 100 units. Orders per year are 1,200 / 100 = 12, so cycle length is 365 × 100 / 1,200 ≈ 30.42 days. Annual ordering cost is DS/Q = 1,200 × 5 / 100 = 60, and annual holding cost is HQ/2 = 1.2 × 100 / 2 = 60. The two components match, and the minimum relevant cost is 60 + 60 = 120.
To confirm that 100 is indeed the minimum, evaluate TC(120): DS/Q = 1,200 × 5 / 120 = 50, HQ/2 = 1.2 × 120 / 2 = 72, total 50 + 72 = 122. That is 2 higher than the optimum at 120, so 100 sits at the bottom of the curve and any nearby quantity carries a small cost penalty. The same property holds for any valid D, S, and H you plug into the formula.
Assumptions Built Into the Basic EOQ Calculation
The square-root formula is exact under a specific set of conditions. When those conditions do not hold, the formula still returns a number, but the number is no longer the right answer. The table below lists the assumptions, what each one says in plain language, and what typically violates it in a real warehouse.
| Assumption | Plain-language meaning | What typically violates it |
|---|---|---|
| Constant known demand | Annual units needed are predictable and steady | Seasonal swings, growth trend, promotions, new product ramp |
| Constant ordering cost S | Each order costs the same in admin, transport, receiving | Freight tiers, fuel surcharges, quantity-based admin fees |
| Constant holding cost H | Carrying cost per unit per year is stable | Capital cost shifts, insurance changes, warehouse rate change |
| Instantaneous replenishment | The entire order arrives at once | Production runs, partial shipments, overlapping lead time |
| No shortages or safety stock | Stock-outs are not allowed and buffer is not modeled | Service-level targets, variable lead time, perishability |
| Unit price independent of Q | Purchase cost is irrelevant to the optimum | Quantity discounts, vendor price breaks, case-pack incentives |
| No capacity or cash limit | You can always afford and store Q* | Warehouse cap, working capital ceiling, supplier minimum order |
If your situation breaks any of these, the basic EOQ can still be a starting point, but a different model or an extension is needed to make the final decision. Seasonal demand calls for time-phased planning, uncertainty in lead time needs a reorder-point model with safety stock, and quantity discounts need a price-break comparison rather than a single square-root answer.
From a Continuous Result to a Real Order Quantity
Because the formula minimizes over a continuous variable, the displayed Q* is the mathematical optimum and may be fractional. A result of 100 is convenient; a result of 87.4 units means you cannot place that exact order. Compare whole-unit quantities immediately above and below the formula result using the same total-cost equation TC(Q) = DS/Q + HQ/2, then choose the cheapest feasible size. If your supplier ships in cases of 12, the candidates worth checking are the multiples of 12 nearest to Q*. If pack constraints are large relative to Q*, blind rounding can pick a noticeably worse quantity, although the cost curve is usually fairly flat near its minimum. For a fuller walkthrough of the total-cost comparison around Q*, see the step-by-step total-cost calculation.
Sensitivity, Validation, and When to Recalculate
EOQ inputs are estimates, not constants. Demand forecasts drift as the market changes, ordering cost moves when freight contracts or admin processes change, and holding cost shifts with capital rates, insurance, warehouse rent, and shrinkage. The right time to recalculate is whenever any of those three inputs change in a way that matters, or whenever supplier pack sizes, minimum order quantities, or lead-time variance move. Comparing a couple of realistic scenarios side by side is more informative than treating one precise EOQ as a permanent answer. Validate the demand forecast, the carrying-cost composition, supplier constraints, cash, shelf life, lead-time risk, service-level targets, and feasible pack sizes with operations staff before you treat the result as a purchasing commitment. For a wider inventory baseline, use the calculation as a first cut and confirm the assumptions against your real warehouse rather than as an automatic order.