Free economic production quantity (EPQ) calculator

Work out the economic production quantity: the batch size that balances setup cost against holding cost when you make an item yourself and ship it while you make it. You also get runs per year, run length, maximum and average inventory, the yearly costs and the EOQ for comparison. It runs in your browser. Nothing you enter is stored or sent.

Units of this item you expect to ship in a year.

The cost of one changeover: labor, trial pieces, scrap while you dial in, cleaning.

What it costs to keep one unit in stock for a year: money tied up, space, insurance, handling, the risk it goes obsolete. If you use a rate, multiply it by the unit cost: a $15 unit at 20% a year is $3.

Units you make in a working day while this item runs. Use the rate of the slowest operation.

Days the plant runs and ships. Demand per day = annual demand ÷ working days, so both rates are on the same days.

How EPQ is calculated

While an item runs, stock builds at the production rate less the demand rate. Between runs it falls at the demand rate. Because stock never reaches the full batch, the economic production quantity is larger than the economic order quantity for the same costs. At the EPQ, the yearly setup cost and the yearly holding cost are equal.

Demand per day (d) = annual demand (D) ÷ working days per year

EPQ = √(2 × D × S ÷ (H × (1 − d ÷ p)))

Runs per year = D ÷ EPQ; days of production per run = EPQ ÷ p; cycle length = EPQ ÷ d

Maximum inventory = EPQ × (1 − d ÷ p); average inventory = maximum inventory ÷ 2

Annual setup cost = runs per year × S; annual holding cost = average inventory × H

EOQ = √(2 × D × S ÷ H)

Here S is the setup cost per run, H the holding cost per unit per year and p the production rate per day. The formula only works when p is higher than d. The economic production quantity guide walks through the formula and when to use it, and the EOQ calculator covers parts you buy rather than make.

A worked example

Example inputs, not real data

A plant ships 24,000 units a year of one item over 240 working days, so demand is 100 units a day. When the item runs, the line makes 500 units a day. A setup costs $200, and holding one unit for a year costs $3.

  • d ÷ p = 100 ÷ 500 = 0.2, so 1 − d ÷ p = 0.8
  • EPQ = √(2 × 24,000 × 200 ÷ (3 × 0.8)) = √(9,600,000 ÷ 2.4) = √4,000,000 = 2,000 units
  • Runs per year = 24,000 ÷ 2,000 = 12. Each run takes 2,000 ÷ 500 = 4 days, and a new run starts every 2,000 ÷ 100 = 20 working days
  • Maximum inventory = 2,000 × 0.8 = 1,600 units; average inventory = 800 units
  • Annual setup cost = 12 × $200 = $2,400; annual holding cost = 800 × $3 = $2,400; total $4,800
  • EOQ = √(2 × 24,000 × 200 ÷ 3) = √3,200,000 ≈ 1,789 units

Cost changes slowly near the EPQ. A batch of 2,400 (20% more) would cost 10 runs × $200 + 960 units × $3 = $4,880 a year, only $80 more, so round to a batch size that suits the floor, such as a full pallet or a full shift. Use the Load example button above to run these figures.

Frequently asked questions

What is the difference between EPQ and EOQ?

EOQ assumes the whole batch arrives at once, as with a purchase order. EPQ assumes you make the batch over several days while you keep shipping, so stock never reaches the full batch size. That is why EPQ is larger than EOQ for the same costs.

What should I include in setup cost?

The cost of one changeover: the labor of the people doing it, trial pieces and scrap while you dial in, cleaning and paperwork. Count lost machine time only if the machine is a bottleneck, where an hour lost is output lost.

Why does the calculator say production cannot keep up?

EPQ needs a production rate higher than demand per day. If you make 80 units a day and need 100, stock never builds up, so there is no batch size to choose: the item has to run every working day and you still need more capacity.

Related tools and reading

Schedule against this capacity every day

Production Planning, $99 a month. It shows batch sizes from the same EPQ formula, skips the setup when a job follows one from the same changeover family, and plans every operation on a finite-capacity Gantt chart.

See Production Planning
Scroll to Top