← All guides
Guides · 10 min read

Context Windows Explained: Every Major Model Compared (2026)

What a context window actually contains, how 200K to 1M tokens translate into books and codebases, and the current window for every major model.

Updated Aug 15, 2026 · Reviewed by PromptCostLab
A bright aisle lined with organized data center server racks
A context window is working memory: everything the model can see for one request. Image: Helpameout / Wikimedia Commons

Token and pricing information changes frequently. Use this guide for planning and verify model-specific limits and prices with the provider before production billing.

A context window is working memory, not storage

The context window is everything a model can consider for one request: system instructions, the current message, conversation history, retrieved documents, tool schemas, tool results, image descriptions, and the space reserved for the response. Nothing outside the window influences the answer, and the window resets between independent requests.

This is why context is a shared budget rather than a prompt-length limit. A request that fits 990K of documents into a 1M window leaves almost no room for the answer — and many providers enforce separate output caps anyway.

Context window sizes: the 2026 picture

The current generation collapsed most of the market around the 1M-token mark, with a few holdouts. Verified in August 2026 from provider documentation:

  • Anthropic: Claude Fable 5, Mythos 5, Opus 5, and Sonnet 5 at 1,000,000 tokens; Haiku 4.5 at 200,000.
  • OpenAI: GPT-5.6 Sol, Terra, and Luna at 1,050,000 tokens (922K max input, 128K max output).
  • Google: Gemini 3.1 Pro, 3.7 Flash, 3.6 Flash, and 3.5 Flash-Lite at 1,048,576 tokens.
  • xAI: Grok 4.6 and 4.5 at 500,000 tokens (doubled pricing at 200K+ input).
  • Moonshot: Kimi K3 at 1,048,576; K2.7 Code at 262,144.
  • DeepSeek: V4 Pro and Flash at 1,048,576.
  • Cohere Command A at 256,000; Perplexity Sonar Pro at 200,000.

What 200K and 1M tokens mean in human terms

A 200K-token window holds roughly 150,000 English words — a 300-to-500-page book, a mid-sized codebase review, or about 400 pages of PDF text after extraction. A 1M-token window holds around 750,000 words: ten novels, a large monorepo's core modules, or an entire support-ticket year for one customer.

Those equivalents matter for expectations. Fitting a document is not the same as reasoning well over it; most models degrade on retrieval and synthesis deep inside huge contexts. Long context is a safety net for evidence, not a replacement for retrieval quality.

Long context often costs double

Several providers tier their pricing by input size, and this trips up budgets built on list prices. OpenAI's GPT-5.6 family doubles input (and lifts output 1.5x) for requests above 272K tokens — applied to the entire request. xAI doubles rates for prompts of 200K or more. Gemini 3.1 Pro charges $4/$18 per million above 200K input instead of $2/$12.

A calculator that ignores long-context tiers can understate a real bill by 100%. PromptCostLab's calculators apply the tier automatically and say so when they do.

Output limits are a separate constraint

The window is shared, but output has its own cap: 128K on GPT-5.6 and current Claude flagships, 64K on Haiku 4.5, 65,536 on Gemini, 384–390K on DeepSeek V4. If your task needs a long synthesis — a report, a rewrite, a full file — check the output cap, not just the window, and reserve that space before loading evidence.

How to plan around a context window

Reserve output first, add your stable instructions, then budget evidence with a 10–20% safety margin for formatting, tool schemas, and longer-than-average inputs. For conversations, summarize old turns instead of replaying them. For documents, retrieve selected passages rather than attaching everything.

Then verify: run the assembled request and compare the provider's returned usage against your estimate. The PromptCostLab context-window calculator applies exactly this workflow across every model in the registry, with headroom you control.

Frequently asked questions
What is a context window?

A context window is the maximum number of tokens a model can process in a single request. It covers system instructions, conversation history, retrieved documents, tool definitions, and the model's reply. Current mainstream models offer between 200,000 and about 1,050,000 tokens of context.

Is a bigger context window better?

Only when the task truly needs it. Larger windows cost more per request, can slow responses, and encourage dumping weak retrieval results instead of selecting relevant evidence. A well-engineered 200K pipeline often beats a lazy 1M one on both cost and answer quality.

What happens if my prompt exceeds the context window?

The API typically rejects the request with an error. Some applications truncate older content silently instead — which is dangerous because the model can answer confidently while missing evidence it never saw. Plan with headroom and monitor real usage.

Sources & further reading

Prices, token behavior, and model limits change. These primary provider docs are the right place to verify the details before shipping.

Put this into practice.Paste your own prompt into the calculator and see its context and cost tradeoffs.Open PromptCostLab calculator →