What a context window is, and when you actually need 1M tokens
Almost every flagship model now advertises a context window of about a million tokens. That number is easy to misread. It is not how much the model “knows”, it is not a promise that the model will use everything you send equally well, and filling it is not cheap. This guide explains what counts toward the window, lists the limits of the models we track, and works out what a long request costs from official list prices.
What the context window is
Anthropic’s documentation defines the context window as “all the text a language model can reference when generating a response, including the response itself”, and calls it the model’s “working memory”, as opposed to the data it was trained on.
The important part is what counts. According to Anthropic, everything in the request counts: the system prompt, every message in the conversation (including tool results, images and documents) and your tool definitions. The output the model writes for that turn counts too, including extended thinking. In a multi-turn API conversation, the whole conversation so far is re-sent and counted on every turn (chat apps may drop the oldest turns instead).
Two details catch people out:
- Output shares the space. On Claude, the response counts toward the window: if input plus output reaches the limit, generation stops. On Gemini 4 Argon, Google says the 1M-token window is shared across input, thinking and output tokens; if your input plus
max_output_tokensexceeds 1,048,576, the API caps the output to the space that is left. - Caching does not free up space. Anthropic’s docs say cached prompt prefixes still occupy the context window: caching changes what you pay for those tokens, not whether they count.
What fits in a million tokens
Google gives a practical picture of 1 million tokens: about 50,000 lines of code (at 80 characters per line), 8 average-length English novels, or the transcripts of over 200 average-length podcast episodes.
Going by those figures, a 1M window holds a sizeable codebase or several long books in a single request. Most chat conversations, support tickets and single documents are far smaller; a single long report usually fits within the 200K-token windows that older models such as Claude Sonnet 4.5 still have.
Context windows of the models we track
| Model | Context window | Long-prompt surcharge |
|---|---|---|
| Claude Fable 5.1, Opus 5.5, Sonnet 5.5 | 1M | None: standard price across the full window |
| Claude Haiku 5.5 | 1M | Prompts over 100K tokens: $0.50 / $2.50 instead of $0.10 / $0.50 |
| GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra | 1,050,000 | Prompts over 272K tokens: 2x input, 1.5x output for the whole request |
| Gemini 4 Argon | 1,048,576 (shared with output) | None listed |
| Gemini 3.1 Pro (preview) | 1,048,576 | Prompts over 200K tokens: $4 / $18 instead of $2 / $12 |
| Gemini 3.8 Flash | 1,048,576 | None listed |
| Grok 4.7 | 500,000 | Prompts of 200K tokens or more: $4 / $12 instead of $2 / $6 |
| DeepSeek V4 Pro, V4.1 Flash | 1M | None (peak and off-peak prices instead) |
| Mistral Large 4 | 1M | None listed |
All four Claude models can write up to 128K output tokens in one request. Prices are per million input / output tokens; the full, current list is on our API prices page.
What a long request costs
Here is the list-price cost of a single request with 2,000 output tokens at four prompt sizes, including the long-prompt surcharges above. Gemini 4 Argon is shown at its introductory price, which Google lists through November 30, 2026, and at the $4 / $20 that applies from December 1. Gemini 3.8 Flash is shown at its promotional price, which Google lists through December 31, 2026; it doubles to $1.50 / $7.50 from January 1, 2027. DeepSeek is shown at peak-hour prices; off-peak is half.
| Model | 50K prompt | 150K prompt | 400K prompt | 900K prompt |
|---|---|---|---|---|
| GPT-6 Astra | $0.60 | $1.60 | $8.15 | $18.15 |
| Claude Fable 5.1 | $0.60 | $1.60 | $4.10 | $9.10 |
| Claude Opus 5.5 | $0.24 | $0.64 | $1.64 | $3.64 |
| Gemini 4 Argon (from Dec 1) | $0.24 | $0.64 | $1.64 | $3.64 |
| Gemini 3.1 Pro | $0.12 | $0.32 | $1.64 | $3.64 |
| GPT-6.1 Sol | $0.12 | $0.32 | $1.63 | $3.63 |
| Grok 4.7 | $0.11 | $0.31 | $1.62 | over limit |
| Claude Sonnet 5.5 | $0.12 | $0.32 | $0.82 | $1.82 |
| Gemini 4 Argon (intro) | $0.12 | $0.32 | $0.82 | $1.82 |
| GPT-6.1 Terra | $0.06 | $0.16 | $0.82 | $1.82 |
| DeepSeek V4 Pro (peak) | $0.07 | $0.21 | $0.54 | $1.20 |
| Gemini 3.8 Flash | $0.05 | $0.12 | $0.31 | $0.68 |
| Mistral Large 4 | $0.04 | $0.11 | $0.28 | $0.63 |
| Claude Haiku 5.5 | $0.01 | $0.08 | $0.21 | $0.46 |
| DeepSeek V4.1 Flash (peak) | $0.02 | $0.05 | $0.12 | $0.27 |
Two things stand out. First, a full-window request on a frontier model costs dollars, not cents, and a chat or agent loop re-sends that context on every turn. Second, the surcharges change the ranking: at 50K tokens GPT-6.1 Sol, Claude Sonnet 5.5 and Gemini 3.1 Pro cost about the same, but above 272K tokens GPT-6.1 Sol costs twice what Sonnet 5.5 does, and above 200K Gemini 3.1 Pro does too.
Watch the thresholds
Because the surcharges apply to the whole request, crossing a threshold by a few tokens can double or quintuple the bill (2,000 output tokens in each case):
- Claude Haiku 5.5: a 99K-token prompt costs about $0.011; a 101K-token prompt costs about $0.056.
- GPT-6.1 Sol: 270K tokens costs $0.56; 274K tokens costs $1.13.
- Grok 4.7: 199K tokens costs $0.41; 200K tokens costs $0.82.
If your prompts sit near one of these lines, trimming a few thousand tokens of boilerplate is the cheapest optimisation available.
More context is not automatically better
Anthropic’s documentation is blunt about this: as the token count grows, accuracy and recall degrade, which it calls “context rot”, so curating what goes into the context matters as much as how much space is available.
Google makes a similar point. Gemini can find a single piece of information in a long context with around 99% accuracy on a single query, but when you are looking for several “needles” at once, accuracy drops, and performance “can vary to a wide degree depending on the context”. Google also notes that longer queries generally have higher latency before the first token, and that putting your question at the end of the prompt, after the context, tends to work better.
When you actually need 1M tokens
A long context earns its cost when the model genuinely has to see everything at once:
- Questions across a whole codebase, where the answer depends on how files interact rather than on one file.
- Comparing or cross-checking many long documents, such as a contract bundle or a set of filings, where you cannot know in advance which pages matter.
- Long-running agents whose tool results pile up over many steps.
For most other jobs (answering a question about one document, summarising a report, chatting) 100K to 200K tokens is plenty, and staying under the thresholds keeps you on the cheaper price tier.
If you do use long context, cache it
If you ask several questions about the same large document, prompt caching changes the economics. Take a 900K-token document and 20 questions on Claude Sonnet 5.5, each with 2,000 output tokens:
- Without caching: 20 × $1.82 = $36.40.
- With caching: the first request writes the cache at $2.50 per million (5-minute cache), about $2.27 including output; each of the other 19 reads it at $0.10 per million, about $0.11 each (assuming the questions come within five minutes of each other, since each hit refreshes the cache). Total: about $4.36, roughly 88% less.
Google likewise calls context caching “the primary optimization” for long context on Gemini. Gemini 4 Argon supports implicit caching only, at $0.10 per million cached tokens during the introductory period. Our prompt caching guide compares cache prices across providers, and the cost calculator lets you plug in your own token counts.
Bottom line
- The context window holds everything: system prompt, history, documents, tool results and the model’s own output.
- Most current flagships offer about 1M tokens; Grok 4.7 is the exception at 500K.
- Filling the window costs from about $0.27 (DeepSeek V4.1 Flash at peak) to over $18 (GPT-6 Astra) per request at list prices.
- Long-prompt surcharges on Claude Haiku 5.5, the GPT-6 family, Gemini 3.1 Pro and Grok 4.7 apply to the whole request, so watch the thresholds.
- Send what the model needs, put the question last, and cache anything you re-send.
Want to see how two models compare on price and on our community’s daily “feels dumber” votes? Try Claude Sonnet 5.5 vs GPT-6.1 Sol or browse all comparisons.