Context window · budget planner
Context Budget Planner
See how much of a model's context window your system prompt, tool block, and chat history are using — as one role-based bar — and the exact turn you'll overflow. Pick a model to load its real context window, enter your token budget, and watch the headroom shrink. Everything runs in your browser; nothing is uploaded.
You know it fits — see what it costs per turn as the history grows, across every model.
How it works
What this planner does
An LLM has no memory between requests, so every turn resends the whole context: your system prompt, your tool / function definitions, and the entire conversation history so far. All of that has to fit inside a fixed context window — and whatever room is left is the only space the model has to write its next reply. This tool draws those four parts as one stacked bar against the real window of the model you pick, so you can see at a glance which part is eating the budget and how much headroom is left.
The key number is the overflow turn. Because the system prompt and tools are a fixed cost resent every turn, and the history grows by roughly the same number of tokens each turn, the turn you run out of room is exact math: floor((window − system − tools) / tokens-per-turn) + 1. Knowing that number ahead of time lets you trim the system prompt, prune the tool block, summarize old history, or move to a bigger-window model before a request errors out mid-conversation.
Pick a model
Loads its real context window and max-output cap — or choose Custom to type your own window.
Enter your budget
System prompt, tool block, average tokens per turn, and how many turns deep you expect to go.
Read the bar
System / tools / history / headroom as a share of the window, with a warning past 80% and overflow at 100%.
Plan the fix
See the overflow turn and remaining output tokens, then trim, summarize, or size up before you hit the wall.
Reference
Context windows & output caps — July 13, 2026 snapshot
These are the windows and single-reply output caps seeded into the planner. They are planning figures extrapolated from each provider's public direction as of mid-2026 — providers ship larger windows and beta long-context tiers often, so confirm against the live docs for anything load-bearing, or use the Custom option to enter an exact window.
| Model | Context window | Max output / reply |
|---|---|---|
| GPT-5.6 Sol | 400,000 | 128,000 |
| GPT-5.6 Terra | 400,000 | 128,000 |
| GPT-5.6 Luna | 400,000 | 64,000 |
| GPT-4.1 nano | 1,000,000 | 32,000 |
| Claude Fable 5 | 500,000 | 64,000 |
| Claude Opus 4.8 | 200,000 | 64,000 |
| Claude Sonnet 5 | 1,000,000 | 64,000 |
| Claude Haiku 4.5 | 200,000 | 32,000 |
| Gemini 3.5 Flash | 1,000,000 | 64,000 |
| Gemini 3.1 Pro | 2,000,000 | 64,000 |
| Gemini 3 Flash | 1,000,000 | 32,000 |
Snapshot dated 2026-07-13 · figures are estimates for planning, not a provider guarantee · when in doubt, use Custom.
Reading the numbers
What actually fills a context window
People assume the history is what fills the window, but for agents the tool block is often the bigger culprit. A dozen tools with rich JSON schemas and descriptions can run several thousand tokens, and that cost is paid on every single turn, right alongside the system prompt — it never scrolls away. The planner gives tools their own input and their own bar segment precisely because they are the most commonly under-counted line item.
The other trap is output headroom. Output shares the same window as input, and each model also caps a single reply at a maximum length. So the room for the next answer is the smaller of the model's max-output cap and whatever space is left after system, tools, and history. As a conversation deepens, that headroom shrinks even when the request itself still succeeds — and the first symptom is a reply that gets truncated mid-sentence, not an error.
- System + tools are fixed cost — they set the floor. If they alone are a large share of the window, every conversation starts handicapped.
- History is linear — it grows by roughly one turn's tokens per turn, which is why the overflow turn is predictable and worth planning around.
- Bigger windows are not free — many providers charge a premium once a request crosses a length threshold, and latency climbs with context size, so "just use the 1M model" has a cost too.
- Summarize before you overflow — collapsing old turns into a short recap resets the history segment and buys many more turns without changing models.
FAQ
Common questions
How big is the context window of GPT-5.6, Claude and Gemini?+
As of the July 13, 2026 snapshot seeded in this tool: GPT-5.6 (Sol / Terra / Luna) carries a 400K-token window and GPT-4.1 nano a 1M window; Claude Opus 4.8 and Haiku 4.5 are 200K, Claude Sonnet 5 is 1M and Claude Fable 5 is 500K; Gemini 3 Flash and 3.5 Flash are 1M and Gemini 3.1 Pro is 2M. These are planning figures, not a contract — providers ship larger windows and beta tiers often, so the tool also has a Custom option where you paste the exact window from the provider's docs.
How do I know if I'll overflow the context window?+
Overflow happens when your fixed cost (system prompt plus tool definitions) plus the growing transcript exceeds the window. Because the system prompt and tools are resent every turn and the history grows by roughly the same number of tokens each turn, you can compute the exact turn it tips over: it is floor((window − system − tools) / tokens-per-turn) + 1. This planner does that math for you and prints the turn number, so you can cap history, trim the system prompt, or move to a bigger-window model before you hit an API error mid-conversation.
What fills up the context window?+
Four things share one window: the system prompt (instructions, persona, rules), the tool or function definitions block (JSON schemas, resent on every call and often surprisingly large for agents), the conversation history (every previous user message and model reply, which is the part that grows), and the headroom left for the model's next reply. This tool draws all four as one stacked bar so you can see which one is eating your budget — for agents it is usually the tool block plus history, not the system prompt.
Do tool definitions count against the context window?+
Yes. Every function or tool schema you pass is serialized into the request and counted as input tokens on every single turn, exactly like the system prompt. A dozen richly-described tools can add several thousand tokens that never go away for the life of the conversation. That is why this planner gives the tool block its own input and its own segment on the bar — it is one of the most common reasons an agent overflows earlier than its author expected.
How many output tokens can I still get if my context is nearly full?+
Output shares the same window as input, and every model also caps a single reply at a maximum output length. So the tokens available for the next reply are the smaller of the model's max-output cap and whatever window space is left after system, tools, and history. This planner shows that remaining output headroom directly: if it drops toward zero the model will truncate its answer even though the request itself has not errored.
Is the token count in this planner exact?+
The math is exact for the numbers you enter; the token figures themselves are estimates unless you paste counts from a real tokenizer. Use a token counter for the system prompt and tool block, then a representative average for a full user-plus-assistant turn. English prose runs about 4 characters per token, but code, JSON tool schemas, and non-English text tokenize less predictably, so treat the window percentage as a planning estimate with a little safety margin, not a billing-exact count.