The context window is the amount of text a language model can take into account in one pass. It covers your input, the conversation so far, any documents you attach and the model's own answer. It is measured in tokens, not words.
Picture a desk. Everything on it, the model can see and use. Whatever no longer fits on the desk does not exist for the model. Take a contract of 120 pages as an example. Depending on the model, it fits on the desk in one piece, or you have to hand it over in parts. The big providers currently offer about 1 million tokens (Claude Opus 5.5, GPT-6.1 Sol, Gemini 4 Argon), and in the apps it can be smaller depending on product, model and plan.
For practice, three questions matter more than the number on the spec sheet: does my document fit, does the model use it reliably, and what does it cost? That is what this page is about.
On top of that, every provider counts differently: the same German text of 128,000 tokens (measured with o200k_base) was billed at 128,121 to 269,217 tokens in our test, up to 2.1 times as much (section 5.1).
The result up front: a contract of 120 pages (73,000 tokens) costs $0.15 with Claude Sonnet 5.5 when sent once, and only $0.007 when read from the cache. That is 20 times cheaper (section 6). Of 347 models in our directory, 97 have a window of at least 1 million tokens (section 4). Images and audio count too: one screenshot takes about 1,560 tokens, one hour of audio 115,200 (section 2.1).
1. Tokens, not words: how much text fits?
A token is a piece of text, usually a word or part of a word. For English, a common rule of thumb is that one token equals about three quarters of a word. For its current tokenizer, Anthropic states that 1 million tokens correspond to roughly 555,000 English words, where earlier models fit about 750,000. The figure depends on the tokenizer. Other languages, German in particular, need more tokens per word.
The table below uses 1.35 tokens per English word and 450 words per page, the rule of thumb for older tokenizers. With Anthropic's current tokenizer, a million tokens hold only about 555,000 English words, so expect roughly a quarter less text in the last rows. These are rough assumptions for a worked example. Your text can differ, and the token counter shows the exact value.
- English words
- 6,000
- Book pages
- 15
- English words
- 24,000
- Book pages
- 55
- English words
- 95,000
- Book pages
- 210
- English words
- 148,000
- Book pages
- 330
- English words
- 741,000
- Book pages
- 1,645
2. What counts toward the window
Many people assume the window only concerns the document they upload. In fact, several things share the space.
- System prompt. The instruction at the start, such as role and rules. More in the entry on the system prompt.
- Documents and tool results. Everything you or an agent put into the request.
- Conversation history. Every earlier question and answer is sent again with each new message.
- Your current question.
- Room for the answer. The model's output also uses the window, and for reasoning models so do the internal thinking steps.
For GPT-6.1 Sol, OpenAI documents a window of 1,050,000 tokens, of which at most 128,000 are for output. Anthropic lists a window of 1 million tokens and at most 128,000 output tokens for Claude Opus 5.5. The output limit is therefore a separate limit inside the window.
Here is how the split looks in the worked example. The window is deliberately set to 200,000 tokens so that the contract takes up visible room. Apart from the contract, the values are freely chosen assumptions.
2.1 Images, audio and video in the window
Text is not the only thing that takes up room. Images and audio are converted into tokens before processing and count like text. With Claude, every 28 × 28 pixel patch costs one token. An image therefore takes ⌈width / 28⌉ × ⌈height / 28⌉ tokens after it has been downsized to the model's limit (standard tier: at most 1,568 tokens per image). Gemini counts an image of up to 384 pixels per side as 258 tokens and audio as 32 tokens per second. The table shows what that means for the window.
- Tokens
- 1,296
- Equals pages of text
- 2.1
- Tokens
- 1,560
- Equals pages of text
- 2.6
- Tokens
- 258
- Equals pages of text
- 0.4
- Tokens
- 1,920
- Equals pages of text
- 3.2
- Tokens
- 115,200
- Equals pages of text
- 190
On paper, 128 screenshots fit into a window of 200,000 tokens before a single word of text is added. With Gemini, one hour of audio equals roughly 190 pages of text. Other providers and models count differently, so the values apply to the models named. If you pack many screenshots or long recordings into one prompt, count the tokens first.
3. A worked example: a 120-page contract
The contract has 120 pages of 450 words each, which makes 54,000 words. At 1.35 tokens per word, that is about 73,000 tokens. Whether it fits is answered by comparing it with the window.
- Context window
- 1,000,000
- Used by the contract
- 7.3 %
- Result
- fits
- Context window
- 1,050,000
- Used by the contract
- 7 %
- Result
- fits
- Context window
- 1,048,576
- Used by the contract
- 7 %
- Result
- fits
- Context window
- 200,000
- Used by the contract
- 36.5 %
- Result
- fits
- Context window
- 128,000
- Used by the contract
- 57 %
- Result
- fits
- Context window
- 8,192
- Used by the contract
- 891.1 %
- Result
- does not fit
The large current models take the contract. Claude Haiku 4.5, Llama 3.1 405B and Gemma 2 9B stand for smaller and older window sizes. A model with 8,192 tokens holds only about a tenth of the contract. “Fits” is only the first hurdle. The contract also has to be read reliably, and it costs money. The next section shows how many models play in which league.
4. How big are the windows of more than 300 models?
In our directory, 97 of 347 models offer a window of at least 1 million tokens, and the largest documented one belongs to Llama 4 Scout with 10,485,760 tokens. In the table you can filter by provider and sort by size. The data is the same as in the model directory.
| Context window | ||
|---|---|---|
Meta | 10.5M | |
Alibaba | 10M | |
Google | 2M | |
Google | 2M | |
xAI | 2M | |
xAI | 2M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M | |
OpenAI | 1.1M |
The median window of models released in the last twelve months is about 1,000,000 tokens. A large window is no longer a unique selling point. Models differ more in how well they use it. Two studies show how big the gap between window and practice can be.
5. Why bigger is not automatically better
Why is there a limit at all? In a transformer, the attention mechanism relates every token to the others. Without caching, the cost of this grows quadratically with the length of the text. When generating the answer, the model therefore keeps intermediate values for every previous token in a so-called KV cache, and this memory keeps growing with every token. Longer windows therefore cost compute time and GPU memory.
Having a window, however, does not mean using it evenly well.
- Lost in the Middle (Liu et al., 2023). Models use information at the beginning and the end of a long prompt better than information in the middle. When the decisive passage sits in the middle, accuracy drops.
- RULER (Hsieh et al., 2024). The authors tested how long a context models actually handle. Of the models they evaluated that advertise at least 32,000 tokens, only about half kept satisfactory performance at that length.
This leads to the difference between advertised and effective context. The advertised window is the technical ceiling. The effective context is the length at which the model still solves your task reliably. Both studies tested older models, and current models may score differently. The studies cannot tell you whether a model solves your task reliably at full length, though. Test with your own documents instead of trusting the number on the spec sheet.
For long prompts, a simple rule helps. Put the most important information and your question at the beginning or the end, not in the middle.
5.1 Own test: does the model find one passage in a long text?
On November 9, 2026, we tested whether models can find a single passage in a long text. The haystack is a German framework contract in which one sentence gives the notice period for the cooling unit in the Bremerhaven warehouse (47, 83 or 29 days). It was 8,000, 32,000 and 128,000 tokens long (measured with o200k_base), the sentence sat at 10, 50 and 90 % of the length, and every cell ran three times. All models got the same prompt, the question about the notice period.
- Notice period named correctly
- 27 of 27
- Notice period named correctly
- 27 of 27
- Notice period named correctly
- 27 of 27
- Notice period named correctly
- 27 of 27
- Notice period named correctly
- 18 of 18 (8,000 and 32,000 tokens only)
The result: 126 of 126 attempts found the notice period, for all 5 models, in every cell. Llama 3.1 8B ran only up to 32,000 tokens, because 128,000 o200k_base tokens exceed its window of 131,072 tokens in its own tokenizer. The test is therefore saturated and shows only the easiest long-context task: a single, literally findable passage. It says nothing about linking several passages, counting or reasoning. The text is templated and repetitive, which can make the passage stand out more than in a real contract. The distractor clauses named other notice periods of 14 to 120 days, but never the values being sought. The reasoning setting was the lowest per model, and “low” is not zero reasoning.
The strongest side finding concerns the bill. The same haystack of 128,000 o200k tokens was counted differently by the providers:
- Reported prompt tokens
- 128,121
- Versus GPT-6.1 Terra
- 1.00×
- Cost per request
- $0.160
- Reported prompt tokens
- 139,594
- Versus GPT-6.1 Terra
- 1.09×
- Cost per request
- $0.105
- Reported prompt tokens
- 158,263
- Versus GPT-6.1 Terra
- 1.24×
- Cost per request
- $0.021
- Reported prompt tokens
- 269,217
- Versus GPT-6.1 Terra
- 2.10×
- Cost per request
- $0.134
For the same German text, Claude Haiku 5.5 counted 2.1 times as many tokens as GPT-6.1 Terra, which also pushed the request into its price tier above 100,000 tokens. For the shorter text of 32,000 o200k tokens, Llama 3.1 8B reported 41,423 tokens. The costs are the figures reported by the provider, not an invoice. A “window of 1 million tokens” therefore holds a different amount of German text at different providers.
5.2 Running locally: the window costs GPU memory
If you run an open-weights model on your own machine, you feel the window size in memory. Besides the weights, the model keeps the KV cache, and it grows with every token in the window. The table uses the formulas and architecture data from the hardware check for open-source LLMs: weights in 4-bit (Q4_K_M) and a full-precision cache (f16), without runtime overhead.
- Weights (4-bit)
- 4.9 GB
- Cache at 32,768 tokens
- 4.3 GB
- Cache at 131,072 tokens
- 17.2 GB
- Total at 131,072
- 22.1 GB
- Weights (4-bit)
- 5.5 GB
- Cache at 32,768 tokens
- 1.1 GB
- Cache at 131,072 tokens
- 4.3 GB
- Total at 131,072
- 9.8 GB
- Weights (4-bit)
- 16.5 GB
- Cache at 32,768 tokens
- 3.1 GB
- Cache at 131,072 tokens
- 11.2 GB
- Total at 131,072
- 27.7 GB
- Weights (4-bit)
- 19.6 GB
- Cache at 32,768 tokens
- 8.6 GB
- Cache at 131,072 tokens
- 34.4 GB
- Total at 131,072
- 53.9 GB
- Weights (4-bit)
- 42.8 GB
- Cache at 32,768 tokens
- 10.7 GB
- Cache at 131,072 tokens
- 42.9 GB
- Total at 131,072
- 85.8 GB
For Llama-3.1-8B-Instruct (8 B), the cache grows from 4.3 GB at 32,768 tokens to 17.2 GB at 131,072 tokens. That is three to four times the 4.9 GB for the weights, 22.1 GB in total. An RTX 4090 has 24 GB. Models with sliding-window layers such as Gemma 3, or with mostly linear attention such as Qwen3.5, need much less cache. If local memory is tight, pick a smaller window or a model with a leaner architecture.
6. Cost, price tiers and caching
A long contract costs more than space. Through the API you pay per token, and long prompts add up. Two mechanisms change the bill noticeably. Some providers charge a higher rate above a context threshold. And prompt caching makes repeatedly sent text much cheaper. The table runs the contract from the example through the stored prices. It compares sending 73,000 input tokens once, and the cost of the answer comes on top.
- Input per 1M tokens
- $2.00
- Higher rate above (tokens)
- none
- Input above that
- none
- Send contract once
- $0.15
- Contract from cache
- $0.007
- Input per 1M tokens
- $2.00
- Higher rate above (tokens)
- 272,000
- Input above that
- $4.00
- Send contract once
- $0.15
- Contract from cache
- $0.007
- Input per 1M tokens
- $2.00
- Higher rate above (tokens)
- 200,000
- Input above that
- $4.00
- Send contract once
- $0.15
- Contract from cache
- $0.015
- Input per 1M tokens
- $0.10
- Higher rate above (tokens)
- 100,000
- Input above that
- $0.50
- Send contract once
- $0.007
- Contract from cache
- $0.001
The “from cache” column shows the price when the contract is already cached and you only ask follow-up questions. Some providers charge a premium for the first send that writes the cache. From the second question on, the price drops to a fraction. If you question one long document many times, this saves the most. Use the API cost calculator to work out your own project, and find current prices per model in the LLM price index.
Speed matters too. The more tokens in the prompt, the longer it takes until the first answer appears.
7. When the space is not enough
When a document does not fit or quality drops at full length, you are not stuck. You have several options.
- Summarize. Have long parts condensed first and pass on only the summary. You lose detail.
- Split into sections. Process the document chapter by chapter and merge the results afterwards.
- RAG. A search fetches only the relevant passages into the prompt instead of sending the whole document. This saves cost. The trade-off is that the search can miss an important passage, and then the model lacks exactly that information. How well it works depends on your search.
- Compaction in agents. Agents such as Claude Code condense their history automatically once the window fills up. Details get lost, so it pays to put important rules into a fixed file.
- A new chat. In long conversations, restarting with a short summary of the key points helps.
8. What this means for you
- Measure before you estimate. Count your document's tokens with the token counter. Non-English text needs more than English.
- Plan for the answer. The output limit is part of the window. If you send 100 pages and expect a long analysis, you need headroom.
- Check quality at full length. Ask about details from the middle of the document. If the model misses them, your effective context is smaller than the advertised window.
- Use caching for repeated questions. Especially for long documents with many follow-ups.
- Match the window to the task. For small talk or short questions, a small window is enough. Large windows pay off for document analysis, extensive prompts and code spanning many files.
- Mind the cutoff. The window says nothing about how current the knowledge is. That is what the knowledge cutoff date is for.
