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.

Browser-only calculationsTransparent formulasFree to use
View calculation ↓
01 / Conversation assumptions

Plan the next request.

Full history retained. Fixed message sizes. No compaction, truncation or growing tools.

Manual token counts · no tokenizer loaded

Enter counts from your tokenizer or usage report. Character estimates are not exact token counts.

tokens
Total window including reserved output.
tokens
Leave blank if unknown; the output limit stays unchecked.
History + next requestWhole counts
tokens
Instructions, fixed tools and any starting context. Exclude the repeated exchanges below.
exchanges
One exchange is one user message and one assistant response.
tokens
Assumed fixed size of each historical user message.
tokens
Assumed fixed size of each historical answer.
tokens
Count for the next request, separate from past messages.
tokens
Space reserved for the next generated response.
tokens
Buffer for uncounted content and accounting overhead.

02 / Projected next request

History has a footprint.

Within your entered capacity

13,500tokens remaining

Based on your counts and reserves. Verify the actual model accounting before sending.

Projected request use18,500
Retained exchange history13,000
Growth per exchange1,300
Maximum completed exchanges20Capacity bound for this next request

10 additional exchanges fit before the next request reaches capacity, under these fixed-size assumptions.

Full-history growth

Planned use · tokens
Request size by completed exchangesThe teal line is planned use. The dashed line is your entered capacity. Exact sampled values follow in the table.Capacity: 32,0000 exchanges21 exchanges

Solid teal: planned use. Dashed pink: capacity. Large dot: your entered exchange count. Each point includes the next request and reserves.

Sampled growth; the selected count is marked current
CompletedPlanned tokensSigned headroom
05,50026,500
410,70021,300
815,90016,100
10 · current18,50013,500
1221,10010,900
1626,3005,700
2132,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.

  1. Enter the context capacity and fixed starting context, excluding the repeated exchanges.
  2. Set the completed exchange count and the user and assistant token sizes per exchange.
  3. 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.