# Production Run Economic Batch Size (EPQ) Calculator

> Source: https://netray.co/tools/production-run-economic-batch-size-calculator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Find the economic production quantity that balances setup cost against carrying cost when parts are made in house at a finite rate.

## Category

manufacturing

## Audience

- Planner
- Production manager
- Cost accountant

## Tool

**Kind:** calculator

**Currency:** $

**Inputs:**

#### Annual demand

**Key:** demand

**Type:** number

**Default:** 12000

**Min:** 1

**Step:** 500

**Unit:** units

#### Annual production capacity for this part

**Key:** prod_rate

**Type:** number

**Default:** 60000

**Min:** 1

**Step:** 1000

**Unit:** units/yr

**Help:** Rate while the machine runs on this part, expressed per year.

#### Cost per setup

**Key:** setup_cost

**Type:** number

**Default:** 120

**Min:** 0

**Step:** 10

**Unit:** $

**Help:** Setup hours times machine rate plus scrap on first pieces.

#### Unit cost

**Key:** unit_cost

**Type:** number

**Default:** 8.5

**Min:** 0.01

**Step:** 0.25

**Unit:** $

#### Carrying cost rate

**Key:** carry_rate

**Type:** number

**Default:** 22

**Min:** 1

**Max:** 60

**Step:** 1

**Unit:** %/yr

#### Selling days per year

**Key:** days_year

**Type:** number

**Default:** 250

**Min:** 1

**Max:** 365

**Step:** 5

**Unit:** days

**Outputs:**

#### Holding cost per unit per year

**Key:** h

**Expr:** unit_cost * carry_rate / 100

**Format:** currency

#### Capacity utilization on this part

**Key:** load

**Expr:** demand / prod_rate * 100

**Format:** percent

**Description:** Must be under 100 for the part to be feasible.

#### Economic batch size

**Key:** epq

**Expr:** sqrt(2 * demand * setup_cost / (h * clamp(1 - demand / prod_rate, 0.01, 1)))

**Format:** integer

**Primary:** true

#### Production runs per year

**Key:** runs

**Expr:** demand / epq

**Format:** decimal

#### Days between runs

**Key:** cycle

**Expr:** epq / demand * days_year

**Format:** days

#### Annual setup plus carrying cost

**Key:** annual_cost

**Expr:** demand / epq * setup_cost + epq / 2 * (1 - demand / prod_rate) * h

**Format:** currency

**Primary:** true

**Chart:**

#### Economic batch size vs setup cost

**Type:** line

**X:** setup_cost

**From:** 10

**To:** 600

**Steps:** 30

**Series:**

- epq

**Disclaimer:** Classic EPQ assumes steady demand and a constant setup cost. Constraints such as shelf life, machine minimums and material packs may override the result.

## Content

**Intro:** Choosing a batch size too small floods the shop with setups, while too large ties up cash in stock. The economic production quantity gives a defensible starting point for lot size in your MRP.

**Sections:**

#### How to use it

**Body:** Enter annual demand and the rate at which the machine can produce that part. Cost per setup should include labor, machine time and scrap of first pieces. Use unit cost with your carrying rate to get the holding cost. Read the economic batch, then round to a practical size such as a full pallet, a material pack or a whole shift of output.

#### The formula

**Body:** EPQ equals the square root of 2 times demand times setup cost, divided by holding cost per unit times one minus demand over production rate. The factor in the denominator reflects that stock builds up while production runs and is consumed at the same time, so the average inventory is lower than half of the batch.

**Bullets:**

- Higher setup cost pushes the batch up
- Higher unit cost or carrying rate pushes it down
- A production rate close to demand pushes it up sharply
- Total cost is flat near the optimum, so rounding is safe

#### Reading the result

**Body:** Check runs per year and days between runs. If days between runs are shorter than your planning cycle, the part effectively runs continuously. The sweep chart shows why reducing setup time is powerful: halving setup cost reduces the economic batch by about 29 percent and cuts the work in process you carry.

#### Common mistakes

**Body:** Teams use purchase price instead of manufactured cost, use only labor in setup cost, or leave capacity utilization above 100 percent which makes the formula meaningless. Another mistake is treating the result as law instead of a guide: respect minimums set by tooling or material packs.

**Cta:** Netray can compare these results with the lot sizes currently set in your ERP item master and flag the largest gaps.

**Faq:**

#### What is the difference between EOQ and EPQ?

**Answer:** EOQ assumes the whole order arrives at once, as with purchased parts. EPQ assumes stock builds gradually while you produce, which reduces average inventory and increases the economic quantity.

#### What setup cost should I use?

**Answer:** Include setup labor hours at the loaded rate, machine time at its hourly rate and scrap during setup. Leaving out machine time understates the cost, which leads to batches that are too small.

#### Why does capacity utilization matter?

**Answer:** If demand approaches production rate, the part nearly occupies the machine full time and the formula grows without bound. The calculator caps the factor at 1 percent, but you should treat any utilization above 85 percent as a capacity problem.

#### Should I use the result directly as lot size?

**Answer:** Use it as a starting point, then round to practical units. Because total cost is flat near the optimum, a 20 percent deviation changes annual cost by only a small amount.

## Search terms

economic production quantity calculator, epq formula, optimal batch size manufacturing, lot size calculator production, economic batch quantity, setup cost vs holding cost, how to set lot size in mrp

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
