LLM Context Window Usage Calculator
Check how much of a model’s context window your prompt, history and reserved output tokens use — and how much room is left for the reply.
How it works
Used = prompt + history + output reserve · Remaining = window − used · Used % = used ÷ window × 100
A model’s context window is a hard budget shared by everything in the request: the system prompt, the user message, the running conversation history and the space the reply will occupy. Because the output is generated inside the same window, you must reserve room for it up front or the model runs out of space mid-answer. When the total exceeds the window the oldest history has to be summarised or dropped, which is why long chats start "forgetting" earlier turns.
Worked example
With a 128K window, a 4,000-token prompt, 20,000 tokens of history and 4,000 tokens reserved for the reply use 28,000 tokens — 21.9% of 128,000 — leaving 100,000 tokens of headroom.
Frequently asked questions
Why reserve tokens for the output?
The reply is written into the same context window as the input, so if the input fills the window there is no room left to generate an answer. Reserving output tokens guarantees the model can produce a response of the length you expect.
What happens when I exceed the window?
The request either errors out or the platform silently truncates the oldest tokens, usually the start of the conversation. That is why a long chat can lose track of earlier context — those tokens were dropped to fit the window.
Is context size the same as memory?
No. The context window is short-term working memory for a single request and resets each call; it is not persistent storage. Anything you want the model to "remember" across requests has to be re-sent within the window or stored externally and retrieved.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.