What is stock and flow?

A way of describing a system by what it accumulates (stocks) and the rates that fill or drain those accumulations (flows).

Stock and flow diagram example

Public diagram from the Machinations Community. Open it on its own page

A stock is a quantity that builds up over time, such as cash in an account, inventory in a warehouse, or patients in a waiting room. A flow is a rate that adds to or removes from a stock. Separating the two helps decision makers see that a stock can only change through its flows, so fixing a level means changing a rate.

How it works

A stock at any moment equals its starting amount plus everything that flowed in minus everything that flowed out. Because stocks change slowly while flows can change quickly, stocks act as buffers and memory. A bathtub is the classic picture: the water level is the stock, the tap is the inflow, and the drain is the outflow. If the tap and the drain move at the same rate, the level stays constant even though water is moving through. If the inflow exceeds the outflow even slightly, the stock keeps rising for as long as the gap lasts.

A useful check is to ask of any number whether it is a stock or a flow. Revenue per month is a flow, while the cash balance is a stock. Mixing them up is a common source of confusing charts and wrong conclusions in budgets and plans.

Example

Say a warehouse holds 1,000 units of inventory. Each day 120 units arrive from suppliers and 100 units ship to customers. The stock changes by 120 minus 100, which is +20 units per day, so after 10 days it holds 1,200 units. A manager who only watches shipments would miss this, because the level rises quietly. If arrivals are cut to 100 per day, the stock stops growing but stays at 1,200 until shipments exceed arrivals. This is an illustration with round numbers.

How to model it in Machinations

Draw each stock as a Pool and each flow as a resource connection, with a Source for inflows from outside the model and a Drain for outflows that leave it. Set the rates on the connections, then add a chart of the Pool. Play the diagram and change one rate with a Lever to see how the level responds over time.

See stock and flow in a system you can Play

Build the rules in a Machinations diagram, change a value and Play it to watch how the system responds.