GenerateRandomSearch

Economic Order Quantity Calculator

Order in large batches and you tie up money in stock. Order in small ones and you pay the ordering cost over and over. The economic order quantity is where those two costs balance, and the tidy fact underneath it is that at the optimum they are exactly equal — which gives you a way to check any answer in seconds without redoing the algebra.

What this generator does

Computes the classic square-root EOQ from annual demand, cost per order and holding cost per unit per year — your own figures, or a generated scenario's — then reports the resulting order frequency, cycle length and both cost components. It also evaluates the total cost 10% above and 10% below the answer, so the shape of the curve near the minimum is visible.

How to use this tool

  1. Type your annual demand, what one order costs to place, and what a unit costs to hold for a year, then press Calculate.
  2. Or press Generate a scenario for a made-up case: its three figures land in the same boxes, where you can change one and calculate again.
  3. Check the answer using the equality: ordering cost and holding cost should match.
  4. Look at the cost 10% either side of the optimum — it barely moves.
  5. Round to a convenient case or pallet quantity; the flat curve means you lose very little.

Understanding the controls

Annual demand (units)
How many units you use or sell in a year, as a whole number from 1 to 10,000,000. The formula treats it as spread evenly through the year.
Cost per order
What it costs to place one order whatever its size — paperwork, delivery charge, the time to raise it. From 0.01 to 1,000,000, decimals allowed, in any currency so long as the holding cost uses the same one.
Holding cost per unit per year
What one unit costs to keep for a year: storage, insurance, the money tied up in it. From 0.01 to 1,000,000. If it is so high against the order cost that the cheapest order comes out under one unit, the page says so instead of answering, because there is then no batch to size.
Calculate
Works the three figures in the boxes. A box left on a figure outside its range is pulled back into range when you leave it.
Generate a scenario
Draws a plausible demand (500 to 20,000), order cost (20 to 400) and holding cost (1 to 40), works them, and writes them into the three boxes so the case can be altered and recalculated.
Seed
Any word reproduces the same generated scenario for as long as this tool is unchanged, so a worked example can be set and marked later. It has no effect on Calculate, which draws nothing.

Common use cases

  • Teaching the inventory cost trade-off with a checkable answer
  • Sanity-checking an order quantity against the textbook optimum
  • Showing why the exact EOQ rarely matters in practice
  • Worked examples for an operations management course
  • Producing practice problems with known answers

How this generator works

The EOQ formula is the square root of twice demand times ordering cost, divided by holding cost — the point where the falling ordering-cost curve crosses the rising holding-cost line. The check does not trust that derivation: it confirms the two cost components are equal at the answer, and evaluates the total cost either side to confirm the point really is a minimum rather than merely a formula's output.

Randomness and fairness

Nothing is random when you calculate with your own figures. Generate a scenario draws its three figures — demand, ordering cost, holding cost — so you can explore the relationship between them, and the order quantity is then a deterministic calculation. A seed reproduces the same scenario exactly and is therefore explicitly not cryptographically secure; without one the browser's cryptographically secure generator supplies the figures.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Assumes steady, known demand — real demand is lumpy and uncertain, which the newsvendor model addresses instead.
  • Assumes instant replenishment with no lead time; the reorder point calculator covers that separately.
  • No quantity discounts, which change the answer to a comparison between price breaks.
  • No capacity limit on storage.
  • A worked case is not kept — copy the answer, and note your figures or the scenario's seed.

Privacy and your data

The calculation runs entirely in your browser. Nothing about the figures you type or generate is transmitted or kept.