Skip to content

Stock Allocation Simulator

Enter the units in stock and one request per line as “customer ; quantity”. Choose how a shortage is shared: first come first served, in the order of the list, or in proportion to what each customer asked for. You get the units delivered, the units missing for each customer, and a CSV of the shortages.

Allocation

4 units short

17 units delivered of 21 requested · 0 units left in stock · 1 customer short
CustomerRequestedDeliveredMissingFilled
Shop A880100%
Shop B770100%
Shop C62433%

How it works

  1. Enter the stock available, in whole units.
  2. Write one request per line: customer ; quantity, in the order the requests came in.
  3. Choose “in request order” or “in proportion to the requests”.
  4. Read the delivered and missing units of each customer, then copy the summary or the shortages CSV.

What people use it for

  • Limited releases

    Check what each shop receives from a delivery that is smaller than the orders.

  • Shared supplies

    Split a stock of tickets, seats or kits between teams that asked for more than there is.

  • Supplier shortages

    Compare a first-come rule with a fair-share rule before you answer your customers.

Questions

How does the request order mode work?
Each request takes what it asked for, up to what is left. With a stock of 17 and requests of 8, 7 and 6, the deliveries are 8, 7 and 2, and the last customer is 4 short. With a stock of 0, nobody receives anything.
How does the proportional mode work?
When the total of the requests is above the stock, each customer gets the stock times their request divided by the total, rounded down. The units that remain go, one each, to the customers with the largest fractional remainder, and to the first listed in a tie. Nobody gets more than they asked for, and the delivered units add up to the stock.
What if the stock is larger than the demand?
Every request is filled in both modes and the rest of the stock is shown as left. A request of 0 is allowed and stays at 0.
What are the limits?
Quantities and stock are whole numbers from 0 to 1,000,000, with up to 2,000 requests. The page does not handle minimum orders, pack sizes, priorities or backorders, and it shares nothing with a server.