Economic Production Quantity Calculator
Find the optimal production batch when goods are made gradually while demand continues.
What it does
The economic production quantity model answers a common manufacturing question: how many units should one production run make? The answer balances two opposing costs. Long runs spread the setup cost over more units but build more inventory, which costs money to hold. Short runs keep inventory low but pay for setup more often.
The standard EOQ model assumes an entire order arrives at once. EPQ relaxes that assumption for a factory that makes the product itself. Goods are produced at a daily rate while they are also being used at a daily demand rate. Inventory therefore builds only at the difference between those two rates, and the effective holding cost is reduced by that factor.
The formula is a square root. The numerator is two times annual demand times setup cost. The denominator is holding cost multiplied by one minus daily demand over daily production. The production rate must exceed the demand rate, otherwise inventory never builds and the model has no solution.
The tool prints the optimal batch size, the peak inventory reached during a run and the cycle length in days. Peak inventory is the lot size times the same usage factor, and cycle length is the lot size divided by daily demand. Those two numbers help plan storage space and production scheduling.
The result is a planning figure under strong assumptions. Demand and production rates must be steady, costs must be known and shortages must not occur. Quantity discounts, capacity limits, seasonal demand and changeover losses all sit outside the model.
How to use
- Enter annual demand in units per year.
- Enter the cost of setting up one production run.
- Enter the annual holding cost for one unit.
- Enter daily demand and daily production using the same time basis.
- Check that the production rate is greater than the demand rate.
- Read the optimal batch, peak inventory and cycle length.
Formula
- D
- Annual demand in units per year.
- S
- Setup cost for one production run.
- H
- Holding cost per unit per year.
- d
- Daily demand or usage rate.
- p
- Daily production rate, greater than d.
- Q*
- Optimal production lot size in units.
The factor one minus d over p is the fraction of production that accumulates as inventory. As p becomes very large the factor approaches one and EPQ approaches the ordinary EOQ formula. If daily production is equal to or less than daily demand, the denominator is zero or negative, so the tool returns an error rather than a meaningless square root.
Worked example
Example: 12,000 annual demand with a 200 per day production rate
Defaults: annual demand 12,000, setup 100, holding 2, daily demand 50 and daily production 200.
- Find the inventory build factor: 1 - 50 / 200 = 0.75.
- Multiply demand by setup and two: 2 x 12,000 x 100 = 2,400,000.
- Multiply holding cost by the factor: 2 x 0.75 = 1.5.
- Divide: 2,400,000 / 1.5 = 1,600,000.
- Take the square root: Q* = 1,264.91 units.
- Peak inventory is 1,264.91 x 0.75 = 948.68 units and the cycle is 1,264.91 / 50 = 25.30 days.
Reference table
| Daily production | Inventory factor | Optimal lot |
|---|---|---|
| 100 units | 0.50 | 2,190.89 units |
| 200 units | 0.75 | 1,264.91 units |
| 400 units | 0.875 | 1,171.48 units |
| Very large | About 1.00 | About 1,095.45 units |
Limits
- Assumes known and constant demand, production rates and costs.
- Does not allow shortages, quantity discounts or capacity limits.
- Requires the same time basis for daily demand and daily production.
- Ignores changeover losses, scrap and setup time that varies with batch size.
Common mistakes
- Entering weekly demand with annual holding cost without converting one of them.
- Setting daily production at or below daily demand, which the tool rejects.
- Using the EOQ formula when replenishment is gradual.
- Confusing the lot size with the peak inventory level.
- Ignoring storage capacity when the calculated batch is large.
Try it yourself
Quick checks. Answers sit tucked under each question.
Raise daily demand to 100 with the other defaults unchanged. What is the new lot?
The factor becomes 1 - 100/200 = 0.5, so Q = sqrt(2,400,000 / 1) = 1,549.19 units. Peak inventory is 774.60 units and the cycle is 15.49 days.
What happens when daily demand equals daily production?
The tool returns the error Daily production must exceed daily demand, because inventory would never build and the formula has no valid denominator.
With demand 6,000, setup 50, holding 1, daily demand 25 and daily production 100, what does the tool show?
The factor is 0.75 and 2 x 6,000 x 50 divided by 1 x 0.75 is 800,000, so the lot is 894.43 units, peak inventory 670.82 units and the cycle 35.78 days.
Questions
When should I use EPQ instead of EOQ?
Use EPQ when you manufacture the item gradually while demand continues. EOQ assumes the whole order arrives at once.
Why is peak inventory below the lot size?
Items are used while they are being made, so stock never reaches the full batch amount.
What if production is much faster than demand?
The inventory factor approaches one and EPQ approaches the ordinary EOQ result.
Do the daily rates have to match the annual demand?
They should be internally consistent. If annual demand is 12,000 on a 240 day year, an average daily demand of 50 is consistent.
Does the model handle seasonal demand?
No. It assumes a constant rate. For seasonal demand, calculate separate lots for each period.
Why must production exceed demand?
Otherwise inventory never accumulates and the production line cannot build stock to cover a cycle.
Sources
- University of Piraeus: Deterministic Inventory Models, Production Order Quantity Model
- eCampusOntario: Fundamentals of Operations Management, section 8.6 Economic Production Quantity