Q = order quantity

Q * = optimal order quantity

D = annual demand quantity of the product

P = purchase cost per unit

C = fixed cost per order (not per unit, in addition to unit cost)

H = annual holding cost per unit (also known as carrying cost) (warehouse space, refrigeration, insurance, etc. usually not related to the unit cost)

**The Total Cost function**

The single-item EOQ formula finds the minimum point of the following cost function:

Total Cost = purchase cost + ordering cost + holding cost

- Purchase cost: This is the variable cost of goods: purchase unit price × annual demand quantity. This is P×D

- Ordering cost: This is the cost of placing orders: each order has a fixed cost C, and we need to order D/Q times per year. This is C × D/Q

- Holding cost: the average quantity in stock (between fully replenished and empty) is Q/2, so this cost is H × Q/2

TC = PD + CxD/2 + HxQ/2

In order to determine the minimum point of the total cost curve, set its derivative equal to zero:

dTC(Q)/dQ = (d/dQ)(PD + CxD/Q + HxQ/2) = 0

= 0 + (-C*D/Q*Q) + H/2) = 0

The result is

Q = root of ((2*C*D)/H)

Note that interestingly, Q* is independent of P, it is a function of only C, D, H