What this tool tells you
The context window is the total working memory of a request. Everything competes for the same budget: the system prompt, every prior turn, tool definitions, attached documents, and the response the model is about to generate. Paste your text here and each model shows how much of its window you would consume and whether the request would go through at all.
Only models whose window we have verified against the provider’s own documentation appear in the table. Where a provider does not publish the figure clearly, the model is left out rather than filled in with a plausible guess.
Why you must reserve room for the answer
This is the failure people hit first. Your 190,000 token document technically fits inside a 200,000 token window — and then the model has 10,000 tokens to think and answer in, which is not enough for a substantial reply. Set the reserve field to the longest answer you actually need. For a summary, a few hundred tokens. For a rewritten document or a generated file, size it to the output.
Overflow behaviour varies. If the input alone exceeds the window, every provider rejects the request outright. If input plus your requested maximum output exceeds it, newer models generally accept the call and simply stop generating when the limit arrives — which produces a truncated answer rather than an error, and is considerably harder to notice in production.
A bigger window is not automatically better
Million-token windows are now common, and the instinct is to fill them. Resist it. Retrieval and recall degrade as the window fills — the effect usually called context rot — and Anthropic’s own documentation makes the point explicitly: curating what goes into context matters as much as how much space is available.
In practice a tightly retrieved 20,000 token prompt beats a padded 500,000 token one on both accuracy and cost, and the cost difference is not marginal. Long context is billed on every turn of a conversation, so a bloated prompt is not a one-off charge — it is a per-request tax that compounds across the whole deployment. The cost calculator will show you what the padding is worth annually.
When your text does not fit
- Retrieve instead of stuffing. Chunk the document, embed it, and send only the passages relevant to the question. This is almost always the right answer and almost always cheaper.
- Compact the conversation. For long agent sessions, summarise earlier turns into a compact state artifact rather than replaying the full history on every call.
- Strip structural waste first. Minified JSON, no pretty-printing, no repeated boilerplate. Frequently removes 20–30% with zero information loss — see it happen in the tokenizer playground.
- Then, and only then, move to a larger window. It is the expensive option, and it treats the symptom.
On the counts in this table
Token counts for OpenAI models are exact — the real encoding runs in your browser. Counts for other providers are marked as estimates because no browser tokenizer exists for them. When you are close to a window limit, that distinction matters: leave real headroom rather than trusting an estimate to the last percent. The token counter shows the same figures alongside cost, and the methodology page documents every scaling factor.