About the Economic Production Quantity Calculator
This EPQ calculator finds the economic production quantity — the batch size to make in each production run so that the combined cost of machine setups and holding inventory is as low as possible. Unlike the EOQ model, where a whole order arrives at once, EPQ assumes units are produced at a steady rate while demand is also being met, so inventory builds up more slowly and peaks below the batch size.
It is designed for manufacturers, food and beverage producers, print shops and planners who make items in-house in batches on shared equipment. Enter annual demand, the annual production rate the line can achieve, the cost of one setup and the yearly cost of holding a unit. The calculator returns the optimal run size, the maximum inventory, how many runs you need a year, how long each run lasts and the time between runs.
The model assumes constant demand and production rates, a production rate higher than demand, no stockouts and no quantity discounts. Days are working days in the year you specify, so match it to your production calendar.
With the default inputs, the economic production quantity is 2,828 units. Change any value above to recalculate instantly.
How to use the economic production quantity calculator
- 1Enter annual demand for the item.
- 2Enter the annual production rate if the line made only this item every working day.
- 3Enter the full cost of one setup or changeover.
- 4Enter the yearly cost to hold one unit in stock.
- 5Read the optimal run size, run length, cycle time and annual costs.
Formula and method
During a production run, inventory grows at the rate P − D (production minus demand) and then falls at rate D until the next run starts. Because the stock never reaches the full batch size, average inventory is I_max ÷ 2 = Q(1 − D/P) ÷ 2 rather than Q ÷ 2. Minimizing annual setup cost (D/Q × S) plus annual holding cost (I_max/2 × H) gives the EPQ formula above.
At the optimum, annual setup and holding costs are equal. Run length is Q ÷ daily production rate (P ÷ working days), and cycle time is Q ÷ daily demand. The comparison EOQ, √(2DS/H), is the batch size you would choose if the whole batch arrived at once.
- Q*
- Economic production quantity (units per run)
- D
- Annual demand
- P
- Annual production rate (P > D)
- S
- Setup cost per production run
- H
- Holding cost per unit per year
Worked examples
20,000 units a year on a 60,000-unit line
With D/P = 1/3, Q* = √(2 × 20,000 × 400 ÷ (3 × 2/3)) = √8,000,000 ≈ 2,828 units. Inventory peaks at 2,828 × 2/3 ≈ 1,886. Each run takes 2,828 ÷ 240 per day ≈ 11.8 days and repeats every 35.4 days; setup and holding costs are each about $2,828 a year.
Bakery line with expensive changeovers
D/P = 0.4, so Q* = √(2 × 52,000 × 950 ÷ (1.2 × 0.6)) ≈ 11,714 units. Inventory peaks at about 7,029 units, there are 4.4 runs a year, each run lasts about 23.4 working days and the total annual cost is roughly $8,434.
Production barely faster than demand
When production is only slightly faster than demand (D/P = 0.9), stock builds slowly, so long runs are cheap: Q* = √(2 × 9,000 × 200 ÷ (2 × 0.1)) ≈ 4,243 units, yet inventory never exceeds about 424 units.
Frequently asked questions
What is the difference between EOQ and EPQ?+
EOQ assumes the entire order arrives at once, so inventory jumps to Q. EPQ assumes units are produced gradually while demand is consumed, so inventory peaks at Q(1 − D/P). That lower peak makes the optimal EPQ batch larger than the EOQ for the same costs.
What happens if the production rate is lower than demand?+
The EPQ formula breaks down because the line can never build inventory — it would need to run continuously and still fall behind. You need more capacity, overtime or outsourcing before batch sizing makes sense.
How do I estimate setup cost?+
Include the labour for changeover, the value of output lost while the line is down, cleaning and calibration materials and any scrap from first-piece adjustments. Reducing setup cost (SMED) shrinks the optimal batch and inventory.
Why are setup and holding costs equal at the EPQ?+
Setup cost falls as batch size rises while holding cost rises linearly. Their sum is lowest where the two curves cross, which is exactly where annual setup cost equals annual holding cost.
Is the EPQ also called economic batch quantity?+
Yes. Economic batch quantity (EBQ), economic manufacturing quantity and finite production rate model are all names for the same calculation used in operations management textbooks.