# SAP Economic Production Quantity (EPQ) Lot Size Calculator

> Source: https://netray.co/tools/sap-pp-epq-lot-size-calculator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Find the cost-minimizing lot size for an in-house part using setup cost, holding cost and production rate, and see how setup cost moves it.

## Category

sap

## Erp

SAP S/4HANA

## Audience

- SAP PP consultant
- Production planner
- Supply chain analyst

## Tool

**Kind:** calculator

**Currency:** $

**Inputs:**

#### Annual demand

**Key:** annual_demand

**Type:** number

**Default:** 24000

**Min:** 0

**Step:** 500

**Unit:** units/year

#### Setup cost per production run

**Key:** setup_cost

**Type:** number

**Default:** 180

**Min:** 0

**Step:** 10

**Unit:** currency

**Help:** Machine setup labor, scrap on startup and lost capacity value per run.

#### Standard cost per unit

**Key:** unit_cost

**Type:** number

**Default:** 22

**Min:** 0.01

**Step:** 0.5

**Unit:** currency

#### Annual holding cost rate

**Key:** holding_pct

**Type:** number

**Default:** 20

**Min:** 0

**Max:** 100

**Step:** 1

**Unit:** % of unit cost

**Help:** Capital, storage, insurance and obsolescence, typically 15 to 30 percent.

#### Production rate

**Key:** prod_rate

**Type:** number

**Default:** 96000

**Min:** 1

**Step:** 1000

**Unit:** units/year

**Help:** How many units the line could make per year if running only this part.

**Outputs:**

#### Holding cost per unit per year

**Key:** h

**Expr:** unit_cost * holding_pct / 100

**Format:** currency

#### Basic EOQ (instant replenishment)

**Key:** eoq

**Expr:** sqrt(2 * annual_demand * setup_cost / h)

**Format:** integer

**Description:** Valid when the whole lot arrives at once, as for purchased parts.

#### Production adjustment factor

**Key:** factor

**Expr:** max(1 - annual_demand / prod_rate, 0.02)

**Format:** decimal

**Description:** One minus demand rate over production rate.

#### Economic production quantity

**Key:** epq

**Expr:** sqrt(2 * annual_demand * setup_cost / (h * factor))

**Format:** integer

**Primary:** true

**Description:** Optimal in-house lot size, larger than EOQ because stock builds while the line runs.

#### Production runs per year

**Key:** runs

**Expr:** annual_demand / epq

**Format:** decimal

#### Run length at full rate

**Key:** run_days

**Expr:** epq / prod_rate * 365

**Format:** days

**Description:** Calendar days of continuous production for one lot.

#### Annual setup plus holding cost

**Key:** total_cost

**Expr:** runs * setup_cost + epq / 2 * factor * h

**Format:** currency

**Primary:** true

**Chart:**

#### EPQ vs setup cost per run

**Type:** line

**X:** setup_cost

**From:** 10

**To:** 1000

**Steps:** 30

**Series:**

- epq

**Disclaimer:** Classical model: constant demand, constant production rate, no capacity conflicts. Use it as a starting point and round to a practical lot, pallet or shift.

## Content

**Intro:** SAP offers lot sizing procedures such as fixed lot size, replenish to maximum stock level and period lot sizing, but it does not tell you the economically best lot. This calculator gives you the EPQ and EOQ so you can set the fixed lot size or rounding value with a reason behind it.

**Sections:**

#### How to use this calculator

**Body:** Enter annual demand, the cost to set up one run, unit standard cost, holding cost rate and the production rate. The output is the optimal lot and the resulting annual cost. Move the setup cost to see the effect of a SMED project, or compare scenarios by exporting each result.

**Bullets:**

- Use the standard cost from the costing run (CK11N or CK13N) for unit cost.
- Setup cost should include lost throughput on a bottleneck work center.
- If production rate is far above demand, EPQ approaches the basic EOQ.

#### The formulas

**Body:** EOQ equals the square root of (2 times demand times setup cost divided by holding cost per unit). For in-house production the EPQ divides the holding cost by (1 minus demand over production rate), since inventory builds up more slowly than the lot size while the machine is running. Annual cost is setup cost times runs plus average inventory times holding cost, where average inventory is half the lot times the adjustment factor.

#### Mapping the result to SAP

**Body:** In the MRP 1 view choose a lot sizing procedure. For a fixed lot, use procedure FX and enter the value in Fixed Lot Size (MARC-BSTFE). For a constrained lot, use the minimum and maximum lot size fields (MARC-BSTMI, MARC-BSTMA) and rounding value (MARC-BSTRF). Procedure EX (lot for lot) is correct when setup is negligible, and period lot sizing (WB, MB, TB) groups requirements in time buckets instead.

**Bullets:**

- Round the EPQ to a pallet, bin or shift multiple and key it as the rounding value.
- Recheck after cost changes, since setup and holding rates shift the answer by the square root.

#### Common mistakes

**Body:** The biggest error is using an unrealistically small setup cost, which pushes toward lot for lot and produces many short runs on a constrained resource. Another is ignoring shelf life, minimum campaign sizes or tool life, any of which can override the economic answer.

**Bullets:**

- The cost curve is flat near the optimum, so a lot 20 percent off costs only a few percent more.
- Always compare against capacity: many small lots may be infeasible even if cheaper on paper.

**Cta:** If you want lot sizes recalculated across thousands of SAP materials from live cost and demand data, Netray can build that as a reviewed, read-only analysis before anyone updates the material master.

**Faq:**

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

**Answer:** EOQ assumes the whole lot arrives at once, as in purchasing. EPQ assumes the lot is produced gradually while demand is being served, so average inventory is lower and the optimal lot is larger.

#### Which SAP lot sizing procedure uses the result?

**Answer:** Fixed lot size (FX) with the Fixed Lot Size field is the direct match. You can also feed the value into the rounding value or the minimum lot size fields, depending on the planning policy.

#### Should I use lot for lot instead?

**Answer:** Lot for lot (EX) is reasonable when setup cost is small, demand is lumpy or the item is made to order. For stable demand with real setup costs, an economic lot normally lowers total cost.

#### How often should lot sizes be reviewed?

**Answer:** Review annually or when setup time, cost of capital or demand changes materially. A SMED project that halves setup time cuts the optimal lot by roughly 30 percent.

## Search terms

economic production quantity calculator, epq calculator, sap optimum lot size, sap lot size calculation, eoq vs epq, sap fixed lot size value, sap lot size fixed order quantity, optimal production lot size calculator

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