Tokens & Context
Claude's Context Window Explained: Why 200K Tokens Doesn't Mean 200K of Room
A large Claude context window looks like free room for your prompt. In practice, system instructions, tools, files, and history claim most of that room first — and you still pay for everything sitting in it.
This page is part of the Tokens hub, which covers the whole topic end to end.
Last updated 19 September 2026. Context window sizes and max output limits below were checked against Anthropic’s context-windows documentation and model overview pages on that date. Model lineups and limits change; confirm on Anthropic’s own docs. [VERIFY: 2026-09-19]
Not affiliated with Anthropic. Claude Token Optimization is an independent site and audit service. Claude® and related product names are trademarks of Anthropic PBC. Context window sizes, max output caps, and consumer-plan limits change; always confirm on Anthropic’s own docs. [VERIFY: 2026-09-19]
If you searched “claude context window,” “claude context window size,” or “claude ai context window size 2026,” you probably want a number: how big is it, and which model has the biggest one?
The marketing answer is easy to find. Current Claude API models advertise either a 200K-token or a 1M-token context window, depending on the model family. [VERIFY: 2026-09-19] Spec pages stop there. This page does not.
The Claude context window is the total working memory for one request — everything the model can see when it generates the next reply, including the reply itself. That bucket is shared. System prompts, tool definitions, attached files, conversation history, and prior tool results all sit in it before your latest user message. A headline of 200K (or 1M) tokens is the size of the bucket, not the empty space left for you.
Cost follows the same rule. On the API, you are billed for tokens processed. A fuller window usually means a larger input bill on every turn that re-sends that window — whether or not you “needed” the old PDF again. For how those tokens are counted in the first place, start with how Claude tokens work. To estimate cost before you send, open the calculator early with a realistic prefix size, not a fantasy empty chat.
Current table: context window + max output by model
Figures below are Anthropic-documented API context windows and synchronous Messages API max output (max_tokens) as of the verification date. Consumer chat products can expose different effective windows by plan and product surface; treat this table as the API reference card. [VERIFY: 2026-09-19]
| Model | Context window | Max output (sync API) | Notes |
|---|---|---|---|
| Claude Fable 5.1 | 1M tokens [VERIFY: 2026-09-19] | 128K tokens [VERIFY: 2026-09-19] | Current top-tier reasoning / long-horizon agentic |
| Claude Opus 5 | 1M tokens [VERIFY: 2026-09-19] | 128K tokens [VERIFY: 2026-09-19] | Current Opus default for complex work |
| Claude Sonnet 5 | 1M tokens [VERIFY: 2026-09-19] | 128K tokens [VERIFY: 2026-09-19] | Current Sonnet; speed + intelligence balance |
| Claude Opus 4.6 / Sonnet 4.6 | 1M tokens [VERIFY: 2026-09-19] | 128K tokens [VERIFY: 2026-09-19] | Legacy; still available; 1M is default (no beta header) |
| Claude Opus 4.5 | 200K tokens [VERIFY: 2026-09-19] | 64K tokens [VERIFY: 2026-09-19] | Legacy — “claude opus 4.5 context window” |
| Claude Sonnet 4.5 | 200K tokens [VERIFY: 2026-09-19] | 64K tokens [VERIFY: 2026-09-19] | Legacy — “claude sonnet 4.5 context window” |
| Claude Haiku 4.5 | 200K tokens [VERIFY: 2026-09-19] | 64K tokens [VERIFY: 2026-09-19] | Fastest current-class model; 200K window |
About older “3.5 Sonnet max output” searches: Claude 3.5 Sonnet is retired from current comparison tables. If you still see “claude 3.5 sonnet max output tokens” in search, treat it as a legacy query — use the Sonnet row that matches the model ID you actually call (4.5 = 64K max output; 4.6 / Sonnet 5 = 128K). [VERIFY: 2026-09-19]
Batch note: On the Message Batches API, several Opus/Sonnet 4.6+ and current Opus 5 / Sonnet 5 paths support up to 300K output tokens with a documented beta header. That is a batch feature, not the default chat/sync cap. [VERIFY: 2026-09-19]
Rough size intuition (Anthropic’s own framing): about 200K tokens ≈ 150K words; about 1M tokens ≈ 555K words on the current tokenizer (models before Opus 4.7’s tokenizer fit more like ~750K words in 1M). These are order-of-magnitude guides, not guarantees for code or tables. [VERIFY: 2026-09-19]
For dollar rates per million tokens, use the live API pricing card rather than copying prices into this page.
What “context window” actually means
Anthropic’s docs define the context window as all the text a model can reference when generating a response, including the response. It is working memory for the turn, not the training corpus.
Each turn has an input phase (history + current user message + tools + system) and an output phase (the new reply, and on thinking models, thinking tokens as well). Everything in the request counts: system prompt, every message in messages (including tool results, images, and documents), and tool definitions. The output for the turn counts too. If you use prompt caching, input_tokens, cache_read_input_tokens, and cache_creation_input_tokens all still occupy the window — caching changes what you pay, not whether the tokens fit. [VERIFY: 2026-09-19]
That last sentence is why teams confuse “we cached it” with “it disappeared from context.” Cached prefixes still fill the bucket.
Why 200K (or 1M) is not 200K of room for you
Picture a 200,000-token window as a single shared backpack. Before you drop in today’s question, the backpack may already hold:
- System / project instructions — brand voice, safety rules, coding standards, “always respond as…” blocks. Often hundreds to several thousand tokens, and present on every turn.
- Tool and skill definitions — JSON schemas, descriptions, deferred tool packs. Agent-heavy setups can burn tens of thousands of tokens on tools alone before the user speaks.
- Attached files and retrieval packs — PDFs, repos, screenshots, RAG chunks. A “short question about the doc” is usually a large document plus a short question.
- Conversation history — prior user and assistant turns, tool calls, and tool results. Long threads re-send the past unless you compact, clear, or start fresh.
- Thinking / extended reasoning (when enabled) — thinking tokens count toward the window; on newer Opus/Sonnet families, previous thinking blocks may be kept by default and continue to occupy space. [VERIFY: 2026-09-19]
- Room reserved for max output — you still need headroom for the reply. Setting a high
max_tokenswithout trimming input is how people hit overflow behavior mid-generation.
So if your system prompt is 2,000 tokens, tools are 8,000, a PDF is 40,000, and the last eight turns are 25,000, a 200K window has already spent ~75K before your new one-liner. On a 1M window the math is the same shape — just a larger backpack that still fills from the bottom up.
This is the angle that beats pure spec pages: the headline size is capacity; usable room is capacity minus everything else already packed.
Cost scales with what is in the window
Context limits and API cost are different meters that often move together.
- Context asks: does this request fit?
- Cost / plan capacity asks: how many tokens did we process?
You can stay under the context limit and still spend heavily. Every turn that re-sends a 60K-token prefix bills (or burns plan capacity for) that prefix again unless a cache read applies. A 1M window does not make large prefixes free — it only makes it possible to send them without an immediate “prompt too long” error.
Practical implications:
- Growing a chat forever is a cost strategy, not just a UX habit.
- Pasting the same SOP into every new chat without caching or a short brief multiplies spend.
- Tool-heavy agents that echo every observation back into history grow both the window and the bill.
- Prompt caching can discount payment for a stable prefix; it does not shrink the window occupancy of that prefix. See Anthropic prompt caching pricing when the prefix is large and reused.
If you want tactics rather than definitions, the planned guide to ways to cut Claude token usage is the checklist companion to this page. Coding-loop specifics live on the planned reduce token usage in Claude Code article. Bloated instructions deserve their own treatment in hidden costs in your system prompt.
Worked example: the “empty” 200K window
Suppose you use Claude Sonnet 4.5 (200K context, 64K max output) via the API. [VERIFY: 2026-09-19]
Illustrative stack for one support-bot turn (order-of-magnitude, not a quote):
| Layer | Approx. tokens | Still in window? |
|---|---|---|
| System + project rules | 1,500 | Yes |
| Tool schemas (8 tools) | 6,000 | Yes |
| Knowledge PDF in messages | 35,000 | Yes |
| Prior 12 turns + tool results | 28,000 | Yes |
| New user question | 80 | Yes |
| Subtotal before reply | ~70,580 | — |
Headroom if max_tokens = 8,000 | need ~8,000 free | Required for a long answer |
You still have plenty of the 200K left (~120K+), so the request fits. But you are not starting from an empty 200K of “room for the user.” Roughly 70K is already spoken for. On pricing, that ~70K input is what the turn is reading — every time — unless you cache the stable top of the stack or stop re-sending the PDF.
Swap the same stack onto Sonnet 5 or Sonnet 4.6 (1M context, 128K max output) and the fit problem mostly disappears; the cost problem does not, because the model still processes those ~70K input tokens. [VERIFY: 2026-09-19]
Consumer plans vs the API window
Paid Claude.ai / Claude Code surfaces do not always expose the same effective window as the API model card. Anthropic’s help center documents plan- and product-specific windows (for example, some chat surfaces use 200K or 500K effective windows on certain models even when the API ID supports 1M). [VERIFY: 2026-09-19] Always check the help article for the product you use.
The packing rule still holds on consumer UIs: long Projects instructions, uploaded files, and never-ending chats fill the visible window and move usage bars faster.
Context rot, awareness, and compaction
More context is not automatically better. Anthropic documents context rot: as token count grows, accuracy and recall can degrade, so curating what sits in context matters as much as total capacity. [VERIFY: 2026-09-19]
Some Sonnet and Haiku models have context awareness — the API injects a token budget so the model can track remaining room. Newer Opus / Fable families may use other budget mechanisms instead. For long-running agents, Anthropic points at server-side compaction and context editing (clearing old tool results or thinking blocks) rather than hoping a 1M window never fills. [VERIFY: 2026-09-19]
Overflow behavior also evolved: on Claude 4.5+ models, if input plus max_tokens exceeds the window, generation can stop with model_context_window_exceeded rather than always failing validation up front. [VERIFY: 2026-09-19]
How to keep usable room (and spend) under control
- Measure the prefix. Count system + tools + files before arguing about model size. The calculator helps.
- Prefer briefs over eternal threads. Summarize once; ask follow-ups against the brief.
- Cache only what is stable — and remember caching ≠ free context space.
- Start a new chat when the task changes. Stale history is expensive ballast.
- Audit tool schemas. Dead tools still occupy the window.
- Trim system prompts. Hidden length there is a recurring tax — see the system-prompt costs guide when it ships.
- Match model to need. A 1M window is the wrong fix for a 2,000-token task that should have used Haiku.
FAQ
What is the Claude context window size in 2026?
Current API models: 1M tokens for Fable 5.1, Opus 5, Sonnet 5, and several 4.6+ Opus/Sonnet legacies; 200K tokens for Haiku 4.5, Sonnet 4.5, Opus 4.5, and other 200K-class models. Confirm the model ID you call. [VERIFY: 2026-09-19]
What is the Claude Sonnet 4.5 context window?
200K tokens, with 64K max output on the synchronous Messages API. [VERIFY: 2026-09-19]
What is the Claude Opus 4.5 context window?
200K tokens, with 64K max output on the synchronous Messages API. Opus 4.6 and later Opus API models move to 1M / 128K. [VERIFY: 2026-09-19]
Does max output come out of the context window?
Yes in the sense that the window must hold input and the generated output for the turn. Planning a huge max_tokens without leaving headroom is a common overflow cause. [VERIFY: 2026-09-19]
Does prompt caching free context space?
No. It can reduce what you pay for repeated input; cached tokens still count toward the window. [VERIFY: 2026-09-19]
Next steps
If your window feels “full” after a few messages, the fix is usually packing discipline — not a bigger marketing number. Read how tokens work, estimate a real prefix in the cost calculator, then follow the cut-usage / Claude Code / system-prompt guides as they publish. If you want a written map of what is filling your prompts, use the audit (see an example report) — no price on this page.
Keep reading
- How Claude tokens workWhat is actually filling your window.
- Cost calculatorEstimate before you send a large prefix.
- Prompt cachingDiscount payment; tokens still fill the window.
- API pricingPer-model rates per million tokens.
- AuditA written look at your prompts.
- Audit exampleSee what a written report looks like.