LLM context planning
Every exchange takes space.
Project the next request when a conversation retains its full history. Find the exchange limit under your own fixed-size assumptions.
View calculation ↓Plan the next request.
Full history retained. Fixed message sizes. No compaction, truncation or growing tools.
Enter counts from your tokenizer or usage report. Character estimates are not exact token counts.
History has a footprint.
10 additional exchanges fit before the next request reaches capacity, under these fixed-size assumptions.
Full-history growth
Planned use · tokensSolid teal: planned use. Dashed pink: capacity. Large dot: your entered exchange count. Each point includes the next request and reserves.
| Completed | Planned tokens | Signed headroom |
|---|---|---|
| 0 | 5,500 | 26,500 |
| 4 | 10,700 | 21,300 |
| 8 | 15,900 | 16,100 |
| 10 · current | 18,500 | 13,500 |
| 12 | 21,100 | 10,900 |
| 16 | 26,300 | 5,700 |
| 21 | 32,800 | -800 |
Maximum output unknown: output-limit check is not performed.
These are fixed-size exchanges, not a forecast of real message lengths. Provider-specific preserved or removed reasoning blocks are outside this formula. Managed chat products may compact history.
What grows with each exchange?
base + completed × (user + assistant) + next user + next output reserve + safety margin. All terms are tokens except the completed-exchange count. The exchange bound only checks capacity; a known output maximum is checked separately.
How conversation history uses a context window
When every previous message is retained, each completed user-and-assistant exchange adds to the next request. This calculator projects that growth using fixed message sizes.
- Enter the context capacity and fixed starting context, excluding the repeated exchanges.
- Set the completed exchange count and the user and assistant token sizes per exchange.
- Reserve the next user message, answer and safety margin, then inspect the capacity bound and growth table.
Worked example
Ten completed exchanges of 500 user tokens and 800 assistant tokens retain 13,000 tokens of history, before the fixed base and next-request reserves.
The projection assumes full retained history and constant message sizes. Compaction, truncation, growing tools and provider-specific reasoning accounting are outside this formula. Read the formulas and sources.