Given a budget, how many tokens can one call afford? The earlier pricing problems ran forward: tokens in, cost out. This one runs backward: cost in, tokens out. Divide the budget by the price per block, then scale up to tokens. Agents with per-call cost limits use this calculation to set a maximum context size before each turn.
Paid members: the worksheet and its printable PDF are below ↓

