| |||||||||
Stocks and flows are the basic building blocks of system dynamics models. Jay Forrester originally coined them as "levels" (for stocks) and "rates" (for flows).
A stock (or "level variable") is some entity that is accumulated over time by inflows and/or depleted by outflows. Stocks can only be changed via flows. Mathematically a stock can be seen as an accumulation or integration of flows over time - with outflows subtracting from the stock. Stocks typically have a certain value at each moment of time - e.g. the number of population at a certain moment.
A flow (or "rate") changes a stock over time. Usually we can clearly distinguish inflows (adding to the stock) and outflows (subtracting from the stock). Flows typically are measured over a certain interval of time - eg. the number of births over a day or month.
| Stock | Inflow(s) | Outflow(s) |
| inventory | incoming goods | outgoing goods |
| guests in a hotel | guests arriving | guests leaving |
| population | births immigration | deaths emigration |
| water in bathtub | water pouring in | water leaving through sink |
| waste in disposal site | dumping waste | decay of waste |
| bank account | paying in | withdrawals |
| fuel tank | refueling | fuel consumption |