
Context windows on the same fields
All figures below come from each vendor's model or pricing page, as listed on 17 October 2026.
| Model | Context window | Max output | Long-prompt price rule |
|---|---|---|---|
| GPT-6.1 Sol | 1,050,000 tokens | 128,000 | Above 272K input: 2x input, 1.5x output for the whole request |
| Claude Sonnet 5.5 | 1M tokens | 128K | Same per-token rate across the full 1M |
| Claude Haiku 5.5 | 1M tokens | 128K | Higher rates for prompts over 100,000 tokens |
| Gemini 3.8 Flash | 1,048,576 input tokens | 65,536 | One standard rate listed for the model |
| DeepSeek V4.1 Flash | 1M tokens | 384K | Peak and off-peak rates, no length tier |
| Grok 4.7 | 500,000 tokens | "No text output limit" per xAI | Higher rates at or above 200K |
Our verdict: for routine long-document work, a model that keeps one price across the whole window is the simplest to budget. Anthropic's pricing page states that a 900k-token request on its newer models "is billed at the same per-token rate as a 9k-token request", with Haiku 5.5 as the exception. OpenAI's GPT-6.1 Sol model page lists the 272K surcharge.
What fills a context window
Tokens are pieces of words. Google's prompting strategies guide says a token is about four characters and that 100 tokens correspond to roughly 60 to 80 words. In a typical request the window holds:
- System instructions and any tool definitions, sent on every call.
- Conversation history, which grows each turn unless you trim it.
- Documents and retrieved passages you paste or attach.
- Tool results, such as search pages or file contents an agent pulled in.
- Reasoning tokens on thinking models, which count as output and are billed as output.
- The answer itself, capped by the max output figure.
Because everything shares one budget, a 1M window with 128K of output headroom leaves the rest for input. Agents fill windows fastest, since every tool call adds its result to the history.
Why a bigger window does not mean better recall
Two studies explain the gap between what a model accepts and what it uses well.
The Lost in the Middle study by Liu and colleagues (Stanford and others, 2023) found that performance "is often highest when relevant information occurs at the beginning or end of the input context, and significantly degrades when models must access relevant information in the middle."
NVIDIA's RULER benchmark paper (COLM 2024) went further than simple needle-in-a-haystack tests. It found that while every model tested claimed context of 32K tokens or more, only half could maintain satisfactory performance at 32K.
RULER (COLM 2024) found that only half of the long-context models it tested held satisfactory performance at 32K tokens, despite all claiming 32K or more.
Vendors say the same thing in their own docs. Anthropic's context windows page warns that "as token count grows, accuracy and recall degrade, a phenomenon known as context rot." Newer models handle length far better than the 2023 and 2024 systems in those papers, but the lesson holds: test recall at the length you plan to use.
How to use a long context well
- Measure before you send. Count tokens with the vendor's counter or the four-characters rule, and write the number down.
- Cut what the task does not need. Boilerplate, duplicate pages and old chat turns cost money and dilute attention.
- Put long documents first and the question last. Anthropic's prompting best practices say queries at the end can improve response quality by up to 30% on complex multi-document inputs. Google's long context guide gives the same advice.
- Label every document. Wrap each file in tags with its title and source so the model can cite it.
- Ask for quotes before conclusions. Requesting the exact supporting passage first makes missed or invented details easy to spot.
- Cache the stable part. If you ask many questions about the same file, prompt caching bills the repeated prefix at a fraction of the input price.
- Run a recall check. Plant three facts at the start, middle and end of a real document and ask for all three.
Worked example: a 300-page contract
A 300-page contract at about 500 words a page is 150,000 words. At 60 to 80 words per 100 tokens, that is roughly 190,000 to 250,000 tokens. It fits every model in the table above.
- One question on Claude Sonnet 5.5: 250,000 input tokens at USD 2 per 1M is USD 0.50 of input, as listed on 17 October 2026.
- Twenty questions without caching: about USD 10 of input.
- Twenty questions with caching: one 5-minute cache write at USD 2.50 per 1M (about USD 0.63) plus 20 cache hits at USD 0.10 per 1M (about USD 0.50), so close to USD 1.13 of input.
- A 400-page version (about 330,000 tokens) on GPT-6.1 Sol crosses the 272K line, so OpenAI bills the whole request at USD 4 input and USD 15 output per 1M instead of USD 2 and USD 10.
The practical lesson: split or trim a document that sits just above a price threshold, and cache any document you will question more than twice. Our guide to how AI API pricing works covers caching and batch discounts in detail.
Common mistakes
- Treating the window as memory. Nothing persists between API calls unless you resend it or the product stores it.
- Pasting everything "just in case". Extra tokens raise cost and can lower answer quality.
- Asking the question first. Long material above the question works better in vendor guidance.
- Ignoring output limits. Gemini 3.8 Flash accepts over a million tokens in but returns at most 65,536 out.
- Comparing token counts across vendors. Tokenizers differ; Anthropic notes its newer tokenizer produces about 30% more tokens for the same text.
- Skipping the recall check. A clean demo on page 1 says nothing about page 180.
How we researched this
We read each vendor's model and pricing pages, Anthropic's context windows and prompting pages, Google's long context and prompting guides, and the Lost in the Middle and RULER papers on 17 October 2026. Model figures match our model directory. Recall quality varies by task and model version, so the recall check in the steps above is the deciding test for your own documents. Our method for comparing tools is on how we rank.
Frequently asked questions
How many words fit in a 1 million token context window? Roughly 600,000 to 800,000 English words, using Google's estimate that 100 tokens equal about 60 to 80 words. Code, tables and non-English text usually take more tokens per word.
Does the context window include the model's answer? Yes, input and output share the window. The max output figure caps the reply separately, for example 128,000 tokens on GPT-6.1 Sol.
Is a larger context window always better? No, it only raises the ceiling. Studies such as Lost in the Middle and RULER show recall falls for information buried mid-prompt, so trimmed, well-ordered input usually wins.
Should I use retrieval or just paste the whole document? Paste it when the document fits comfortably and you will ask many questions with caching. Use retrieval when the corpus is far larger than the window or changes often.
Do reasoning tokens use up the context window? Yes, on thinking models the reasoning counts toward output. Google's pricing page states Gemini output prices include thinking tokens.
Why did my long prompt cost more than expected? You may have crossed a length tier. GPT-6 models charge 2x input above 272K tokens, Grok 4.7 raises rates at 200K and Claude Haiku 5.5 at 100,000 tokens.
Which model has the largest context window? Among the models we profile, the GPT-6 family lists the largest at 1,050,000 tokens. Claude, Gemini and DeepSeek models list about 1 million, and Grok 4.7 lists 500,000.