Key facts
- A context window is everything a model can “see” in one request: your system prompt, the whole conversation, attached files, tool definitions, and the answer it’s writing, including any thinking.
- Frontier APIs now offer about 1 million tokens. Google says that’s a 1,048,576-token window shared by input, thinking and output on Gemini 4 models, and Anthropic lists 1M for Claude Opus 5.5 with up to 128K of output.
- Google’s rule of thumb: 1 token is about 4 characters, and 100 tokens is about 60 to 80 English words.
- A big window isn’t the same as good recall. Research such as RULER and “Lost in the Middle” found that models get worse as inputs grow, especially for facts buried in the middle.
“1M-token context” is in nearly every model announcement now. This explainer covers what that number actually measures, what eats into it, why models get worse long before they hit the limit, and what it means for running models on your own GPU.
Tokens first
Models don’t read words, they read tokens: chunks of text that can be a whole word (“cat”), part of a word, or a single character. Google’s token docs give the rule of thumb that a token is about 4 characters, and that 100 tokens is roughly 60 to 80 English words. Every tokenizer is different, and code, non-English text and numbers usually take more tokens per word.
Images, audio and video become tokens too. According to the same Gemini page, an image of 384 pixels or less counts as 258 tokens, audio costs about 32 tokens per second, and video about 263 tokens per second in the default mode. A 10-minute recording uses context fast.
What counts toward the window
Anthropic’s context window docs describe it as the model’s “working memory”, and they’re explicit about what counts: the system prompt, every message (including tool results, images and documents), your tool definitions, and the output for the turn, including extended thinking.

Two consequences surprise people:
- The whole conversation is re-sent every turn. In a chat, turn 30 includes turns 1 to 29. That’s why long chats get slower and more expensive, and why they eventually hit the limit.
- Reasoning eats the same budget. On Gemini 4 models, Google’s docs say input, thinking and output share one 1,048,576-token window, and synchronous responses are capped at 65,536 output tokens unless you use “long decode”. Anthropic notes that thinking tokens are billed as output and count toward the window. Recent Claude models (including Opus 5.5) keep previous thinking blocks in context, so those count as input on later turns.
How big are windows right now?
| Model | Context window | Max output | Source |
|---|---|---|---|
| Gemini 4 Carbon (Oct 28, 2026) | 1,048,576, shared with output | 65,536 standard, up to ~1M with long decode | Google AI Studio docs |
| Claude Opus 5.5 | 1M | 128K | Anthropic model page |
| Claude Haiku 5.5 | 1M (prompts over 100K tokens cost more) | 128K | Anthropic docs |
| Qwen3.8-27B (open weights) | 262,144 native, extendable toward 1M with RoPE scaling | not specified | LM Studio model page |
Note the pricing footnotes. Anthropic says long-context requests on its 1M-window models are billed at standard rates, except on Haiku 5.5, where prompts over 100,000 tokens cost more. A full 1M-token prompt to Opus 5.5 at $4 per million input tokens is about $4 for that single request.
Bigger isn’t the same as better
A model accepting 1M tokens doesn’t mean it uses all of them well. Two widely cited papers explain why:
- “Lost in the Middle” (Liu et al., 2023) found that performance is often highest when the relevant information is at the beginning or end of the input, and drops significantly when it’s in the middle, even for models built for long context.
- RULER (Hsieh et al., COLM 2024) went beyond the simple “needle in a haystack” test. Of 17 models that all claimed at least 32K of context, only about half kept satisfactory performance at 32K, even though nearly all of them aced the basic needle test.
Models have improved a lot since then, but the lesson still holds. The advertised window is a ceiling, not a promise. Vendors’ own docs now push “context engineering” and server-side compaction for long agent runs. That’s Anthropic’s term for summarizing old turns so the window doesn’t fill with noise.
Watch: a short explainer
Context on your own GPU
Locally, the window is limited by memory, not by an API cap. Every token in context needs space in the KV cache, the stored attention data for each previous token. For an 8B-class model it’s on the order of 1 GiB per 8K tokens at full precision, as worked out in our VRAM guide. That’s why local tools default to modest context and make you raise it yourself.
Practical rules for local models:
- Set the context you need, not the maximum. 8K to 16K is plenty for chat. Agents and coding tools want 32K or more.
- Watch for silent truncation. If a model “forgets” its instructions mid-conversation, the oldest tokens have probably fallen out of a too-small window.
- Quantize the KV cache (for example
q8_0) to fit more context in the same VRAM.
How to use long context well
- Put the instructions and the question last, after the long documents, so they sit at the end of the input where recall is strongest.
- Don’t paste everything. Retrieve the relevant sections, or ask the model to summarize first.
- Start fresh chats for new tasks instead of continuing a 200-turn thread.
- Count before you send. APIs offer token counting (Gemini’s
count_tokens, for example), and every response reports usage. - Use caching for repeated prefixes. If you send the same long document with many questions, prompt caching can cut the cost a lot. Gemini 4 Carbon, for example, discounts cached input by 95%.
The takeaway
A context window is a shared budget for everything in a request, including the model’s own thinking and output. Million-token windows are real and useful for whole codebases and long documents, but recall still fades with length and cost scales with every token. Treat the window like RAM: plenty of it is great, and filling it carelessly makes everything slower and worse.
Sources
- Google: Understand and count tokens and What’s new in Gemini 4 Carbon
- Anthropic: Context windows and the Claude Opus 5.5 model page
- LM Studio: Qwen3.8
- Liu et al., “Lost in the Middle: How Language Models Use Long Contexts”
- Hsieh et al., “RULER: What’s the Real Context Size of Your Long-Context Language Models?”
Facts checked against the sources above on November 17, 2026.
Cover image: Anthropic (official image)
