The Economic Order Quantity – a simple calculus application

The EOQ (Economic Order Quantity) formula is a deceptively simple model. It comes from Zipkin’s “Foundations of Inventory Management” (Irwin/McGraw-Hill, 2000, 0-256-11379-3) and it is the very first model in the book. It was first published 100 years ago, in 1913 – the model, not the book!.

When all is said and done, it’s a simple application of freshman calculus.

Imagine that we sell or use up one product, at a known constant rate \lambda\ . Periodically, we order more of this product, to replenish our inventory I(t). Further, there is a known constant lead time L – between when we place an order and when we receive it (actually, when we can sell or use it, so this includes unloading and storing). If our inventory will go to zero at t = T, then, at the very latest, we must place an order at T – L:


Since we assume that the demand \lambda\ and the lead time L are constants, we can safely place our order at exactly T – L. A more realistic model would allow for uncertainty in \lambda\ and L. Oh, of course, I am assuming that running out of inventory is not acceptable: we want to always meet demand.

This means that if we order q, our inventory jumps from 0 to q upon delivery of our order.

Now, there are a lot of caveats for this model. For example… what if we’re only open for 8 hours a day, 5 days a week? Then this model would require us to count only the time we’re open, to assume that lead time does not include the weekend days, and that deliveries occur while we’re open…. But let me stay with this first model.

In addition to inventory on hand at time t, I(t), we also define inventory on order IO(t) and inventory position IP(t) as their sum. That is, we have

\lambda\ a constant rate of demand (quantity/time)
L a constant lead time between placing an order and receiving it
q order quantity
I(t) inventory at time t
IO(t) inventory on order at time t
IP(t) inventory position at time t, where

IP(t) = I(t) + IO(t).

What we want to know is how much to order and often to order it. Yes, those are related questions. The key is that if we place an order for q once during the time required to completely deplete our inventory, then we are placing an order every

OF = \frac{1}{\frac{q}{\lambda}} = \frac{\lambda}{q}\ .

(The time between orders, one cycle, is \frac{q}{\lambda}\ , so the frequency of orders (the order frequency OF) is the inverse.)

During that cycle, the average inventory is \bar{I} = q/2\ .

Now, what’s it cost to do this? We can break the costs into three different kinds:

k fixed cost to place an order
c variable cost to place an order
h cost to hold one unit of inventory for one unit of time.

(So the cost of inventory I(t) is h I(t), and the average cost of inventory in one cycle is h q/2.)

The total cost of an order q placed every cycle, then, is

C(q) = order cost + holding cost

C(q) = (k + c\ q) OF + h\  \bar{I}\

C(q) = (k + c\ q) \frac{\lambda}{q} + h \ \frac{q}{2}\

hence the order cost, the holding cost, and the total cost are:


It’s crucial that the holding cost increases with q, while the order cost decreases with q.

I need some numbers.

Zipkin’s numerical example is of paper for the copy machine(s):

usage (demand) is 8 boxes/week at $25 per box.
handling (on our end) and shipping is $80 + $50.
the shipment takes a week to arrive.
keeping inventory organized is $1.10 per week.
Financing is 15% per year.
We order 2 weeks worth of supplies (16 boxes) with each order.

(That finance charge is applied to the cost of each box. At least, that’s how I think of it.)

That is,

\lambda\ = 8
k = 80 + 50
L = 1
c = 25
q = 16
h = 1.10 + .15/52

and that in turn is (omitting q):


With these numbers our average order cost, holding cost, and total cost become – as functions of q


We can plot them over an indicative range, q goes from 10 to 100:


The red line is the linear holding cost; the black line is the always-decreasing order cost; the green-gold line is their sum.

The sum has a minimum value. Before we compute it, however, let’s see what our cost is when we order q = 16, as is our current practice:


Now let’s do some freshman calculus. What value of q provides the minimum cost? We take the derivative of C(q) with respect to q, set it to zero, and solve for q:


We want the positive (second) solution… and in our case the optimal q is


At the optimal q, our total cost is


and we place an order every \frac{q}{\lambda}\

EOQ 10

That is, every 5 1/4 weeks, we place an order for 42 boxes, and it looks like we save $25 per week – i.e. the cost of one box per week. (I’ll return to the units shortly.)

While we’re thinking of freshman calculus… even though we have a drawing which shows that we have found a minimum… let’s check the second derivative: for a minimum, the second derivative should be positive at the minimum. We compute the second derivative, and set q to the (positive) value where the first derivative was zero:

EOQ 10a

Yup, the second derivative is positive, at least for these values. But in general? I recall the second derivative… and simplify it:

EOQ 10b

So long as k, \lambda\ , and q are positive, the second derivative is positive: we have a minimum.

Now, we need to think about this whole thing, because we’ve changed the definition of a cycle. Our initial cost was $274 and now our cost is $249. But 16 boxes and 42 boxes cost

EOQ 11

so our computed costs must be per week, not per cycle. (Still more later.)

It’s worth noting that the cost curve is pretty flat in the neighborhood of the optimal q. It doesn’t matter much whether we order 41, 42, or 43 boxes at a time:

EOQ 12

We save $25 per week.

One last look at the units. Here’s the cost:

EOQ 13

Here is the original set of parameters… followed by a set with units attached:

EOQ 14

Now when we look at the cost, we see that units are indeed $/week:

EOQ 15

Note that qq itself is dimensionless: q = qq Box, so q has dimensions of box(es) but qq is just a number.

But I still wonder why “order” does not show up in some of those. In particular, why doesn’t q have units boxes/order? And yet, it works.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: