CalcWorldHub
Operations · CalcWorldHub

Economic Production Quantity: Plan a Batch Run Size

The economic production quantity (EPQ) estimates a batch size when a machine makes units over time while demand continues to consume them. For annual demand of 12,000 units, production at 60,000 units per year, an $80 setup, and $5 holding cost per unit-year, the model gives a run of about 693 units and a peak stock level near 554 units—not a pile of 693 units appearing at once.

Open calculator
A production line feeds a repeating stock curve that rises gradually during production and falls with demand.

Share this article

Economic production quantity equation with the finite-rate factor one minus demand divided by production rate.
The finite-rate term reduces the inventory peak while demand continues during production.

Why finite-rate production changes the batch

The basic order-quantity picture assumes that a complete lot arrives instantly. A production run is different: while the machine produces, customers or downstream steps use some of the output. Inventory therefore rises at the net rate P−D, then falls at rate D after the run ends. Here D is annual demand and P is the annual production rate while the line is running; a feasible finite-rate model requires P>D.

Because stock accumulates gradually, maximum inventory is lower than the production lot. This deterministic one-item model assumes constant rates and is useful when the machine replenishes faster than demand and setup cost matters.

Enter rates and costs on compatible time bases

Enter D and P as units per year using the same definition of a year. A plant that operates 250 production days may convert daily rates using 250 days, while a forecast expressed in calendar-year units may use 365 days; do not mix these bases. S is the fixed setup cost each time a run starts, and h is the cost of holding one unit for one year. The two costs must use the same currency and annual period.

S is a repeatable setup charge and h an annual carrying cost per unit. Unit purchase or manufacturing cost is omitted because it is constant across lot sizes here. Run-dependent setups, age-sensitive storage cost, and variable quality need additional modeling.

Calculate the economic run quantity

The EPQ is Q*=√[2DS / (h(1−D/P))]. The term 1−D/P is the fraction of production flow that remains after concurrent demand is deducted. When P is much larger than D, that factor approaches one and the result approaches the ordinary EOQ quantity. As P approaches D from above, replenishment is only slightly faster than consumption, the factor shrinks, and the calculated lot grows because the system needs a longer run to rebuild stock.

During production, inventory rises by the net rate P−D for Q/P years. Multiplying that net rate by run duration gives a peak of Q(1−D/P). In the ideal cycle, average on-hand stock is half that peak. The annual relevant cost curve adds setup cost DS/Q to cycle-stock holding cost hQ(1−D/P)/2; minimizing this curve yields the square-root quantity. At the optimum, those two annual cost components are equal in the continuous model.

Work the run size and peak inventory

The first example uses rates in units per year, so the rate ratio is dimensionless. With D=12,000 and P=60,000, one fifth of production is consumed during the run and four fifths contribute to stock. The resulting peak is therefore 80% of the lot. The cost terms can be checked separately: setup frequency is annual demand divided by lot size, while cycle-stock holding uses half of peak inventory.

A second case holds demand, setup cost, and holding cost fixed but moves production closer to demand. This changes the replenishment geometry even though the annual requirement is unchanged. Comparing both results is a useful sensitivity check: a larger batch can be required to create enough net inventory when the production line has little capacity above the consumption rate.

Worked examples

A line produces five times annual demand

Inputs: D=12,000 units/year, P=60,000 units/year, S=$80/run, h=$5/unit/year.

Calculation: 1−D/P=0.8. Q*=√[2×12,000×80 ÷ (5×0.8)]=√480,000=692.82 units. Peak inventory=692.82×0.8=554.26 units; average cycle stock is about 277.13 units.

The continuous optimum is about 693 units per run, with a peak of about 554 units while production and demand overlap.

Production capacity is closer to demand

Inputs: D=18,000 units/year, P=36,000 units/year, S=$120/run, h=$4/unit/year.

Calculation: 1−D/P=0.5. Q*=√[2×18,000×120 ÷ (4×0.5)]=√2,160,000=1,469.69 units. Peak inventory=1,469.69×0.5=734.85 units.

The lot is larger than when production runs much faster than demand, but the net stock peak is only half the lot because half of production is consumed during the run.

During a production run, stock rises at production minus demand and falls at the demand rate afterward.
A production lot accumulates gradually instead of arriving as one instant delivery.

Use the estimate as a planning input

Compare the recommended quantity with pack sizes, minimum run lengths, capacity windows, and storage limits before scheduling it. The mathematical optimum is continuous even when units are discrete; rounding to a feasible production batch can change annual setup and holding costs. Calculate the rounded alternatives with the same cost model rather than assuming a small rounding difference is harmless for every operation.

EPQ does not schedule shared machines or account for sequence-dependent changeovers, downtime, scrap, or storage limits. Treat it as a benchmark when those constraints matter, and retain the forecast and rate basis so planners can explain later changes.

Sources and further reading

Share this article

Browse all articles · Calculator: Economic production quantity calculator