Economic Order Quantity Calculator Formula

Understand the math behind the economic order quantity calculator. Each variable explained with a worked example.

Formulas Used

Economic Order Quantity

eoq = holding_cost > 0 ? sqrt(2 * annual_demand * ordering_cost / holding_cost) : 0

Orders Per Year

orders_per_year = holding_cost > 0 ? annual_demand / sqrt(2 * annual_demand * ordering_cost / holding_cost) : 0

Total Annual Inventory Cost

total_annual_cost = holding_cost > 0 ? sqrt(2 * annual_demand * ordering_cost * holding_cost) : 0

Variables

VariableDescriptionDefault
annual_demandAnnual Demand (units)10000
ordering_costCost Per Order(USD)50
holding_costAnnual Holding Cost Per Unit(USD)4

How It Works

How to Calculate Economic Order Quantity

Formula

EOQ = sqrt(2 x Annual Demand x Ordering Cost / Holding Cost Per Unit)

The EOQ model, developed by Ford W. Harris in 1913, finds the sweet spot between ordering too frequently (high ordering costs) and ordering too much at once (high holding costs). At the EOQ, total ordering costs equal total holding costs, producing the lowest combined inventory expense. While the model assumes constant demand and lead times, it provides an excellent starting point for inventory optimization.

Worked Example

Annual demand is 10,000 units. Each order costs $50 to place, and holding one unit for a year costs $4.

annual_demand = 10000ordering_cost = 50holding_cost = 4
  1. 01EOQ = sqrt(2 x 10,000 x $50 / $4) = sqrt(250,000) = 500 units
  2. 02Orders Per Year = 10,000 / 500 = 20 orders
  3. 03Total Annual Cost = sqrt(2 x 10,000 x $50 x $4) = $2,000