BEST AI TOOLS · 29 CATEGORIES Ranked picks for every kind of work. See the rankings → HUMANRANK.AI
HumanRank.ai Search models, tools, comparisons⌘K Daily Brief Rankings
RANKINGS Ranked picks for every kind of work.
HumanRank Brief
Guides/Context windows explained
FIELD GUIDE

Context windows explained

EDITORIAL GUIDANCE Criteria stated, sources linked
SHORT ANSWER

A context window is the total number of tokens a model can read and write in one request: your instructions, documents, chat history, tool results and the reply all share it. Most current flagship APIs list about 1 million tokens, which Google equates to roughly 50,000 lines of code or 8 average-length English novels. A big window is a ceiling, not a promise of recall. Put long material first and your question last, send only what the task needs, and check the price rules above 100,000, 200,000 or 272,000 tokens before you fill the window.

HumanRank editorial desk · Reviewed 17 October 2026 against OpenAI, Anthropic, Google, DeepSeek and xAI model and pricing documentation, and two peer-reviewed long-context studies.UPDATED 2026-10-17 · 6 MIN READ
Cut-paper illustration: a long horizontal paper strip divided into segments of different lengths like a ruler, in black and off-white with one red-orange accent

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:

  1. System instructions and any tool definitions, sent on every call.
  2. Conversation history, which grows each turn unless you trim it.
  3. Documents and retrieved passages you paste or attach.
  4. Tool results, such as search pages or file contents an agent pulled in.
  5. Reasoning tokens on thinking models, which count as output and are billed as output.
  6. 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

  1. Measure before you send. Count tokens with the vendor's counter or the four-characters rule, and write the number down.
  2. Cut what the task does not need. Boilerplate, duplicate pages and old chat turns cost money and dilute attention.
  3. 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.
  4. Label every document. Wrap each file in tags with its title and source so the model can cite it.
  5. Ask for quotes before conclusions. Requesting the exact supporting passage first makes missed or invented details easy to spot.
  6. 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.
  7. 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.

Sources

[1] pricing page · platform.claude.com
[2] GPT-6.1 Sol model page · developers.openai.com
[3] prompting strategies guide · ai.google.dev
[4] Lost in the Middle study · arxiv.org
[5] RULER benchmark paper · arxiv.org
[6] context windows page · platform.claude.com
[7] prompting best practices · platform.claude.com
[8] long context guide · ai.google.dev

Search HumanRank

Browse the catalog or type to search.

ESC TO CLOSE · Open full search →