What is Economic Production Quantity?
Economic Production Quantity (EPQ) is the production lot size that minimizes the total of setup cost and inventory holding cost when you manufacture an item yourself. It is the production-side counterpart of the Economic Order Quantity (EOQ).
The key difference: EOQ assumes a full order arrives instantly in one delivery, so peak inventory equals the whole order. EPQ assumes you build units gradually at a finite production rate while you are also consuming them — so inventory builds up slowly and peaks below the full lot. That lowers average holding cost and pushes the optimal lot size higher than EOQ.
The EPQ formula
d = daily demand rate · p = daily production rate · requires p > d
The variables, and where each number comes from
| Symbol | Meaning | Unit | Where you get it |
|---|---|---|---|
| D | Annual demand | units / year | Sales forecast or last 12 months of shipments for the item |
| S | Setup cost per run | currency / run | Changeover labour + scrapped first-off parts + machine time lost to the changeover |
| H | Holding cost per unit per year | currency / unit / year | Cost of capital + storage + insurance + obsolescence, as an annual rate on one unit |
| p | Daily production rate | units / day | Good units this line produces in one working day when running this item |
| d | Daily demand rate | units / day | Derived, not entered: d = D ÷ working days per year |
The model requires p > d. If your line cannot out-produce demand on the days it runs, no lot size fixes that — it is a capacity problem, and the calculator will tell you so instead of returning a number.
EPQ formula worked example
A plant makes one gearbox variant in-house. Annual demand is 12,000 units over 250 working days, a changeover costs 450 per run, holding one unit for a year costs 3.20, and the line produces 200 good units per day.
| Input | Value |
|---|---|
| Annual demand D | 12,000 units / year |
| Setup cost per run S | 450 per run |
| Holding cost H | 3.20 per unit per year |
| Production rate p | 200 units / day |
| Working days per year | 250 |
Step 1 — get the daily demand rate. The formula needs d in the same time unit as p:
d = D ÷ working days = 12,000 ÷ 250 = 48 units / day
Step 2 — evaluate the production-rate term. This is the part EOQ does not have:
1 − d/p = 1 − 48/200 = 1 − 0.24 = 0.76
Step 3 — substitute into the EPQ formula.
EPQ = √( (2 × 12,000 × 450) ÷ (3.20 × 0.76) )
EPQ = √( 10,800,000 ÷ 2.432 )
EPQ = √4,440,789 = 2,107 units per run
Step 4 — read off the scheduling numbers. The lot size alone does not tell you when to run:
| Result | Value | How it is derived |
|---|---|---|
| Optimal lot size (EPQ) | 2,107 units | the formula above |
| Peak inventory | 1,602 units | EPQ × (1 − d/p) = 2,107 × 0.76 |
| Runs per year | 5.7 | D ÷ EPQ = 12,000 ÷ 2,107 |
| Run time per batch | 10.5 days | EPQ ÷ p = 2,107 ÷ 200 |
| Cycle length between runs | 43.9 days | EPQ ÷ d = 2,107 ÷ 48 |
| Total annual cost at the optimum | 5,125 | √(2 × D × S × H × (1 − d/p)) |
| Cost per unit | 0.427 | total annual cost ÷ D |
Step 5 — compare against EOQ to see what the production rate bought you. Ignoring the finite production rate gives EOQ = √(2 × 12,000 × 450 ÷ 3.20) = 1,837 units. So EPQ is 14.7% larger than EOQ here, and because inventory peaks at 1,602 instead of the full lot, holding cost drops by about 377 per year. Batch to the EOQ number and you change over 6.5 times a year instead of 5.7 — paying for roughly one extra setup you did not need.
Every figure above is what this calculator returns for those inputs. Press Load a worked example in the calculator to run them yourself and see the cost curve.
Where the EPQ formula comes from (derivation)
The formula is not arbitrary — it is the minimum of a total-cost curve. Two costs pull in opposite directions as the lot size Q changes, and EPQ is the lot size where their sum is smallest.
1. Total annual cost as a function of lot size
Bigger lots mean fewer setups per year, so setup cost falls as Q rises. Bigger lots also mean more stock sitting around, so holding cost climbs as Q rises:
The D/Q in the first term is simply how many runs you make per year. The second term is average inventory multiplied by the holding rate — and that is where the production rate enters.
2. Why average inventory is Q/2 × (1 − d/p), not Q/2
Under EOQ a full order lands at once, so stock jumps to Q and then drains to zero: average inventory is Q/2. Under EPQ you are producing and consuming at the same time. During the run, stock grows at only (p − d) per day rather than jumping, so it never reaches Q — it tops out at Q × (1 − d/p). Halve that peak and you get average inventory. This single change is the whole difference between the two models.
3. Setting the derivative to zero
TC(Q) is a convex curve, so its minimum is where the slope is flat. Differentiating with respect to Q:
Rearranging for Q gives Q² = 2DS / (H(1 − d/p)), and taking the square root returns the EPQ formula. A useful consequence falls out of the same equation: at the optimum the two cost terms are equal. In the example above, annual setup cost and annual holding cost are each about 2,562 — half of the 5,125 total. That is a quick sanity check on any lot size you are handed.
4. What the model assumes
- Demand is steady and known. Constant d per day, no seasonality. If demand is lumpy, EPQ sizes the average case — pair it with safety stock for the variability.
- Production rate exceeds demand rate (p > d), otherwise stock never accumulates and the model has no solution.
- Setup cost is fixed per run and does not depend on lot size.
- Holding cost is linear in average inventory — no step changes when a warehouse fills up.
- One item at a time. The single-item model ignores machines shared between products competing for the same capacity.
- No quantity discounts and no shortages. Every unit costs the same and stockouts are not permitted.
Real shop floors violate at least one of these. Treat EPQ as the starting point that setup and holding economics justify, then adjust for capacity, shelf life, and pallet or container sizes.
EOQ vs EPQ side by side
| EOQ | EPQ | |
|---|---|---|
| Situation | You buy the item | You manufacture the item |
| How stock arrives | Whole order at once | Gradually, during the production run |
| Peak inventory | Q | Q × (1 − d/p) |
| Average inventory | Q / 2 | Q/2 × (1 − d/p) |
| Formula | √(2DS / H) | √(2DS / (H(1 − d/p))) |
| Resulting lot size | Smaller | Larger |
| Example above | 1,837 units | 2,107 units |
EOQ is the special case of EPQ where production is instant. Push p far above d and (1 − d/p) approaches 1, at which point the two formulas are identical.
Why it matters on the shop floor
Using EOQ when you actually produce in-house systematically under-sizes your runs. You end up changing over more often than necessary, burning setup time and capacity. EPQ also tells you the run time per batch and the cycle length between runs — the numbers you need to schedule production, not just size it.