Loading ModelMetric Lab
LLM planning

LLM context window calculator

Add the token budgets that compete inside one request. The calculator includes an output allowance and a configurable safety reserve, then shows whether the plan fits.

Free · no sign-in · updates instantly

1. Enter your token budgets

The model’s maximum request context
Rules, persona, format, and tool guidance
Previous turns sent again
Documents, chunks, or search results
Space reserved for the model’s answer
Buffer for variation and uncounted content
Try an example:

Planning…

Planned total0 tokens

Input + output + reserve

Remaining0 tokens

Capacity after the plan

Prompt budget0 tokens

Window minus output and reserve

Rough words0 words

Prompt budget ÷ 1.33

How this calculator works

The fixed input is system instructions + conversation history + retrieved context. Planned usage adds the output allowance and the percentage reserve. A positive remaining value means the assumptions fit; it does not replace measurement with the model’s tokenizer.

input = system + history + retrieval reserve = context window × reserve % planned = input + output + reserve remaining = context window − planned

Read the full explanation

See LLM context window explained for the worked arithmetic, word-count caveats, overflow strategies, and common mistakes. For the token estimate behind the rough word result, read how many tokens are in 1,000 words?.