OEE Lab / Tools / EPQ Calculator

Economic Production Quantity (EPQ) Calculator

Find the batch size, run length and runs per year with the lowest setup plus holding cost, for a line that ships while it produces. It uses the rate your line really runs at, not the nameplate. Updates as you type.

One product on one line

The defaults are the worked example below.

Demand and time
h
Production rate
The fastest proven rate for this product.
%
Effective rate = ideal rate × OEE. Enter 100 to use the ideal rate as it is.

-

Setup cost per run
min
Last good unit to first good unit of the next product.
Line cost: crew and overhead per minute while the line stands. Other: cleaning material, paperwork, tests.

-

Holding cost
%
Capital, space, insurance, handling and the risk of stock going obsolete.
Defaults: one product, 60% OEE
Economic production quantity
-units
Batch size with the lowest setup plus holding cost
Runs / year
-
Time between runs
-
Run length
-
Run length, hours
-
Max inventory
-
Average inventory
-
Setup cost / year
-
Holding cost / year
-
Total cost / year
-
Changeover hours / yr
-

Know the limits. EPQ assumes steady demand, a steady rate and one product on the line. A line that makes several products has to fit all their runs into one common cycle, where each product runs once per cycle (a rotation cycle). Use this result per product as a first estimate, then check that the runs fit together.

Cost curve: total cost against batch size

What if changeover time is halved (SMED)?

Halve the changeover minutes and see what happens to batch size, runs and stock. Demand, rate and holding cost stay as they are.

-

The working, with your numbers

  • -

Get a second opinion on this result

Send it to the OEE Lab team. A Fabrico OEE specialist reads your numbers and gets back to you by email. To keep the result, use Copy link or Print above.

Sent. A Fabrico OEE specialist will read your numbers and get back to you by email.

No newsletter, no spam. What you enter here, this result and its link go to the OEE Lab team. Privacy

EPQ is only as good as the rate and setup time you type in.

Many plants estimate both. Fabrico starts with OEE: it tracks stops live from PLCs or IoT sensors, the operator gives the cause, and add-on AI cameras count output where a machine has no usable signal. You get the real changeover minutes and the real run rate per product. The batch plan itself stays in your ERP, APS or spreadsheet.

See your real run rates: book a demo with a Fabrico consultant.

Request a demo
Our tools stay free either way.

The EPQ formula

EPQ is the batch size that keeps setup cost plus holding cost as low as possible. It fits a line that ships while it runs, so stock builds up slowly instead of arriving all at once.

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

  • D = annual demand in units.
  • S = setup cost per run: line time lost, start-up scrap and other costs.
  • H = holding cost per unit per year.
  • d = daily demand = D ÷ working days.
  • p = daily production rate the line really achieves.

From the EPQ you get the rest:

  • Runs per year = D ÷ EPQ. Time between runs = EPQ ÷ d.
  • Run length = EPQ ÷ p. This is the economic run length.
  • Max inventory = EPQ × (1 - d ÷ p). Average inventory = max ÷ 2.
  • Setup cost a year = runs × S. Holding cost a year = average inventory × H.

At the EPQ the two yearly costs are equal. That is a quick check on any result.

Worked example: the default numbers

One product sells 240,000 units a year. The line works 240 days a year and plans 16 hours a day, so daily demand is 1,000 units.

The ideal rate is 400 units an hour, but the line runs at 60% OEE. The effective rate is 240 units an hour, or 3,840 a day.

A changeover takes 60 minutes at 4 a minute (240), wastes 50 start-up units at 2 each (100) and costs 60 in other items. So S = 400 per run. Each unit costs 10 and holding stock costs 25% a year, so H = 2.50.

StepCalculationResult
d ÷ p1,000 ÷ 3,8400.2604
EPQ√(2 × 240,000 × 400 ÷ (2.50 × 0.7396))10,190 units
Runs a year240,000 ÷ 10,19023.6
Time between runs10,190 ÷ 1,00010.2 days
Run length10,190 ÷ 240 per hour42.5 h (2.65 days)
Max inventory10,190 × 0.73967,537 units
Average inventory7,537 ÷ 23,768 units
Setup cost a year23.6 × 4009,421
Holding cost a year3,768 × 2.509,421
Total9,421 + 9,42118,841
Changeover hours23.6 × 60 min ÷ 6023.6 h of 3,840

Halve the changeover to 30 minutes and only the line-time part of S halves, so S falls from 400 to 280. EPQ drops to 8,526 units, runs rise to 28.1 a year and average stock falls to 3,153 units. Total cost falls to 15,764 a year.

If the whole setup cost halved, EPQ would fall by √0.5, to 7,206 units, with 33.3 runs a year.

Why OEE belongs in EPQ

Textbooks use one production rate. On a real line, stock only grows at the rate the line actually makes good units, which is the ideal rate times OEE.

Run the default example with the ideal rate of 400 an hour and EPQ comes out at 9,541 units. The plan says the run takes 23.9 hours. At the real 240 an hour it takes 39.8 hours, two thirds longer. The next product waits, and stock of it can run out.

So plan with the effective rate. If OEE swings a lot between runs, plan with a cautious figure and measure it per product. The OEE calculator gives you that figure from one shift of numbers.

Changeover time works the same way. Shorter setups lower S, so smaller batches become cheap. The changeover cost calculator prices the hours a shorter setup gives back, and how many changeovers per shift shows the capacity limit from the other side.

EPQ vs EOQ

EOQ is for buying: the whole order arrives at once, so stock jumps to the full batch. EPQ is for making: the line ships while it runs, so stock peaks lower, at EPQ × (1 - d ÷ p).

The only change in the formula is the (1 - d ÷ p) term. When the line is much faster than demand, the term is close to 1 and EPQ is close to EOQ. When the line barely keeps up, EPQ grows large. For a wider view of lot sizing methods, Fabrico has a lot sizing guide for manufacturing.

Common mistakes

  • Using the nameplate rate. The line refills stock at its effective rate. Use ideal rate × OEE.
  • Leaving start-up scrap out of S. The first units after a change are often lost. They are part of what each run costs.
  • Using guessed changeover minutes. Measure them from last good unit to first good unit. See how to measure changeover time.
  • Using only the cost of capital for H. Space, handling, insurance and obsolete stock count too.
  • Planning each product alone. On a shared line the runs must fit one cycle. Check the hours of all products together.
  • Chasing the exact number. The cost curve is flat near its bottom. Round to a pallet or a shift.

EPQ calculator FAQ

What is the economic production quantity?

It is the batch size that gives the lowest sum of setup cost and holding cost a year, for a line that ships while it produces. The formula is EPQ = √(2DS ÷ (H × (1 - d/p))), where d is the daily demand and p the daily production rate.

What is the difference between EPQ and EOQ?

EOQ assumes the whole batch arrives at once, as with a purchase order. EPQ assumes stock builds up while the line runs and demand draws it down at the same time, so the peak stock is lower and the best batch is larger.

What is the economic run length?

It is the time the line needs to make one EPQ batch: EPQ divided by the production rate. In the default example it is 10,190 units ÷ 240 units an hour, about 42.5 hours.

Should I use the ideal rate or the OEE-adjusted rate?

Use the rate the line really refills stock at, which is the ideal rate times OEE. With the ideal rate the run looks shorter than it will be, and the line can run out before the next batch.

What happens when demand is equal to or above the production rate?

Then there is no EPQ. The line never builds stock, so it has to run all the time with no room for changeovers. You need more effective rate, more hours or a second line before batch size matters.

Can I use EPQ for a line that makes several products?

As a first estimate per product, yes. But the runs share one line, so they must fit into one common cycle in which each product runs once. That is the rotation cycle, and it usually moves each batch away from its own EPQ.

← All OEE Lab tools · Open the OEE calculator