Epq (Economic Production Quantity) Calculator
Make too much at once and inventory holding costs eat you. Make too little too often and setup costs eat you instead. The economic production quantity is the batch size where those two costs balance, the cheapest point on the curve.
Enter annual demand, setup cost, holding cost, and your production rate. The calculator returns the optimal batch size, runs per year, cycle time, and the cost split, plus an optional check that prices your current batch size against the optimum so you can see the savings. A second method uses the same production-rate calculation and adds an optional storage capacity check: you enter a capacity, and the tool compares the computed maximum inventory against it. Maximum inventory is always a result the formula works out, never an input it uses.
Quick Answer
For annual demand of 10,000 units, a $500 setup cost, a $2 holding cost, and a production rate of 20,000 units a year, the economic production quantity is 3,162 units per run. That means 3.16 runs a year, a 115.4 day cycle, and a total annual inventory cost of $3,162.28, split exactly evenly: $1,581.14 of setup cost and $1,581.14 of holding cost. Running batches of 5,000 instead costs $3,500 a year, so the optimum saves $337.72 annually.
Key takeaways
- EPQ is EOQ corrected for in-house production: because stock builds up gradually while the line runs, the cheapest batch is larger than a plain EOQ would suggest.
- At the optimum the two cost lines always meet. If your setup total and holding total are far apart, your batch size is off the optimum in the direction of the larger cost.
- The production ratio D/P controls everything. As production speed approaches demand, the optimal batch grows without bound and the model stops being useful.
- The optional current-batch field is the decision feature: it prices the batch you run today against the optimum, in dollars, on the same cost model.
- Quick Answer
- How to use the EPQ calculator
- The EPQ formula, and what the production factor does
- Method note: maximum inventory is a computed output in both methods
- Worked example: 10,000 units, and the cost of staying at 5,000
- EPQ vs EOQ: which model fits your floor?
- Getting setup and holding costs right
- What competing EPQ calculators miss
- Frequently asked questions
- Add This Calculator to Your Website
How to use the EPQ calculator
- Pick a method: Standard, if you only need the production-rate calculation. Alternative, if you also want an optional storage capacity check against the computed maximum inventory; both methods need your production rate.
- Annual demand: total units demanded in a year, on the same annual basis as the production rate.
- Setup cost: the full cost of starting one run, including changeover downtime.
- Holding cost: the cost of holding one unit for one year, including the capital tied up in it.
- Production rate (both methods): line speed for this product in units per year. It must exceed annual demand, and the calculator says so when it does not.
- Storage capacity (optional, alternative method): a storage ceiling to compare against the computed maximum inventory. It is a check only: it never changes the EPQ or the computed maximum inventory. Leave it blank to skip the check.
- Current batch (optional): the batch size you run today, to price it against the optimum.
The same annual framing drives the capacity side of the question: whether the line can sustain that rate at all is what an annual production capacity calculator measures, and EPQ takes the resulting rate as a given.
The EPQ formula, and what the production factor does
Maximum inventory = EPQ × (1 − D/P)
Runs per year = D ÷ EPQ
Cycle time = 365 ÷ runs per year
Annual setup cost = runs per year × S
Annual holding cost = (EPQ ÷ 2) × H × (1 − D/P)
Where D is annual demand, S is setup cost per run, H is holding cost per unit per year, and P is the production rate. The (1 − D/P) factor is what separates EPQ from EOQ: inventory builds gradually during production instead of arriving all at once, so average inventory is lower for the same batch size, and the optimal batch grows. Standard operations references, including the inventory model summaries in the ASCM supply chain dictionary, present EPQ as the finite production rate extension of the Harris EOQ model. When P grows very large relative to D, the factor approaches 1 and EPQ collapses to the familiar EOQ formula, which is a good sanity check on any result this tool gives you.
Method note: maximum inventory is a computed output in both methods
In the textbook EPQ model, maximum inventory is an output: Imax = EPQ × (1 − D/P), where P is the production rate. Both methods on this page follow that treatment. The standard method reports Imax from your production rate; the alternative method runs exactly the same calculation and then, if you entered a storage capacity, compares the computed Imax against that capacity and reports only whether the peak fits within it or exceeds it. The capacity figure never enters the ratio D/P, never enters the square root, and is never reported back as the maximum inventory.
A worked check makes the distinction concrete: with D of 1,000, S of $100, H of $10, and a production rate P of 2,000, the ratio is 0.5, EPQ = √((2 × 1,000 × 100) ÷ (10 × 0.5)) = 200 units, and the computed maximum inventory is 200 × (1 − 0.5) = 100 units. If you also enter a storage capacity of 2,000 units in the alternative method, the capacity check reports that the 100-unit peak fits within that capacity; the maximum inventory result stays 100 units, not 2,000.
Some other EPQ pages online present a variant that puts a maximum inventory figure M in place of P in the ratio. That is not the textbook treatment and this tool does not use it: a storage ceiling is not a production rate. If you do not know your production rate, estimate it from line output first rather than substituting a stock level.
Worked example: 10,000 units, and the cost of staying at 5,000
Annual demand 10,000 units, setup $500 per run, holding $2 per unit per year, production rate 20,000 per year. D/P = 0.5, so EPQ = √((2 × 10,000 × 500) ÷ (2 × 0.5)) = √(10,000,000) = 3,162 units.
| Annual cost by batch size (same inputs) | Setup cost | Holding cost | Total |
|---|---|---|---|
| 2,000 units (too small, too often) | $2,500.00 | $1,000.00 | $3,500.00 |
| 3,162 units (EPQ) | $1,581.14 | $1,581.14 | $3,162.28 |
| 5,000 units (the current batch) | $1,000.00 | $2,500.00 | $3,500.00 |
| 8,000 units (too large) | $625.00 | $4,000.00 | $4,625.00 |
The curve is flat near the optimum, which is practical good news: rounding 3,162 to a convenient 3,200 or to a shift-friendly lot size costs very little. It also means the current 5,000 batch is not a disaster, just $337.72 a year of quiet waste. The cost of drifting matters more when volumes shift underneath a fixed batch habit, a pattern also priced by the change in production calculator when output levels move between periods.
EPQ vs EOQ: which model fits your floor?
| Question | EOQ | EPQ (this tool) |
|---|---|---|
| How stock arrives | All at once, as a delivered order | Gradually, as the line produces it |
| Typical user | Buyers purchasing finished goods | Manufacturers making their own stock |
| Key extra input | Ordering cost per order | Production rate, plus setup cost per run |
| Same inputs (D 10,000, cost $500, H $2) | EOQ = 2,236 units | EPQ at P of 20,000 = 3,162 units |
Using EOQ math on a production floor understates the right batch by about 29% in that comparison, because it charges the batch for peak inventory that gradual production never actually reaches. The reverse error is just as real: if you buy the item rather than make it, EPQ has no production rate to work with and EOQ is the correct frame. Shortfalls on either side of the plan carry their own price, which is the territory of the cost of understocking calculator when batches run too lean, and the cost of lost production calculator when line time is the scarce resource.
Getting setup and holding costs right
EPQ is only as honest as its two cost inputs, and both are routinely understated. Setup cost is everything spent to start a run: machine changeover labor, calibration, first article inspection, trial material scrapped during dial-in, and the contribution lost while the line stands idle. Plants that count only the fitter’s wrench time understate S, and a small S pushes the answer toward small, frequent batches that look lean and cost a fortune in changeovers.
Holding cost is the mirror error. Warehousing rent and insurance are the visible part; the larger part is usually the opportunity cost of capital tied up in stock, plus spoilage, damage, shrinkage and obsolescence. A common estimation route, described in inventory texts and in the Corporate Finance Institute material on inventory costs and turnover, expresses annual holding cost as a percentage of unit value, often 20% to 30% all-in. If your holding figure comes out far below that band, check what you left out before trusting the batch size it produces. Recalculate whenever demand, costs or capacity change materially; quarterly reviews are standard practice in most plants, and seasonal products deserve separate peak and off-season runs of the model rather than one annual average.
What competing EPQ calculators miss
The ranking EPQ tools compute the batch size and stop, sometimes adding total cost. None of them answers the follow-up every operations manager has: we already run batches of X, what is that costing us versus the optimum? Our current-batch comparison prices your status quo against EPQ in dollars. We also offer an optional storage capacity check for plants that plan around a storage ceiling: it compares the computed peak stock against your ceiling without changing the batch maths, and we show the production ratio and cycle time the thinner tools skip. Several competitors present only the square root with no runs, cycle or cost split at all, and at least one widely copied variant swaps maximum inventory into the formula in place of the production rate; this page does not use that substitution, because maximum inventory here is always computed from the batch and the production rate.
Frequently asked questions
EOQ assumes the whole order arrives instantly; EPQ accounts for a finite production rate, so inventory builds up gradually while you produce. Use EPQ when you manufacture in-house, EOQ when you purchase.
The (1 – D/P) factor shrinks toward zero and EPQ grows large: you must run almost continuously. If P is at or below D, the model breaks, and the calculator tells you so.
Warehousing, insurance, spoilage or obsolescence, and the opportunity cost of capital tied up in stock. Underestimating it is the most common EPQ mistake.
Everything spent to start a run: machine changeover labor, calibration, first-article inspection, and the downtime while the line is not producing.
The classic model assumes steady demand. For seasonal products, rerun it with peak-season and off-season demand figures separately.
Whenever demand, costs, or capacity change materially; quarterly reviews are standard practice in most plants.
Both methods use your production rate to compute EPQ, and maximum inventory is always computed as EPQ × (1 − D/P). The alternative method adds an optional storage capacity: if you enter one, the tool compares the computed maximum inventory against it and reports whether the peak fits within your capacity or exceeds it. The capacity never enters the formula and is never reported as the maximum inventory.
No. The savings line is the annual cost at your current batch minus the cost at EPQ, on the same model. In both the standard method and the alternative method, EPQ minimises the same cost function that the current batch is priced with, so savings cannot be negative: the lowest possible figure is zero, when your current batch already matches EPQ. The red negative display in the code is therefore unreachable on a single consistent run. If you ever see a negative reading, it would mean the inputs were changed between runs, so treat it as an input-check signal: check the inputs and rerun with one consistent set of inputs.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- Association for Supply Chain Management (ASCM). Supply Chain Dictionary: inventory model definitions. Accessed October 21, 2026.
- Corporate Finance Institute. Inventory Turnover and inventory cost background. Accessed October 21, 2026.
- Brave Calculator. EPQ Calculator: standard formula and worked example. Accessed October 21, 2026.
- CalculatorsHub. Economic Production Quantity Calculator: external maximum inventory variant (not used by this tool). Accessed October 21, 2026.
