Context Window: What It Is, Every Model's Size and a Calculator
A context window is the most text, measured in tokens, that a large language model can work with in one request: your instructions, the conversation so far, any files or tool results, and the answer it writes. The model can't see anything outside it. Current flagships from Anthropic, OpenAI and Google take about a million tokens, roughly 550,000 to 750,000 English words.
Also called: context length, context size, token limit, context window size
- Current flagships
- About 1M tokens
- 1M tokens in English
- ~555K to 750K words
- Growth since GPT-2 (2019)
- About 1,000x
- GPT-4o, effective on NoLiMa
- 8K of 128K
Context window calculator
English text: a page is about 500 words, a token about ¾ of a word.
- Tokens
- 200K
- Words
- 150,000
- Pages
- 300
- 1.05M tokens19% usedGPT-6 Luna, GPT-6.1 Terra, GPT-6.2 Astra, GPT-6.2 Sol
- 1.05M tokens19% usedGemini 4 Argon, Gemini 4 Carbon, Gemini 4 Hydrogen, Gemini 4 Neon, Hy4
- 1M tokens20% usedClaude Fable 5.2, Claude Haiku 5.5, Claude Opus 5.5, Claude Sonnet 5.5, DeepSeek V4 Pro, DeepSeek V4.1 Flash, Kimi K3.1 Pro, Muse Spark Open, Qwen4-Max
- 500K tokens40% usedGrok 4.7
What a context window is
Think of the context window as the model's desk. Everything it needs for the job has to fit on the desk at once: your instructions, the papers you hand it, its own notes and the page it is writing. The model's training is the library down the hall. It shaped what the model knows, but the model can't walk back and check a book. If a fact isn't on the desk, the model answers from memory, and that's where wrong answers creep in.
Anthropic's documentation calls the context window the model's working memory. Three things follow from that:
- It covers input and output. The answer the model writes takes space too, and so does the hidden reasoning of thinking models.
- It starts empty on every request. A chat feels continuous because the app resends the whole conversation each turn. The model itself remembers nothing between calls.
- It's measured in tokens, not words. A token is a chunk of text, often part of a word. Each model family splits text its own way, so the same page costs a different number of tokens on different models.
Windows have grown about a thousandfold since 2019. GPT-2 read 1,024 tokens; OpenAI's GPT-6.2 Astra reads 1,050,000. Every current flagship from Anthropic, OpenAI and Google sits at about a million tokens. The chart below shows the growth model by model, and the calculator above tells you whether your own text fits.
How the context window fills up
What takes up the space
Each request a model receives is one long run of tokens. In a chat app or a coding agent, it usually holds:
- The system prompt: the app's own instructions, which you never see.
- Tool definitions: a description of every tool the model may call. An agent with many connected tools can spend a big share of the window here before you type a word.
- The conversation history: every earlier message and reply, sent again in full.
- Files, images and documents you attach or the agent opens.
- Tool results: search results, file contents, test output, logs. In agent work this is usually the largest and fastest-growing part.
- Reasoning tokens. On Claude's current models, earlier thinking stays in the window by default and counts like any other input.
- The answer, up to the model's output limit.
Cached prompts count as well. Prompt caching changes what you pay for repeated tokens, not whether they take up room.
Tokens, words and pages
OpenAI's rule of thumb for English: a token is about four characters or three quarters of a word, so 100 tokens is about 75 words. Code and most other languages take more tokens per word. Tokenizers differ too: Anthropic says a million tokens holds about 555,000 words on the tokenizer it introduced with Claude Opus 4.7, against about 750,000 on earlier Claude models.
Here is what the labs themselves said fits in their windows at launch:
| Window | Model (year) | What the maker said fits |
|---|---|---|
| 32,768 | GPT-4-32k (2023) | About 50 pages of text |
| 100,000 | Claude (2023) | Around 75,000 words; The Great Gatsby took 72,000 tokens |
| 128,000 | GPT-4 Turbo (2023) | More than 300 pages |
| 200,000 | Claude 2.1 (2023) | Roughly 150,000 words, over 500 pages |
| 1,000,000 | Gemini 1.5 Pro (2024) | 1 hour of video, 11 hours of audio, 30,000+ lines of code or 700,000+ words |
| 1,000,000 | Claude Sonnet 4 (2025) | Over 75,000 lines of code |
Max output is a separate, smaller limit
Models can read far more than they can write in one go. Claude's current models take a million tokens in but write at most 128,000 per request; GPT-6.2 Astra also stops at 128,000; Gemini 4 Carbon writes 65,536 by default; DeepSeek allows up to 384,000. Input and output share the window, so a prompt that nearly fills it leaves little room for the answer.
Long prompts can cost more
Some providers raise the price past a threshold. OpenAI doubles GPT-6.2 Astra's input price for requests over 272,000 input tokens. Anthropic bills its current models at the standard rate across the full million, except Claude Haiku 5.5, which costs more above 100,000 tokens.
What happens when the context window is full
Every product handles a full window its own way. Most now summarise old turns instead of failing.
ChatGPT
On the Free plan, ChatGPT can show "Context window full" or "Chat memory full" when a conversation fills up; your messages and its replies both use space. OpenAI's fixes: start a new chat, using the summary it offers (which may drop details); branch a new chat from an earlier reply; or upgrade. Deleting saved memories won't free any room, because saved memories live outside the chat. If a brand-new chat fills after one or two short messages, OpenAI suggests checking its status page for an incident.
Claude
On paid plans with code execution turned on, Claude summarises earlier messages when a chat nears the limit and keeps the full history so it can refer back. Without code execution you can still hit the limit. Long chats that trigger this use more of your plan's allowance. The chat app also gives some models less than the API does: Claude Opus 4.6 to 4.8, Sonnet 4.6 and Fable 5 get 500,000 tokens in chat, against 1 million on the API.
Claude Code
Claude Code compacts on its own: on models with a native 1M window it summarises the conversation at about 967,000 tokens by default. You can compact earlier with /compact, and tell it what to keep, as in /compact keep the test output. /autocompact 500k sets a lower threshold, /clear starts fresh, and /context shows what is using the space. Subagents run noisy work like test runs in their own window and hand back a summary.
Codex
OpenAI's Codex shows how much context is left at the bottom of the terminal. /status reports context usage, /compact compacts the chat and /new starts a blank chat in the same workspace.
The API
On Claude's API, a prompt that alone exceeds the window is rejected with a "prompt is too long" error. On Claude 4.5 models and newer, if the answer runs out of room, the response stops with model_context_window_exceeded. Server-side compaction, in beta for Claude 4.6 and later, summarises older turns so a conversation can run past the limit.
Advertised vs. effective context
A model that accepts a million tokens doesn't use all of them equally well. The gap has a name: effective context, the longest input at which a model still performs close to its short-input level. Anthropic's docs call the decline context rot: as the token count grows, accuracy and recall fall.
Three findings hold across the research:
- The middle gets lost. In the 2023 Lost in the Middle study, models used facts at the start and end of a long input far better than facts in the middle. With the answer buried mid-input, GPT-3.5 Turbo did worse than with no documents at all.
- Simple retrieval tests flatter models. Finding one planted sentence is easy: Google reported 99% recall up to a million tokens for Gemini 1.5 Pro. When the question shares no words with the answer, scores collapse. On Adobe's NoLiMa test, GPT-4o held 85% of its short-input score only up to 8,000 of its 128,000 tokens, and Llama 4 Scout only up to 1,000 of its 10 million.
- Newer models hold up better. The labs' own multi-needle tests show large gains: Claude Opus 4.6 scored 76% on an eight-needle test at a million tokens in 2026, against 18.5% for Claude Sonnet 4.5.
Read vendor numbers as best cases on tests the vendor chose, and independent ones as a reminder that the far end of any window is the least reliable part. The chart below shows how fast advertised windows grew; the table after it shows how much of that space models used well when researchers tested them.
- Today's leading models
- Earlier models
Show the data as a table
| Model | Lab | Window | Shipped |
|---|---|---|---|
| GPT-2 | OpenAI | 1K tokens | 2019-02-14 |
| GPT-3 | OpenAI | 2K tokens | 2020-05-28 |
| GPT-4 | OpenAI | 8.2K tokens | 2023-03-14 |
| GPT-4-32k | OpenAI | 33K tokens | 2023-03-14 |
| Claude (100K) | Anthropic | 100K tokens | 2023-05-11 |
| GPT-3.5 Turbo 16K | OpenAI | 16K tokens | 2023-06-13 |
| Llama 2 | Meta | 4.1K tokens | 2023-07-18 |
| GPT-4 Turbo | OpenAI | 128K tokens | 2023-11-06 |
| Claude 2.1 | Anthropic | 200K tokens | 2023-11-21 |
| Gemini 1.5 Pro (1M preview) | 1M tokens | 2024-02-15 | |
| Claude 3 Opus | Anthropic | 200K tokens | 2024-03-04 |
| Llama 3 | Meta | 8.2K tokens | 2024-04-18 |
| Gemini 1.5 Pro (2M) | 2M tokens | 2024-06-27 | |
| Llama 3.1 | Meta | 128K tokens | 2024-07-23 |
| MiniMax-Text-01 | MiniMax | 4M tokens | 2025-01-15 |
| Gemini 2.5 Pro | 1M tokens | 2025-03-25 | |
| Llama 4 Scout | Meta | 10M tokens | 2025-04-05 |
| GPT-4.1 | OpenAI | 1M tokens | 2025-04-14 |
| GPT-5 | OpenAI | 400K tokens | 2025-08-07 |
| Claude Sonnet 4 (1M) | Anthropic | 1M tokens | 2025-08-12 |
| Claude Opus 4.6 | Anthropic | 1M tokens | 2026-02-05 |
| Grok 4.20 | SpaceXSI (xAI) | 1M tokens | 2026-03-09 |
| DeepSeek V4 Pro | DeepSeek | 1M tokens | 2026-08-13 |
| Grok 4.7 | SpaceXSI (xAI) | 500K tokens | 2026-09-21 |
| Claude Opus 5.5 | Anthropic | 1M tokens | 2026-09-22 |
| GPT-6 Luna | OpenAI | 1.05M tokens | 2026-09-22 |
| Claude Sonnet 5.5 | Anthropic | 1M tokens | 2026-09-28 |
| Claude Haiku 5.5 | Anthropic | 1M tokens | 2026-10-07 |
| Gemini 4 Argon | 1.05M tokens | 2026-10-13 | |
| Muse Spark Open | Meta | 1M tokens | 2026-10-15 |
| DeepSeek V4.1 Flash | DeepSeek | 1M tokens | 2026-10-17 |
| Kimi K3.1 Pro | Moonshot AI | 1M tokens | 2026-10-24 |
| GPT-6.1 Terra | OpenAI | 1.05M tokens | 2026-10-26 |
| Hy4 | Tencent | 1.05M tokens | 2026-11-04 |
| Claude Fable 5.2 | Anthropic | 1M tokens | 2026-11-09 |
| Gemini 4 Carbon | 1.05M tokens | 2026-11-10 | |
| Gemini 4 Hydrogen | 1.05M tokens | 2026-11-12 | |
| Qwen4-Max | Alibaba | 1M tokens | 2026-11-16 |
| GPT-6.2 Astra | OpenAI | 1.05M tokens | 2026-11-17 |
| GPT-6.2 Sol | OpenAI | 1.05M tokens | 2026-11-17 |
| Gemini 4 Neon | 1.05M tokens | 2026-11-18 |
Today’s leading models (19): most have settled near 1M tokens; what still differs is how much they can write back
| Model | Context window | Max output |
|---|---|---|
| GPT-6 Luna | 1.05M | 128K |
| GPT-6.1 Terra | 1.05M | 128K |
| GPT-6.2 Astra | 1.05M | 128K |
| GPT-6.2 Sol | 1.05M | 128K |
| Gemini 4 Argon | 1.05M | 66K |
| Gemini 4 Carbon | 1.05M | 66K |
| Gemini 4 Hydrogen | 1.05M | 66K |
| Gemini 4 Neon | 1.05M | 66K |
| Hy4 | 1.05M | – |
| Claude Fable 5.2 | 1M | 128K |
| Claude Haiku 5.5 | 1M | 128K |
| Claude Opus 5.5 | 1M | 128K |
| Claude Sonnet 5.5 | 1M | 128K |
| DeepSeek V4 Pro | 1M | 384K |
| DeepSeek V4.1 Flash | 1M | 384K |
| Kimi K3.1 Pro | 1M | – |
| Muse Spark Open | 1M | – |
| Qwen4-Max | 1M | – |
| Grok 4.7 | 500K | – |
Each model's largest context window as its lab announced or documents it, dated when that window shipped. Log scale: each gridline is ten times the one below. Each row of the table links its source.
Context window benchmarks from published research
| Segment | Benchmark | Source |
|---|---|---|
| GPT-3.5 Turbo, answer in the middle of the input | Below its 56.1% no-documents score; 20%+ drop vs. answer at start or end | Liu et al., Lost in the Middle (TACL 2024) · 2023 |
| Gemini 1.5 Pro, single needle in a haystack | 99% recall up to 1M tokens | Google, Gemini 1.5 announcement · 2024 |
| GPT-4 Turbo, effective context on RULER | 64K of 128K claimed | NVIDIA, RULER benchmark · 2024 |
| Llama 3.1 70B, effective context on RULER | 64K of 128K claimed | NVIDIA, RULER benchmark · 2024 |
| Mistral Large 2 (2407), effective context on RULER | 32K of 128K claimed | NVIDIA, RULER benchmark · 2024 |
| Gemini 1.5 Pro, effective context on RULER | More than 128K (the longest length tested) of 1M claimed | NVIDIA, RULER benchmark · 2024 |
| GPT-4o, effective context on NoLiMa | 8K of 128K claimed; score fell from 99.3 to 69.7 at 32K | Adobe Research, NoLiMa (ICML 2025) · 2025 |
| GPT-4.1, effective context on NoLiMa | 16K of 1M claimed | Adobe Research, NoLiMa · 2025 |
| Claude 3.5 Sonnet, effective context on NoLiMa | 4K of 200K claimed | Adobe Research, NoLiMa · 2025 |
| Llama 4 Scout, effective context on NoLiMa | 1K of 10M claimed | Adobe Research, NoLiMa · 2025 |
| 18 models from Anthropic, OpenAI, Google and Alibaba | All got less reliable as input grew; a focused ~300-token prompt beat the full ~113K-token history | Chroma, Context Rot · 2025 |
| GPT-4.1, OpenAI-MRCR (2 needles) | 57.2% at 128K, 46.3% at 1M | OpenAI, GPT-4.1 announcement · 2025 |
| GPT-5, BrowseComp Long Context | 89% correct at 128K to 256K tokens | OpenAI, GPT-5 for developers · 2025 |
| Claude Opus 4.6, MRCR v2 (8 needles, 1M tokens) | 76%, against 18.5% for Claude Sonnet 4.5 | Anthropic, Claude Opus 4.6 announcement · 2026 |
Effective lengths depend on the test. NoLiMa counts the longest length where a model keeps 85% of its own short-input score; RULER uses a fixed bar (Llama 2 7B's score at 4K) and tested only up to 128K. Vendor results (Google, OpenAI, Anthropic) come from tests the vendor chose. Older models are here because independent long-context tests of the newest models are still scarce.
How to work within a context window
The aim is to give the model the smallest set of tokens that holds what it needs. Anthropic calls this context engineering.
- Start fresh for a new task. Old turns cost tokens and distract the model. A new chat,
/clearor/newbeats dragging a stale history along. - Summarise before you switch. Ask for a summary of decisions, facts and open questions, then paste it into a new chat. Automatic compaction does this too, but your own summary keeps what you care about.
- Retrieve instead of pasting. Retrieval-augmented generation (RAG) searches your documents and passes in only the relevant passages. It wins when the material is bigger than the window, changes often, or when you'd pay for the same pages on every request.
- Load files when needed. Agents do better holding file paths and links and opening what they need than preloading a whole folder.
- Put what matters first and last. Lead with the instructions and key facts, and restate the question at the end of a long prompt.
- Split big jobs. Subagents each get a clean window for their piece and return a short result.
- Keep standing instructions short. Files loaded at the start of every session, like a project's CLAUDE.md, take space on every request. Anthropic suggests keeping CLAUDE.md under 200 lines.
- Count before you send. The calculator above gives a quick estimate; the provider's token counter gives the exact number.
For model choice, our ranking of the best LLMs lists each model's context window and price.
Common mistakes
- Treating the advertised window as usable. Quality usually drops well before the limit. Keep critical material short and early.
- Confusing the window with memory. Saved memories, custom instructions and project files are stored outside the window and pulled in when relevant. Clearing them doesn't make room in a chat.
- Counting words as tokens. Code, tables, non-English text and newer tokenizers all use more tokens per word than the 0.75 rule suggests.
- Forgetting the answer needs room. A prompt that fills 99% of the window leaves almost nothing for the reply, or for a thinking model's reasoning.
- Thinking caching frees space. Cached tokens are cheaper, not smaller.
- Pasting the whole document. If the question is about one section, send that section. Less noise means better answers and lower bills.
- Comparing windows across products. The same model can have a smaller window in the chat app than on the API, and coding tools may compact before the hard limit.
A short history of context windows
Long windows were hard because attention, the core of a transformer, compares every token with every other token. Double the input and the work roughly quadruples, so early models stopped at a few thousand tokens.
| Date | Model | Context window (tokens) |
|---|---|---|
| Feb 2019 | GPT-2 | 1,024 |
| May 2020 | GPT-3 | 2,048 |
| Mar 2023 | GPT-4 / GPT-4-32k | 8,192 / 32,768 |
| May 2023 | Claude | 100,000 |
| Nov 2023 | GPT-4 Turbo / Claude 2.1 | 128,000 / 200,000 |
| Feb 2024 | Gemini 1.5 Pro (preview) | 1,000,000 |
| Jun 2024 | Gemini 1.5 Pro | 2,000,000 |
| Jan 2025 | MiniMax-Text-01 | Up to 4,000,000 |
| Apr 2025 | Llama 4 Scout | 10,000,000 |
| Apr 2025 | GPT-4.1 | 1,000,000 |
| Feb 2026 | Claude Opus 4.6 | 1,000,000, with compaction |
| Nov 2026 | GPT-6.2 Astra | 1,050,000 |
2023 was a race from 8,000 to 200,000 tokens. In 2024 Google reached a million, then two. In 2025 open models jumped ahead on paper, with Meta's 10 million and MiniMax's 4 million, while the closed labs settled near a million and worked on using it well. By 2026 a million tokens was standard at Anthropic, OpenAI, Google, Meta, Alibaba, DeepSeek, Moonshot and Tencent, and one lab went the other way: xAI's newer Grok models list 500,000 tokens, down from a million on Grok 4.20. The contest has moved from size to effective context, compaction and output length. For every model launched this year, see our log of new LLM releases.
Context window examples from real companies
In May 2023 Anthropic raised Claude's window from 9,000 to 100,000 tokens, about 75,000 words, and showed it reading The Great Gatsby in one prompt.
Sourcefor Anthropic’s Context windowGoogle
Gemini 1.5 Pro (February 2024) offered up to a million tokens to early testers and found a planted fact 99% of the time across that length. All developers got 2 million in June 2024.
Sourcefor Google’s Context windowLlama 4 Scout (April 2025) claimed a 10-million-token window, up from 128,000 in Llama 3. On Adobe's NoLiMa test its effective context was about 1,000 tokens.
Sourcefor Meta’s Context windowGPT-4.1 (April 2025) took OpenAI from 128,000 to a million tokens and doubled output to 32,768. In November 2026 GPT-6.2 Astra reads 1,050,000 tokens and writes up to 128,000.
Sourcefor OpenAI’s Context windowClaude Opus 4.6 (February 2026) was the first Opus model with a million-token window and added server-side compaction, which summarises older context so long agent runs can keep going.
Sourcefor Anthropic’s Context window
Context window vs related terms
| Context window vs | The difference |
|---|---|
| Tokens | Tokens are the unit; the context window is the capacity. A window of 1M tokens holds about 750,000 English words on OpenAI's rule of thumb. |
| Max output tokens | The cap on how much a model can write in one response. It's far smaller than the window: 128,000 on current Claude and GPT-6 models, against about a million tokens of input. |
| Retrieval-augmented generation (RAG) | RAG searches a larger store and puts only the relevant passages into the window. It works with the window, not instead of it: what it retrieves still has to fit. |
| Memory (ChatGPT, Claude) | Saved memories and project knowledge are stored outside the window and pulled in when relevant. Deleting them doesn't free room in a chat. |
| KV cache | The working storage a model server keeps for tokens already in the context, so it doesn't recompute them for every new token. It grows with the context, which is one reason long prompts cost more to serve. |
| Parameters | Parameters are the weights a model learned in training and are fixed afterwards. The window is how much new text it can read per request. A bigger model doesn't mean a bigger window. |
| Effective context | The part of the window a model uses well. Benchmarks often put it at a fraction of the advertised size. |
| Rate limits | Rate limits cap tokens per minute across many requests. The context window caps the size of one request. |
The best guides on context window
Hand-picked: the reading we'd send a colleague, and what each one gives you.
Docs· Anthropic
Context windowsExactly what counts toward the window, how thinking and tool results fit in, and what happens on overflow.
Guide· Anthropic
Effective context engineering for AI agentsWhy context is a finite budget and how agents stretch it: compaction, notes, subagents and just-in-time retrieval.
Paper· Liu et al., Stanford and UC Berkeley
Lost in the Middle: How Language Models Use Long ContextsThe study that showed models miss facts placed in the middle of long inputs.
Benchmark· NVIDIA
RULER: What's the Real Context Size of Your Long-Context Language Models?Claimed vs. effective length for 40+ models on tasks harder than needle search.
Benchmark· Adobe Research
NoLiMa: Long-Context Evaluation Beyond Literal MatchingShows how fast scores fall when the question and the answer share no words.
Research· Chroma
Context Rot: How Increasing Input Tokens Impacts LLM Performance18 models tested on simple tasks as input grows; all get less reliable.
Help· OpenAI
What are tokens and how to count them?The standard tokens-to-words rules of thumb, and why other languages differ.
Help· OpenAI
Why does ChatGPT say "Context window full"?OpenAI's own fixes when a ChatGPT chat fills up.
More on LeadWave
- The best LLMsThe 20 models that matter now, with context window, price and license for each.
- New LLM releasesEvery model launched in 2026 by date, with its context window.
- List of AI labsThe companies that train these models.
- AI harnessHow agent harnesses manage context, tools and compaction.
- List of AI companiesAI companies to sell to or partner with, with contacts.
Frequently asked questions
It's how much text an AI model can look at in one go, counted in tokens. Your prompt, the chat so far, any files and the model's answer all have to fit inside it.
The current conversation holds as much text as the model can use at once. Start a new chat, using the summary ChatGPT offers or your own, or branch from an earlier reply; deleting saved memories won't help.
Claude's current models (Fable 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5) have a 1-million-token window and write up to 128,000 tokens per response. Claude Code runs them at 1 million and compacts at about 967,000 tokens by default.
About 750,000 English words using OpenAI's rule that a token is three quarters of a word. Anthropic's newest tokenizer fits about 555,000 words in a million tokens; code and other languages fit fewer.
Of the models we track, Meta's Llama 4 Scout claims the most: 10 million tokens. Among current flagships, OpenAI's GPT-6 models read 1,050,000 tokens and Anthropic's and Google's read about 1 million.
No. Models get less accurate as inputs grow, and many use only a fraction of their window well. A short, relevant prompt usually beats a long one.
The context window is the total the model can handle in one request, input and output together. Max tokens, or max output tokens, caps the answer alone and is much smaller.
Use the long window when the material fits and you need the model to see all of it at once. Use RAG when the material is larger than the window, changes often, or would cost too much to send on every request.
Sources
- Anthropic, Context windows (docs)
- Anthropic, Models overview
- OpenAI, GPT-6.2 Astra model page
- OpenAI, What are tokens and how to count them
- Liu et al., Lost in the Middle
- Adobe Research, NoLiMa
Checked November 2026. Spotted something out of date? Email khrystyna@getleadwave.io.