Work out just in time batch size instantly with clear inputs, formula shown and shareable results.
Just-in-time batching uses the economic production quantity, the EOQ variant that accounts for goods being consumed while they are still being made. The (1 - d/p) factor shrinks peak inventory, and lower changeover cost is what allows genuinely small batches.
Economic production quantity
EPQ = sqrt(2 D S / (H x (1 - d/p)))
Peak inventory
Peak = EPQ x (1 - d/p)
Attack setup cost. Halving changeover time reduces the economic batch by about 29%, which is the whole logic behind SMED and quick-change tooling.
Then the line cannot keep up and the formula collapses to plain EOQ; capacity, not batching, is the constraint.