Context window calculator: does your request fit the model?
Every language model can only process a limited amount of text at once, its context window. Enter text or tokens, add a reserve for the answer and see which window sizes your request fits.
Estimate · runs in your browser
Does your request fit the context window?
Too large for a window? With RAG you give the model only the matching passages instead of whole documents, so every request stays small.
What is a context window?
The context window is the maximum number of tokens a language model can process in one request: input and answer together. It includes system instructions, the conversation so far, the inserted passages and the answer the model writes.
If the request is too large, the model truncates text or rejects it. A larger window helps, but costs more tokens and does not automatically make answers better.
Local models in particular often have smaller windows. If you want to use them, for example because no data may leave the building, you need to plan exactly how much context fits per request.
Typical context windows at a glance.
| Window | Roughly | Typical for |
|---|---|---|
| 8K | 6,000 words | small and older models |
| 32K | 24,000 words | many local models |
| 128K | 95,000 words | common API models |
| 200K | 150,000 words | large API models |
| 1M | 750,000 words | very-long-context models |
Classes instead of model names: window sizes change with every model version. Check your provider’s figure.
Estimate a request’s needs in four steps.
Instructions
System instructions and the assistant’s rules, often 300 to 1,000 tokens.
History
Previous questions and answers in the conversation, if the model should know them.
Context
The inserted passages, in RAG usually the largest part.
Answer
The reserve for what the model writes. Better plan a little more than too little.
Why RAG is often better than a huge window.
Dumping whole document collections into the window is expensive and slow, and models miss details in long contexts. With RAG the platform first finds the matching passages and gives the model only those. Every request stays small, cheap and backed by a source, even with local models and smaller windows.
Questions about the context window.
What happens if a request is too large?
Then the model rejects the request or truncates text, usually the start of the conversation. In the worst case exactly the information the answer needs is missing. So plan a reserve for the answer and give the model only the passages it really needs.
How much reserve do I need for the answer?
For short answers 500 to 1,000 tokens are often enough, for detailed texts 2,000 to 4,000. Many models also cap the answer length. The reserve counts towards the context window, so the calculator adds it to the input. Adjust the value to your typical answer length.
Is a larger context window always better?
No. A large window allows long inputs, but costs more tokens and time. Models also miss details more often in very long contexts. For questions about documents, RAG with a few matching passages usually gives better and cheaper answers than a full window.
Why does the calculator not name models?
Window sizes change with every new model version, often several times a year. Instead of a list that quickly goes out of date, the calculator shows typical size classes from 8K to 1M. Check the exact figure in your model’s documentation and compare it with the result.
How do I count tokens for a text?
Switch to “Paste text” above and paste the prompt, history and context. The calculator estimates the tokens in your browser. For a closer look at how the text is split, use the tokenizer. Neither tool sends anything to a server.
Small requests, good answers, with RAG.
RAGSuite gives the model only the matching passages, also with local models. Install the Community Edition or try the Cloud.